MTContext Docs
Setup

Claude Code

Connect Claude Code to MTContext.

Requires a terminal key that's already bound to a terminal.

Preflight

Before running claude mcp add, confirm:

  • claude CLI is updated and logged in.
  • You are targeting the right config scope (global vs project).
  • The terminal key is active and already bound to a terminal.

Add the server

Claude Code can register a remote HTTP MCP server directly from the CLI:

claude mcp add --transport http mtcontext https://mcp.mtcontext.com/mcp/v1 \
  --header "Authorization: Bearer MTMCP-YOUR-TERMINAL-KEY"

Replace MTMCP-YOUR-TERMINAL-KEY with your actual terminal key. Run claude mcp list afterward to confirm mtcontext shows up as connected.

If your Claude Code version doesn't support --transport http yet, fall back to the mcp-remote connector — the same one used for Claude Desktop — as a stdio-based bridge:

npm install -g mcp-remote
claude mcp add mtcontext -- mcp-remote https://mcp.mtcontext.com/mcp/v1 --header "Authorization: Bearer MTMCP-YOUR-TERMINAL-KEY"

Project-scoped config

To check the connection into a repo instead of your global Claude Code config, add an .mcp.json at the project root:

.mcp.json
{
  "mcpServers": {
    "mtcontext": {
      "type": "http",
      "url": "https://mcp.mtcontext.com/mcp/v1",
      "headers": {
        "Authorization": "Bearer MTMCP-YOUR-TERMINAL-KEY"
      }
    }
  }
}

If you do this, treat the terminal key as a secret the same way you would an API key — don't commit it directly; reference an environment variable if your Claude Code version supports variable interpolation in .mcp.json, or keep the file out of version control.

Verify

Start a session in the project and ask something that requires live data, e.g. "What's the current price of EURUSD?" Claude Code should call get_tick through the mtcontext server and return a live quote.

Trading tools follow the same dry-run rules as everywhere else — see Enabling live trading for the two conditions that have to be true before dry_run: false actually executes.

Troubleshooting

  • unknown option --transport http: your CLI version is older; use the mcp-remote fallback.
  • mtcontext missing in claude mcp list: command failed or config scope mismatch; retry in the intended scope.
  • Auth failures: rotate key if unsure and update all stored configs.
  • Tool calls stall: verify internet/proxy rules for outbound HTTPS.

On this page