Recommended path: one-command MCP client setup
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
Common runtime variables (optional)
| Variable | Default | Notes |
|---|
POLYMARKET_CHAIN_ID | 137 | Supports 137 (Polygon) and 80002 (Amoy). |
POLYMARKET_SIGNATURE_TYPE | 0 (EOA) | Accepts EOA, POLY_PROXY, POLY_GNOSIS_SAFE, or 0/1/2. |
POLYMARKET_RPC_URL | none | Optional RPC override. |
POLYMARKET_CLOB_URL | https://clob.polymarket.com | CLOB REST base URL. |
POLYMARKET_GAMMA_URL | https://gamma-api.polymarket.com | Gamma REST base URL. |
POLYMARKET_BRIDGE_URL | https://bridge.polymarket.com | Bridge REST base URL. |
POLYMARKET_RELAYER_URL | https://relayer-v2.polymarket.com | Relayer base URL. |
POLYMARKET_RELAYER_TX_TYPE | none | Optional relayer tx type override. |
Auth variables (optional, feature-gated)
| Capability area | Variables |
|---|
| L1 signing readiness | POLYMARKET_PRIVATE_KEY (alias: PRIVATE_KEY) |
| L2 API auth readiness | POLYMARKET_API_KEY, POLYMARKET_API_SECRET, POLYMARKET_API_PASSPHRASE |
| Builder-relayer readiness | POLYMARKET_BUILDER_API_KEY, POLYMARKET_BUILDER_API_SECRET, POLYMARKET_BUILDER_API_PASSPHRASE |
| Optional extras | POLYMARKET_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:
health_check
list_markets with { "view": "simplified", "mode": "sampling" }
search with { "q": "election", "limit": 5 }
get_prices with { "items": [{ "token_id": "<token_id>", "side": "BUY" }] }
- 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:
Use source checkout for local iteration, not as the default end-user install path.
Next steps