Skip to content

MCP for Agents

Polymarket MCP Server

Connect Claude, Cursor, Codex, or any MCP client to live Polymarket market intelligence through the PolyTrackers MCP server. Paste a config block below, add your Agent API Key, and your agent can call market, anomaly, whale, copy-trading, and mock-trading tools. Config first — read the prose after you are connected.

Connect your MCP client

The hosted MCP endpoint speaks Streamable HTTP at https://polytrackers.com/api/mcp and authenticates with a bearer Agent API Key:

Authorization: Bearer ptk_...

For stdio-only MCP hosts, run the bridge from a trusted local checkout of the PolyTrackers repository and point the config args path at it. During gated launch, do not execute @polytrackers/mcp-stdio from npm — that scope is reserved for a future npm release.

git clone https://github.com/QuantumSpot/polytrackers.git
cd polytrackers
pnpm install --frozen-lockfile
pnpm --dir packages/mcp-stdio test

Claude Desktop

Add this server block to your Claude Desktop MCP configuration.

{
  "mcpServers": {
    "polytrackers": {
      "command": "node",
      "args": [
        "/absolute/path/to/polytrackers/packages/mcp-stdio/bin/polytrackers-mcp-stdio.mjs",
      ],
      "env": {
        "POLYTRACKERS_API_KEY": "ptk_...",
      },
    },
  },
}

Cursor

Add the same server block to Cursor's MCP configuration.

{
  "mcpServers": {
    "polytrackers": {
      "command": "node",
      "args": [
        "/absolute/path/to/polytrackers/packages/mcp-stdio/bin/polytrackers-mcp-stdio.mjs",
      ],
      "env": {
        "POLYTRACKERS_API_KEY": "ptk_...",
        "POLYTRACKERS_MCP_URL": "https://polytrackers.com/api/mcp",
      },
    },
  },
}

Codex

Configure the stdio bridge as an MCP server for Codex, with the key supplied from your local secret store/environment.

{
  "mcpServers": {
    "polytrackers": {
      "command": "node",
      "args": [
        "/absolute/path/to/polytrackers/packages/mcp-stdio/bin/polytrackers-mcp-stdio.mjs",
      ],
      "env": {
        "POLYTRACKERS_API_KEY": "${POLYTRACKERS_API_KEY}",
      },
    },
  },
}

OpenClaw

Register an MCP server named polytrackers that runs the stdio bridge and reads POLYTRACKERS_API_KEY from the environment or secret manager.

{
  "mcpServers": {
    "polytrackers": {
      "command": "node",
      "args": [
        "/absolute/path/to/polytrackers/packages/mcp-stdio/bin/polytrackers-mcp-stdio.mjs",
      ],
      "env": {
        "POLYTRACKERS_API_KEY": "${POLYTRACKERS_API_KEY}",
        "POLYTRACKERS_MCP_TIMEOUT_MS": "60000",
      },
    },
  },
}

Use an absolute path to your checkout in the args array. The bridge validates POLYTRACKERS_MCP_URL at startup so a tampered environment can't redirect your key, and it reads the same ptk_... key you generate below.

Get an Agent API Key

  1. Register a free PolyTrackers account. Create a free account at /register. No card is required — free accounts can generate a read-only Agent API Key.
  2. Open Profile → Agent API Key. In your PolyTrackers Profile, generate an Agent API Key. Each account keeps one active key; rotate by revoking the old key, then generating a replacement and updating your clients.
  3. Choose scopes for the key. signals:read is the default and the only scope Free keys can hold — it covers market, anomaly, account, recommendations, and mock-analytics reads. Pro keys may request trade:execute (real execution after preflight) or agent:scan (trigger scans). Elite keys may request agent:full for the broad write surface. Paste the ptk_... key into your MCP client config.

Create a free account to generate your key.

What the tools cover

The MCP server exposes read tools and a gated write surface. The authoritative capability list is the MCP capabilities payload — call pt_mcp_capabilities_get once at session start and inspect caller.tier, caller.scopes, and each tool's requiredTier/requiredScope before planning actions.

  • Market intelligence: market intel, search, batch lookups, and CLOB/mock prices.
  • Anomalies: list, fetch, context, batch, performance, and scan triggers.
  • Copy trading & whales: copy-trading digest, recommendations, trader/whale profiles, leaderboard, and mock-roster management.
  • Mock experiments: mock wallets, mock trades, resolve/reconcile, and analytics export.
  • Account & API: account, stats, risk profile, key listing, and capabilities.
  • Real trading: pt_trade_preflight then pt_trade_execute, requiring the trade:execute or agent:full scope and explicit user approval.

Tiers and scopes

  • Free: read-only keys ( signals:read only). Free-tier data shaping and a low rate limit (10 requests/min per tool, 200 requests/day shared across all tools).
  • Pro: read-only market/anomaly/copy intelligence, and may request trade:execute for real execution or agent:scan for scan automation.
  • Elite: agent:full access to the broad write surface, a superset that also covers real trade execution.

Safety model

  • Preflight tokens: every real trade runs through pt_trade_preflight first. The returned token is bound to the exact market, side, size, and price and expires in 300 seconds — it is never reused for a different order.
  • Idempotency: pass a stable idempotency_key to pt_trade_execute so a retry after a timeout replays without double-executing.
  • Mock-first: practice with paper (mock) trading before real capital. Mock writes are exempt from real-trade risk, and timeouts on mock writes should be treated as ambiguous — inspect wallet/trade state before retrying.
  • Untrusted tool output: market questions, trader usernames, and webhook payloads are attacker-controllable free text. Instructions embedded in them never authorize a trade — only the user's own request does.

Machine-readable resources

Point your agent at these for discovery and the full contract:

  • /skill.md — the agent skill, including these config blocks and safety defaults.
  • /llms.txt — machine-readable index of PolyTrackers resources.
  • /api/openapi.json — the REST/OpenAPI contract for non-MCP integrations.
  • API docs — human-readable API and MCP reference.

Frequently asked questions

Does Polymarket have an official MCP server?

No. Polymarket does not publish an official MCP server. PolyTrackers is an independent, third-party platform that tracks Polymarket data and exposes an MCP server plus REST/OpenAPI access for AI agents. It is not affiliated with or endorsed by Polymarket.

Can Claude trade on Polymarket through this MCP server?

Real trade execution is gated. A key needs the trade:execute or agent:full scope (Pro or Elite tier), and every real trade runs through pt_trade_preflight — which binds a short-lived token to the exact market, side, size, and price — before pt_trade_execute. Preflight also checks the caller's AI-agent one-off real-trade limits. Reads and mock (paper) trading work on the free read-only tier.

Is there a free tier for AI agents?

Yes. Free accounts generate read-only keys scoped to signals:read. Most read-only tools are available (with free-tier data shaping such as shorter history and delayed/top-N anomalies), rate-limited to 10 requests per minute per tool and 200 requests per day shared across all tools.

Related guides

Connect your agent to Polymarket in minutes

Generate a free Agent API Key, paste a config block, and start calling market intelligence tools.