> ## Documentation Index
> Fetch the complete documentation index at: https://docs.askfutures.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect the MCP server

> Add the AskFutures MCP server to Claude Code, Cursor, or Codex in a couple of minutes.

Point any MCP-capable client at the AskFutures MCP server and you can build and
backtest futures strategies right from your editor or terminal.

The remote endpoint is:

```text URL theme={null}
https://mcp.askfutures.com/mcp
```

<Warning>
  You need MCP access enabled on your account first. There's no self-serve toggle
  yet — see [Authentication](/developers/authentication) to request it. Without
  it, the connection will sign in but tool calls won't be authorized.
</Warning>

## Connect your client

<Steps>
  <Step title="Add the server">
    Use the snippet for your client below. They all point at the same remote URL
    over streamable HTTP.

    <CodeGroup>
      ```bash Claude Code theme={null}
      claude mcp add --scope user --transport http askfutures https://mcp.askfutures.com/mcp
      ```

      ```json Cursor theme={null}
      {
        "mcpServers": {
          "askfutures": {
            "url": "https://mcp.askfutures.com/mcp"
          }
        }
      }
      ```

      ```toml Codex theme={null}
      [mcp_servers.askfutures]
      url = "https://mcp.askfutures.com/mcp"
      ```
    </CodeGroup>

    <Note>
      Add Cursor's entry to its MCP config (Settings → MCP, or `mcp.json`), and
      Codex's to its MCP servers config. Exact file locations vary by client
      version — check that client's MCP docs.
    </Note>
  </Step>

  <Step title="Sign in">
    The first time the client connects, it opens a hosted AskFutures sign-in page
    in your browser. Sign in there and approve access. Your client stores the
    resulting token and rotates it automatically — you won't be asked again until
    it expires. See [Authentication](/developers/authentication) for the details.
  </Step>

  <Step title="Verify the tools are available">
    Ask your agent to list the AskFutures tools, or check your client's MCP panel.
    You should see tools for creating strategies, running backtests, and
    optimizing. If you only see them after signing in but calls fail, your account
    likely needs [MCP access granted](/developers/authentication).
  </Step>

  <Step title="Run something">
    Try a plain-English request:

    > *"Using AskFutures, build a strategy that buys Micro Nasdaq when price
    > breaks above the first 15-minute high, then backtest it on the last year."*

    Your agent will create the strategy, wait for the backtest to finish, and
    report the results.
  </Step>
</Steps>

## Local option (advanced)

The MCP server can also run locally over stdio instead of connecting to the
remote URL. This is mainly for development and self-hosting — most people should
use the remote endpoint above, which is managed and always up to date. The remote
connection is the supported path and what the rest of these docs assume.

## What to do next

Once you're connected, the workflow is **create → wait → optimize**: tools that
do heavy work return a task you poll until it's done. The
[overview](/developers/overview) explains the async model, and the
[recipes](/developers/recipes) show full end-to-end examples.

<Warning>
  Backtests are hypothetical and simulated, net of modeled slippage and
  commission. Past performance does not guarantee future results. Always test
  before you trade.
</Warning>

## Next steps

<CardGroup cols={3}>
  <Card title="Authentication" icon="key" href="/developers/authentication">
    Sign-in flow, token lifetimes, and getting access enabled.
  </Card>

  <Card title="MCP tools" icon="screwdriver-wrench" href="/developers/tools">
    Every tool, what it does, and what it returns.
  </Card>

  <Card title="Recipes" icon="book-open" href="/developers/recipes">
    End-to-end examples: build, backtest, optimize, compare.
  </Card>
</CardGroup>
