MT-MCP Docs
Setup

Self-Hosted / Local Development

Run the gateway and MCP server yourself and connect over stdio.

If you're running the gateway and MCP server locally — local development on this repo, or a fully self-hosted deployment — you don't need a terminal key at all for the MCP connection itself. The stdio transport talks to your local gateway directly.

Configure

claude_desktop_config.json (or equivalent for your client)
{
  "mcpServers": {
    "mt-mcp": {
      "command": "node",
      "args": [
        "--env-file=/absolute/path/to/mt_mcp/.env",
        "/absolute/path/to/mt_mcp/packages/server/mcp/src/index.ts"
      ],
      "env": {
        "MTMCP_GATEWAY_URL": "http://127.0.0.1:8081",
        "MTMCP_MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Absolute paths required

Replace /absolute/path/to/mt_mcp with the actual absolute path to your checkout of this repository. Most MCP clients launch the command from an unpredictable working directory, so relative paths won't resolve correctly.

Prerequisites

Bring the local stack up first — the gateway, Postgres, and Redis all need to be running:

pnpm install
docker-compose -f infra/docker/docker-compose.dev.yml up
pnpm dev:gateway

For local development, bind the gateway to loopback (127.0.0.1) and don't put it behind a public-facing endpoint without adding auth — the stdio transport described here assumes no authentication, which is only appropriate for local, trusted use.

Verify

Once the gateway is up and your MCP client is configured, ask for something that requires live data. If you don't have a real terminal connected yet, get_tick and similar tools will return a connection error until an EA is actually attached — that's expected; it confirms the MCP-to-gateway leg of the pipe is working even before a terminal is connected.

On this page