polymarket-mcp
Provides access to Polymarket prediction market data, including top markets, order books, and token resolution, with on-chain verification via the Polygon blockchain.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@polymarket-mcp show me the top active Polymarket markets"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
polymarket-mcp
Clean, NegRisk-resolved Polymarket market & order-book data as an MCP server. No API key, no database — stateless wrappers over the public Gamma and CLOB APIs, with the messy parts (keyset pagination, NegRisk flags, token→outcome resolution, book parsing) already handled for you.
Point any MCP client (Claude Desktop, Cowork, Cursor, …) at it and your agent can query prediction-market data directly.
Tools
Tool | What it does |
| Top active markets by liquidity or 24h volume. Returns question, conditionId, outcome→tokenId mapping, negRisk flag, event, liquidity, volume, best bid/ask, spread. Filters: |
| Live CLOB order book(s) for one or more outcome token ids. Sorted bids/asks + best bid/ask, spread, midpoint. |
| Resolve a |
| On-chain-verified resolution: derives |
Related MCP server: Polymarket MCP Server
Install & run
Requires Node 18+ (uses the built-in fetch).
npm install
npm run buildAdd to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"polymarket": { "command": "node", "args": ["/absolute/path/to/polymarket-mcp/dist/server.js"] }
}
}Then ask your agent things like "what are the most active Polymarket markets right now?" or "get the order book for this token id".
Try it without a client
npm run build && npm run smoke # drives the server over stdio against live APIsTests
npm test # unit tests for the ABI encoders — pure, no networkThe encoder tests are deliberately network-free so they run anywhere. The API
and on-chain paths are verified against live endpoints by hand (see npm run smoke), since CI has no route to Polymarket or a Polygon RPC.
Config (all optional)
Env | Default |
|
|
|
|
|
|
| (unset) — required only for |
Picking a Polygon RPC
The tool only needs eth_blockNumber and eth_call, so a free keyless endpoint
is enough. Verified working without an API key:
export POLYGON_RPC_URL="https://polygon-bor-rpc.publicnode.com"https://polygon.drpc.org and https://1rpc.io/matic also answer keyless.
Note that https://polygon-rpc.com and https://rpc.ankr.com/polygon now
return 401 / Unauthorized and require an account.
Passing the optional block argument reads historical state, which needs an
archive node — most free endpoints reject it (publicnode returns "Archive
requests require a personal token"). The tool surfaces that as an error rather
than pretending the token is unregistered. Omit block to read latest.
Notes
Read-only. No trading, no orders, no keys. It reads public data.
Every fetch has a hard timeout + backstop so a stalled upstream can't hang the server.
This is a data-access tool, not trading advice. Prices and books are live public data; verify before acting on them.
License
MIT
Available Tools
4 toolspolymarket_get_marketsA
List active Polymarket markets, cleaned and NegRisk-resolved. Returns question, conditionId, outcome→tokenId mapping, negRisk flag, event, liquidity, 24h volume, best bid/ask and spread. Use to discover markets or get token ids for the orderbook tool.
Inputs: limit, contains, order_by, min_liquidity, +1 more.
polymarket_get_orderbookA
Live CLOB order book(s) for one or more outcome token ids. Returns sorted bids/asks with best bid/ask, spread and midpoint. Get token ids from polymarket_get_markets or polymarket_resolve_token.
Inputs: token_id, token_ids.
polymarket_resolve_tokenB
Resolve an outcome token id, conditionId, or market slug to its market and outcome mapping (which outcome the token is, its label, index, and the sibling outcomes). The lookup the raw APIs make painful.
Inputs: slug, token_id, condition_id.
polymarket_resolve_token_onchainA
Resolve a token id to conditionId + outcomeIndex from Polygon ground truth (reads the CTF Exchange registry and derives ConditionalTokens position ids), not the Gamma API. Returns block provenance and verification level (fully_verified / pair_only for NegRisk). Requires env POLYGON_RPC_URL (a free public/free-tier Polygon RPC works).
Inputs: token_id (required), block.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
get_markets and get_orderbook are clearly separated by resource (market metadata vs. book data), and resolve_token vs. resolve_token_onchain are distinguished by data source (Gamma API vs. Polygon on-chain). The two resolve tools still cover nearly the same intent, so an agent may need the description text to pick correctly, but the boundaries are documented.
All four tools follow a uniform polymarket_<verb>_<noun> pattern with snake_case throughout. The server prefix and verb style are consistent, and the _onchain suffix on the last tool is a readable, predictable variant rather than a convention break.
Four tools is lean for a market-data server but each one earns its place: discovery, live book, token resolution, and on-chain verification. It sits at the low end but is not thin given the read-only scope.
The surface covers market discovery, order book, and token resolution, but there is no price/trade history, no market-detail lookup by id or slug beyond resolution, and no event or position data. These are notable gaps for agents that need more than a snapshot.
Maintenance
Related MCP Connectors
Read-only Polymarket search, market details, order books, price history, and market cards.
Polymarket in your AI: market rules, real fill costs, who is trading, top traders. Read-only.
Fetches live Polymarket prediction market orderbooks, implied Yes/No probabilities, volume, and wh
Fetches live Polymarket prediction market orderbooks, implied Yes/No probabilities, volume, and w.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables access to Polymarket's prediction markets for analyzing market probabilities, trading activity, and event outcomes across politics, sports, crypto, and other categories through natural language queries.10ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query Polymarket prediction markets, accessing real-time odds, market data, price history, order books, and trending markets across categories like politics, crypto, and sports through natural language.7MIT
- AlicenseBqualityDmaintenanceEnables comprehensive read access to Polymarket prediction market data, including live prices, order books, and market statistics. It allows AI assistants to analyze events, search markets, and monitor real-time signals without requiring API keys or authentication.221MIT
- FlicenseNot gradedqualityBmaintenanceEnables interaction with Polymarket prediction markets through read-only access to market data, events, orderbooks, and user positions, plus authenticated trading capabilities for creating and managing orders.1-