Skip to main content
Use the published package @carbon-copy/polymarket-mcp as the default install path.

Claude CLI

claude mcp add polymarket -- npx -y @carbon-copy/polymarket-mcp

Claude Desktop config

Add a local stdio server entry to your Claude Desktop MCP config:
{
  "mcpServers": {
    "polymarket": {
      "command": "npx",
      "args": ["-y", "@carbon-copy/polymarket-mcp"],
      "env": {
        "POLYMARKET_CHAIN_ID": "137"
      }
    }
  }
}

Installed binary variant

If you prefer a globally installed executable:
npm install -g @carbon-copy/polymarket-mcp
polymarket-mcp
Example config:
{
  "mcpServers": {
    "polymarket": {
      "command": "polymarket-mcp",
      "env": {
        "POLYMARKET_CHAIN_ID": "137"
      }
    }
  }
}

How the connection works

The package runs as a local MCP server over stdio. Your MCP client launches one of these commands:
  • npx -y @carbon-copy/polymarket-mcp
  • polymarket-mcp
No HTTP server is required for normal client integration.

Environment variables

@carbon-copy/polymarket-mcp can start with no secrets for public market discovery. Add credentials only for account, trading, rewards, relayer, or builder-relayer workflows.

Required for basic startup

  • None.

Common runtime variables (optional)

VariableDefaultNotes
POLYMARKET_CHAIN_ID137Supports 137 (Polygon) and 80002 (Amoy).
POLYMARKET_SIGNATURE_TYPE0 (EOA)Accepts EOA, POLY_PROXY, POLY_GNOSIS_SAFE, or 0/1/2.
POLYMARKET_RPC_URLnoneOptional RPC override.
POLYMARKET_CLOB_URLhttps://clob.polymarket.comCLOB REST base URL.
POLYMARKET_GAMMA_URLhttps://gamma-api.polymarket.comGamma REST base URL.
POLYMARKET_BRIDGE_URLhttps://bridge.polymarket.comBridge REST base URL.
POLYMARKET_RELAYER_URLhttps://relayer-v2.polymarket.comRelayer base URL.
POLYMARKET_RELAYER_TX_TYPEnoneOptional relayer tx type override.

Auth variables (optional, feature-gated)

Capability areaVariables
L1 signing readinessPOLYMARKET_PRIVATE_KEY (alias: PRIVATE_KEY)
L2 API auth readinessPOLYMARKET_API_KEY, POLYMARKET_API_SECRET, POLYMARKET_API_PASSPHRASE
Builder-relayer readinessPOLYMARKET_BUILDER_API_KEY, POLYMARKET_BUILDER_API_SECRET, POLYMARKET_BUILDER_API_PASSPHRASE
Optional extrasPOLYMARKET_ADDRESS, POLYMARKET_FUNDER (aliases: FUNDER_ADDRESS, POLYMARKET_FUNDER_ADDRESS), POLYMARKET_BUILDER_AUTH_HEADER, POLYMARKET_GEOBLOCK_TOKEN, POLYMARKET_USER_AGENT
Public discovery tools work without auth. Auth-backed wrappers such as ensure_api_key, get_open_orders, place_order, get_rewards, and relayer execution flows require the relevant credentials.

Minimal smoke check

After connecting in your MCP client, run these in order:
  1. health_check
  2. list_markets with { "view": "simplified", "mode": "sampling" }
  3. search with { "q": "election", "limit": 5 }
  4. get_prices with { "items": [{ "token_id": "<token_id>", "side": "BUY" }] }
  5. read polymarket://status if your client supports resources
This verifies stdio transport, canonical market discovery, pluralized market-data tools, and runtime status visibility.

Local development only: run from source

Use a source checkout only when you need to inspect or modify the server locally.
git clone https://github.com/CarbonCopyInc/polymarket-mcp.git
cd polymarket-mcp
npm install
npm run build
node dist/index.js
For active development:
npm run dev
Use source checkout for local iteration, not as the default end-user install path.

Next steps