1. Add the connection to the Cursor project
Open the folder where you will keep your research. Merge the JSON below into .cursor/mcp.json under mcpServers, preserving other servers. Use ~/.cursor/mcp.json only if you want the connection available across projects.
Manage the server from Customize and complete its browser OAuth connection to NexusTrade. You can instead use Add to Cursor on the NexusTrade developer page. Verify tool availability inside the same project chat before reading or changing account resources.
{
"mcpServers": {
"nexustrade": {
"url": "https://nexustrade.io/api/mcp"
}
}
}2. Confirm access with an owned-resource read
Ask the client to discover tools and call fetch_portfolios, then pass one returned portfolioId as portfolio_id to get_portfolio. Inspect portfolioId, type, name, isActive and strategies; compare them with the same saved book in NexusTrade. Do not copy IDs from a demonstration. An empty list can be valid for a new account.
A tool-not-found error means revisit discovery. An authorization error means check the selected NexusTrade environment/account and OAuth connection. Do not ask the model to invent a replacement identifier.
Use only NexusTrade read tools. Call fetch_portfolios, then pass one returned portfolioId as the portfolio_id input to get_portfolio. Show portfolioId, type, name, isActive and complete strategies. Do not create, edit, backtest, deploy or place orders.3. Freeze the proposed rule and assumptions
Daily QQQ long/cash proposal: buy 10 shares only when no QQQ position is held and price is above its 100-day simple moving average; sell the entire QQQ position when price is below that average. Equal values take no action. Keep a separate buy-and-hold QQQ control; the candidate must not accumulate 10 more shares on each above-average day.
Ask Cursor to save the complete canonical strategy JSON and the experiment record in experiments/qqq-trend-control.json. Call build_portfolio with the complete draft first. Inspect valid, the canonical portfolio and each issue path, component and message. Fix issues and preview again until valid is true. After reviewing the rule, pass the same JSON to create_portfolio to save a new chat draft. Use get_portfolio to read back its actual portfolioId, type=chat and strategies. Verify sizing, exits and the guard against repeated accumulation.
Example research inputs: Day interval, $10,000 initial capital, 2024-01-01 through 2025-12-31 for the first historical window, and 2026-01-01 through 2026-09-30 reserved before inspection as the unseen window. These are proposed dates and inputs, not completed results.
| portfolio_id | Exact returned chat draft ID |
| start_date / end_date | 2024-01-01 / 2025-12-31 |
| interval | Day |
| initial_value | 10000 |
| baseline_symbol | QQQ |
| fee_config / dividend_policy | Proposed zero-commission baseline: fee_config Stock amount 0, type dollars; dividend_policy cash. Record effective fill assumptions; this baseline does not model all trading costs |
| generate_events | Leave off for first run; detailed events cost more |
No matching rows. Clear the filter to see all records.
4. Review the request before submitting
In Cursor, review the candidate/control file diff before authorizing the call. Keep the original QQQ control file unchanged and save the proposed tool payload beside the comparison record. Fix unsupported indicator fields before submission, using the discovered schemas.
Preview this proposed rule with build_portfolio: Daily QQQ long/cash proposal: buy 10 shares only when no QQQ position is held and price is above its 100-day simple moving average; sell the entire QQQ position when price is below that average. Equal values take no action. Keep a separate buy-and-hold QQQ control; the candidate must not accumulate 10 more shares on each above-average day. Save the complete configuration in experiments/qqq-trend-control.json. Inspect valid, issues and canonical portfolio. Fix issues and rerun preview. When valid and reviewed, pass the same JSON to create_portfolio, then show get_portfolio readback and proposed backtest_portfolio inputs: Day, initial_value 10000, baseline_symbol QQQ, start_date 2024-01-01, end_date 2025-12-31. Use fee_config with Stock amount 0 and type dollars, and dividend_policy cash as a proposed zero-commission baseline. Record effective fill assumptions and compare a separate cost sensitivity before relying on results. Wait for my approval before one submission. Do not deploy the draft.The tool sequence
Inspect the discovered inputs before submitting a call. For a new candidate, validate and save it first; for a saved candidate, start with get_portfolio. Record the portfolio and backtest identifiers returned by the account tools.
| Validate a new candidate | build_portfolio | Canonical configuration and component issues; nothing is saved |
| Save the validated draft | create_portfolio | Use the reviewed configuration and retain the returned chat portfolio ID |
| Read the saved book | get_portfolio | Exact strategies, action sizing, and portfolio identity |
| Submit the historical test | backtest_portfolio | Explicit dates, interval, capital and benchmark |
| Poll the same operation | query_backtest_status | Terminal state and warnings; do not resubmit while running |
| Inspect the curve | query_backtest_history | Historical values for the returned backtest_id |
| Compare candidates | compare_backtests | Identical period and assumptions, with activity and risk |
No matching rows. Clear the filter to see all records.
5. Poll the accepted test and inspect the actual curve
Save the accepted backtest ID from the human-readable response immediately. Pass that ID as backtest_id to query_backtest_status; it reports status, error, interval and completed statistics. PENDING or RUNNING means wait on the same run. ERROR means inspect the error before changing configuration. Only use query_backtest_history for the completed run.
History rows include time, value, cash, positionValue, comparisonValue and reservedCollateral. Review trade activity, drawdown and benchmark differences. A null/unrecorded collateral field is not zero. Page through history if needed; an empty early response is not a reason to start another job. Backtest history retention is bounded, so preserve your evidence while it is available.
6. Freeze selection before the unseen test
If NexusTrade is absent, check the project folder and .cursor/mcp.json location. Restart Cursor after changing custom configuration and inspect the server in Customize. Finish or repeat the requested OAuth flow if authorization has expired. Review file diffs separately from remote operations: reverting an editor change does not cancel an accepted job or undo a deployment.
For a disconnected session, reopen the saved backtest ID and query its status. If an accepted ID is missing, inspect the previous response before another submission; arbitrary new requests are not idempotent retries.
After reviewing the first window, freeze the candidate before testing 2026-01-01 through 2026-09-30. Use the same capital, interval, fees and dividend assumptions, and the stated benchmark. Keep rejected variants and candidate count in the record. If those dates influenced rule selection, label them selection-contaminated rather than unseen. Historical modeled fills do not establish forward paper or live performance.
Costs and the next task
The local file and proposed rule are planning artifacts. Research and backtest submissions can consume credits; detailed backtest events increase cost. Check your plan and the proposed operation before submitting. OAuth confirms account access, not that a strategy will succeed.
For live deployment, review the separate broker guide, exact trading account and permissions. This client connection does not prove a native brokerage connector or a completed live workflow.