Graph MCP Server

MCP server for querying Polymarket data via The Graph subgraphs

Local serverstdioGo

What is the Graph MCP server?

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.

What you get

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.

Setting it up

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.

What the assistant can call

Once Graph is connected, these are the calls the assistant has available:

  • 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
  • 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
  • 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

Configuration and credentials

You 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

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Graph.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the graph mcp server does with a few real requests.

Choosing this one

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.

Available tools

ToolWhat it does
list_subgraphsList all available Polymarket subgraphs with descriptions and key entities
get_subgraph_schemaGet the full GraphQL schema for a specific subgraph
query_subgraphExecute a custom GraphQL query against any subgraph
get_market_dataGet market/condition data with outcomes and resolution status
get_global_statsGet platform stats: market counts + real volume/fees/trades
get_account_pnlGet a trader's P&L and performance metrics (winRate, profitFactor, maxDrawdown)
get_top_tradersLeaderboard 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_statsDaily volume, fees, trader counts, and market activity (1–90 days)
get_market_positionsTop holders for a specific outcome token with their P&L
get_user_positionsCurrent 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_activityUnified chronological feed interleaving splits, merges, and redemptions with orderbook fills. Supports optional address filter.
get_orderbook_tradesGet recent order fills with maker/taker filtering
get_market_open_interestTop 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_historyHourly OI snapshots for a specific market (for charting trends)

How to install the Graph MCP server

{
  "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.

Configuration

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

VariableDescriptionRequired
GRAPH_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Graph to list subgraphs.
  • Use Graph to get subgraph schema.
  • Use Graph to query subgraph.

Frequently asked questions

It connects Graph to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (list_subgraphs, get_subgraph_schema, query_subgraph, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Graph directly.