polymarket-book-mcp
Click on "Install 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-book-mcpCan you pull the order book for the 'Will Bitcoin reach $100k by 2025?' market?"
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-book-mcp
An MCP server that reads Polymarket order books, market metadata, and price history.
No private key, no trading, read-only. This package never imports
py_clob_client, web3, or eth_account, never reads a wallet key, and
never sends a POST or DELETE to any order endpoint. It only issues GET
requests to Polymarket's public Gamma and CLOB APIs, the same endpoints the
website itself uses to show you a book. There is no code path in here that
could place, modify, or cancel an order, because the client that would do
that was never written.
Why another one
A survey of existing Polymarket MCP servers turned up two patterns: some require a wallet private key to be configured just to read a public order book, which is a strange amount of trust to ask for a read-only operation; others expose market search or trade history but ship no order-book tool at all, which is the one piece of data a market-making or quoting workflow actually needs first. This package exists to fill that specific gap: order books, cleanly parsed, with no signing key anywhere in the dependency tree.
Related MCP server: polymarket-mcp
Install
uv venv
uv pip install -e .Usage with Claude Code / Claude Desktop
Point the config at the venv's Python interpreter directly:
{"mcpServers": {"polymarket": {"type": "stdio",
"command": "/absolute/path/to/polymarket-book-mcp/.venv/bin/python",
"args": ["-m", "polymarket_book_mcp.server"]}}}Or run it straight from GitHub with uvx, no local clone or install step:
uvx --from git+https://github.com/sunnywlad/polymarket-book-mcp polymarket-book-mcpTools
Tool | Parameters | Description |
|
| Keyword search via Polymarket's real search backend. Results are interleaved across matching events, so a query like |
|
| Live order book for one outcome token: best bid/ask, mid, spread, top N levels per side with cumulative size and notional. The central tool. |
|
| Resolve a market URL or slug into its question, condition_id, per-outcome token ids, tick size, LP reward band, and status flags. |
|
| Cheap price check: best_bid, best_ask, mid, spread only. |
|
| Historical price series for one outcome token, plus a min/max/first/last summary. |
Data sources
Every network call this server makes, so you can verify it yourself:
GET https://gamma-api.polymarket.com/public-search— market/event search (backssearch_markets).GET https://gamma-api.polymarket.com/markets?slug=...— slug to conditionId (backsget_market).GET https://clob.polymarket.com/book?token_id=...— live order book (backsget_order_book,get_quote).GET https://clob.polymarket.com/markets/{condition_id}— market/token metadata (backsget_market).GET https://clob.polymarket.com/prices-history?market=...— historical prices (backsget_price_history).
Both APIs are public and require no authentication for these read paths.
Notes on the Polymarket API
A few behaviors worth knowing if you're building on these endpoints yourself, each reproduced directly against the live API:
clobTokenIdsandoutcomesare JSON-encoded strings, not arrays. A Gamma market object contains"clobTokenIds": "[\"5144...\", \"6848...\"]", a string that happens to look like a JSON array, not an actual array. Code that calls.mapor iterates on it directly will throw or silently do nothing. It needs ajson.loadsfirst, with a fallback for malformed or missing values.GET /markets?search=...is a no-op. It silently ignores thesearchparameter and returns an unrelated page of markets. The only endpoint that actually implements search isGET /public-search?q=..., the one behind the website's search box.The order book's price levels are not sorted the way you'd expect.
GET /bookreturns bothbidsandasksin ascending price order. For asks that puts the best price (lowest ask) first, which looks correct and invites indexingasks[0]. For bids, ascending order puts the best price (highest bid) last:bids[0]is the worst bid in the book, not the touch. Both sides need an explicit sort before you can trust[0].events_status=activedoes not fully filter./public-searchstill returns closed markets when asked for active ones, so the market's ownclosedflag has to be re-checked client-side.One-sided books are normal, not errors. Illiquid, closed, or resolving markets routinely return an empty
bidsorasksarray with HTTP 200. Best bid, best ask, mid, and spread all have to degrade to null rather than raising, and mid/spread need both sides to mean anything./prices-historytakes a token id in a parameter namedmarket. Passing an actual condition_id there returns an empty history with no error, which reads like a market with no trading rather than a bad call.
Note on the MCP Python SDK version
The mcp dependency is pinned >=1.9,<2 deliberately. SDK 2.0.0 removed the
Server.list_tools decorator, so any server written against the 1.x
low-level API dies at startup with
AttributeError: 'Server' object has no attribute 'list_tools'. If you are
debugging that error in another MCP server, an unbounded mcp>=1.0.0 pin in
its dependencies is very likely the cause.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceRead-only MCP server for investigating Polymarket wallets, markets, and cross-wallet patterns using 21 tools backed by public APIs and an optional SQLite cache.Last updatedMIT
- FlicenseAqualityBmaintenanceAI-agent ready FastMCP server for Polymarket market discovery, wallet analytics, and public CLOB data, providing a read-only interface for querying markets, wallets, and order books.Last updated22
- AlicenseAqualityBmaintenanceA read-only MCP server exposing Polymarket's public prediction-market data. Search markets, read live odds and order books, pull historical probability time-series, and inspect public wallet positions.Last updated14MIT
- Alicense-qualityBmaintenanceA read-only MCP server for Hyperliquid that provides public market data (prices, order books, funding) and any wallet's positions, orders, and fills via MCP tools, without requiring a private key.Last updatedMIT
Related MCP Connectors
Polymarket MCP — prediction-market data via Gamma + CLOB public APIs.
Read-only MCP server for live Polymarket, Kalshi, Limitless odds; Manifold sentiment.
Read-only MCP server for Robinhood Chain token discovery, research, and due diligence via GMGN.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sunnywlad/polymarket-book-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server