MCP server for querying Polymarket data via The Graph subgraphs
Graph MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MCP server for querying Polymarket data via The Graph subgraphs.
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.
Installation goes through your MCP client rather than a global install: point it at graph-polymarket-mcp on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
Once Graph is connected, these are the calls the assistant has available:
list_subgraphs — List all available Polymarket subgraphs with descriptions and key entitiesget_subgraph_schema — Get the full GraphQL schema for a specific subgraphquery_subgraph — Execute a custom GraphQL query against any subgraphget_market_data — Get market/condition data with outcomes and resolution statusget_global_stats — Get platform stats: market counts + real volume/fees/tradesget_account_pnl — Get a trader's P&L and performance metrics (winRate, profitFactor, maxDrawdown)get_top_traders — Leaderboard ranked by PnL, winRate, volume, or profitFactor. Cross-refs Orderbook to flag rows where OB volume exceeds Beefy-tracked volume andget_daily_stats — Daily volume, fees, trader counts, and market activity (1–90 days)get_market_positions — Top holders for a specific outcome token with their P&Lget_user_positions — Current token positions. Cross-refs Orderbook: flags ⚠ orderbook-only entry when totalBought=0 but OB volume exists, and ⚠ mixed entry when OB volumeget_recent_activity — Unified chronological feed interleaving splits, merges, and redemptions with orderbook fills. Supports optional address filterget_orderbook_trades — Get recent order fills with maker/taker filteringYou will need one environment variable: GRAPH_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
You need a free Graph API key (takes ~2 minutes): 1. Go to The Graph Studio 2. Connect your wallet (MetaMask, WalletConnect, etc.) 3. Click "API Keys" in the sidebar and create one 4. Free tier includes 100,000 queries/month
This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Graph's toolset — list_subgraphs, get_subgraph_schema, query_subgraph and 11 more — is a fair guide to whether it matches your workflow. It is maintained by PaulieB14; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Graph's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| list_subgraphs | List all available Polymarket subgraphs with descriptions and key entities |
| get_subgraph_schema | Get the full GraphQL schema for a specific subgraph |
| query_subgraph | Execute a custom GraphQL query against any subgraph |
| get_market_data | Get market/condition data with outcomes and resolution status |
| get_global_stats | Get platform stats: market counts + real volume/fees/trades |
| get_account_pnl | Get a trader's P&L and performance metrics (winRate, profitFactor, maxDrawdown) |
| get_top_traders | Leaderboard ranked by PnL, winRate, volume, or profitFactor. Cross-refs Orderbook to flag rows where OB volume exceeds Beefy-tracked volume and surface OB-only traders absent from the leaderboard. |
| get_daily_stats | Daily volume, fees, trader counts, and market activity (1–90 days) |
| get_market_positions | Top holders for a specific outcome token with their P&L |
| get_user_positions | Current token positions. Cross-refs Orderbook: flags ⚠ orderbook-only entry when totalBought=0 but OB volume exists, and ⚠ mixed entry when OB volume > 2× split collateral. |
| get_recent_activity | Unified chronological feed interleaving splits, merges, and redemptions with orderbook fills. Supports optional address filter. |
| get_orderbook_trades | Get recent order fills with maker/taker filtering |
| get_market_open_interest | Top markets ranked by USDC locked in outstanding positions. Cross-refs Main subgraph to flag ⚠ dead money OI on resolved markets (losing-side tokens that will never be redeemed on-chain). |
| get_oi_history | Hourly OI snapshots for a specific market (for charting trends) |
{
"mcpServers": {
"graph-polymarket": {
"command": "npx",
"args": ["-y", "graph-polymarket-mcp"],
"env": {
"GRAPH_API_KEY": "your-api-key-here"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
You need a free Graph API key (takes ~2 minutes): 1. Go to The Graph Studio 2. Connect your wallet (MetaMask, WalletConnect, etc.) 3. Click "API Keys" in the sidebar and create one 4. Free tier includes 100,000 queries/month
| Variable | Description | Required |
|---|---|---|
| GRAPH_API_KEY | Credential the server authenticates with. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.