
Graph Polymarket Mcp
io.github.PaulieB14Published by GitHub account PaulieB14v1.4.0Updated Nov 3, 2026
Query Polymarket prediction markets via The Graph — 20 tools, 8 subgraphs
Overview
Queries Polymarket prediction markets through The Graph subgraphs and Polymarket REST APIs, exposing market search, live prices, order books and trader…
- What you can do
- Search and browse markets and events, and read market metadata and resolution status
- Fetch live CLOB prices, spreads, order books, last trade and price history
- Query on-chain analytics: global stats, daily stats, open interest and OI history
- Inspect traders: P&L, positions, top-trader leaderboards, activity feeds, USDC flows and profiles
- Run custom GraphQL queries against any listed subgraph and check subgraph freshness
- Read V2 builder leaderboards and builder-routed fills
- When to use it
- Useful when you want an assistant to research prediction markets, check live odds and liquidity, or analyze on-chain trader performance and open interest without writing GraphQL by hand.
- Requirements
- Runs locally over stdio via npx or a global npm install (Node.js). A free Graph API key in GRAPH_API_KEY is needed for the subgraph tools; the Polymarket REST tools work without it. Optional HTTP/SSE mode uses port 3851 by default, configurable with MCP_HTTP_PORT.
Installation
In SourceWeft
- Open Graph Polymarket Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
graph-polymarket-mcp
[npm version] [MCP Registry] [smithery badge]
[Image]MCP server for querying Polymarket prediction market data via The Graph subgraphs and Polymarket REST APIs.
Exposes 31 tools that AI agents (Claude, Cursor, etc.) can use to search markets, get real-time CLOB prices and order books, query on-chain data, trader P&L, positions, activity, open interest, market resolution status, and trader profiles.
v2.0.0 — adds 10 new tools powered by Polymarket's Gamma and CLOB APIs (inspired by polymarket-cli): market search, event browsing, live prices, spreads, order books, price history, and more. No API key needed for these tools — they hit Polymarket's public REST endpoints directly.
Published to the MCP Registry as
io.github.PaulieB14/graph-polymarket-mcp
Prerequisites
You need a free Graph API key (takes ~2 minutes):
- Go to The Graph Studio
- Connect your wallet (MetaMask, WalletConnect, etc.)
- Click "API Keys" in the sidebar and create one
- Free tier includes 100,000 queries/month
Installation
Or use directly with npx:
Configuration
Claude Desktop
Add to your claude_desktop_config.json:
Claude Code
Set the environment variable GRAPH_API_KEY before running.
Cursor / Other MCP Clients
Use the stdio transport with npx graph-polymarket-mcp as the command, passing GRAPH_API_KEY as an environment variable.
OpenClaw / Remote Agents (SSE)
The SSE transport has no authentication. Anyone who can reach the port can call every tool, and those calls spend your
GRAPH_API_KEYquota.--httpbinds0.0.0.0inside a container, so publish it to127.0.0.1on the host and put a reverse proxy with TLS and auth in front of anything reachable off-box. For local agents, prefer the default stdio transport — it has no network surface at all.
Start the server with the HTTP transport:
Then point your agent at the SSE endpoint:
Transport Modes
A /health endpoint is available at http://localhost:3851/health when HTTP transport is active.
Available Tools
Core Tools
Domain-Specific Tools
Polymarket REST API Tools (no Graph API key needed)
CLOB V2 Tools
Polymarket migrated to V2 exchange contracts on 2026-04-28. These tools read the V2 subgraphs, which index from block 84902353 and hold no pre-migration history — V1 and V2 are different eras, not old and new.
Builder attribution is the capability V2 adds. Every V2 fill carries the builder code of the
frontend, bot or integrator that routed it, so "who is actually routing this flow" becomes an
answerable question — 3,325 builders as of 2026-08-08.
Two traps these tools handle for you. The V2 exchange contracts appear as Account rows, because
the exchange is the taker when an order matches the book — ranking accounts naively returns
0xe111…996b (176M fills) and 0xe222…0f59 (41M fills) above every human. get_v2_top_traders
excludes them. check_subgraph_freshness reports any subgraph's head block before you trust a number.
Data Sources
The Graph Subgraphs (requires GRAPH_API_KEY)
On-chain indexed data — authoritative for historical analytics, P&L, open interest, and resolution status.
Subgraphs
CLOB V2 — primary (from block 84902353)
Status verified via _meta on 2026-10-15.
V1 — legacy (pre-2026-04-28 migration history)
Open Interest is already a V2 deployment; it reads ConditionalTokens, which V2 left unchanged, so it has no migration discontinuity.
Which era to ask: all-time or pre-2026-04-28 → V1. Post-migration activity, or anything about
builders → V2. beefy_pnl keeps the hedge-fund metrics (winRate, profitFactor, maxDrawdown, daily
series) that V2 P&L does not have, so trader-quality scoring stays on V1.
Example Queries
Once connected, an AI agent can:
Market Discovery (Gamma API)
- "Search for prediction markets about AI"
- "Show me the most active Polymarket events right now"
- "Find markets about the 2024 election sorted by volume"
- "What markets are in the 'crypto' category?"
Live Trading Data (CLOB API)
- "What's the current price for the Trump YES token?"
- "Show me the full order book for this market"
- "What's the bid-ask spread on this token?"
- "Show me the price history for this market over the last week"
On-Chain Analytics (The Graph)
- "What are the current Polymarket global stats?"
- "Show me the latest 20 orderbook trades"
- "What are the positions for address 0x...?" (flags if wallet entered via OB buys only)
- "Get the P&L for trader 0x...?"
- "Which markets have the most open interest right now?" (flags dead-money OI on resolved markets)
- "Show me disputed markets on Polymarket"
- "Who are the top traders?" (flags any with OB volume not captured by Beefy P&L)
- "Show me the full trading history for wallet 0x..." (includes OB fills + entry type classification)
Development
License
MIT
Source: README.md at commit f0790fb
Tools
0Version history
1- v1.4.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts