Graph Polymarket MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "GRAPH_API_KEY=${GRAPH_API_KEY}" graph-polymarket -- npx -y graph-polymarket-mcp
Required:GRAPH_API_KEY+ 1 optional
README.md

Query Polymarket prediction market data via The Graph subgraphs

graph-polymarket-mcp

MCP server for querying Polymarket prediction market data via The Graph subgraphs.

Exposes 20 tools that AI agents (Claude, Cursor, etc.) can use to query market data, trader P&L, positions, activity, orderbook trades, open interest, market resolution status, and trader profiles.

v1.6.0 — five tools now cross-query multiple subgraphs in parallel to flag unreliable P&L, dead-money OI, and orderbook-only wallets that would otherwise produce misleading data.

Published to the MCP Registry as io.github.PaulieB14/graph-polymarket-mcp

Prerequisites

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

Installation

npm install -g graph-polymarket-mcp

Or use directly with npx:

npx graph-polymarket-mcp

Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "graph-polymarket": {
      "command": "npx",
      "args": ["-y", "graph-polymarket-mcp"],
      "env": {
        "GRAPH_API_KEY": "your-api-key-here"
      }
    }
  }
}

Claude Code

claude mcp add graph-polymarket -- npx -y graph-polymarket-mcp

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)

Start the server with the HTTP transport:

# Dual transport — stdio + SSE on port 3851
GRAPH_API_KEY=your-key npx graph-polymarket-mcp --http

# SSE only (for remote/server deployments)
GRAPH_API_KEY=your-key npx graph-polymarket-mcp --http-only

# Custom port
MCP_HTTP_PORT=4000 GRAPH_API_KEY=your-key npx graph-polymarket-mcp --http

Then point your agent at the SSE endpoint:

{
  "mcpServers": {
    "graph-polymarket": {
      "url": "http://localhost:3851/sse"
    }
  }
}

Transport Modes

Invocation Transports Use case
npx graph-polymarket-mcp stdio Claude Desktop, Cursor, Claude Code
npx graph-polymarket-mcp --http stdio + SSE :3851 Dual — local + remote agents
npx graph-polymarket-mcp --http-only SSE :3851 OpenClaw, remote deployments

A /health endpoint is available at http://localhost:3851/health when HTTP transport is active.

Available Tools

Core Tools

Tool Description
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

Domain-Specific Tools

Tool Description Subgraphs
get_market_data Get market/condition data with outcomes and resolution status Main
get_global_stats Get platform stats: market counts + real volume/fees/trades Main + Orderbook
get_account_pnl Get a trader's P&L and performance metrics (winRate, profitFactor, maxDrawdown) Beefy P&L
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. Beefy P&L + Orderbook
get_daily_stats Daily volume, fees, trader counts, and market activity (1–90 days) Beefy P&L
get_market_positions Top holders for a specific outcome token with their P&L Beefy 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. Slimmed P&L + Orderbook
get_recent_activity Unified chronological feed interleaving splits, merges, and redemptions with orderbook fills. Supports optional address filter. Activity + Orderbook
get_orderbook_trades Get

Tools (12)

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
get_top_tradersLeaderboard ranked by PnL, winRate, volume, or profitFactor
get_daily_statsDaily volume, fees, trader counts, and market activity
get_market_positionsTop holders for a specific outcome token with their P&L
get_user_positionsCurrent token positions for a user
get_recent_activityUnified chronological feed interleaving splits, merges, and redemptions
get_orderbook_tradesGet orderbook trade history

Environment Variables

GRAPH_API_KEYrequiredAPI key from The Graph Studio
MCP_HTTP_PORTCustom port for HTTP transport

Configuration

claude_desktop_config.json
{"mcpServers": {"graph-polymarket": {"command": "npx", "args": ["-y", "graph-polymarket-mcp"], "env": {"GRAPH_API_KEY": "your-api-key-here"}}}}

Try it

What is the current P&L and win rate for the trader with address 0x123...?
Show me the top 10 traders on Polymarket ranked by profit factor.
Get the recent activity feed for my account 0xabc... and include orderbook trades.
What are the current market positions and P&L for the outcome token in market 0xxyz...?
Provide a summary of daily platform volume and fees over the last 30 days.

Frequently Asked Questions

What are the key features of Graph Polymarket?

Query Polymarket market data, trader P&L, and user positions. Cross-query multiple subgraphs to flag unreliable data. Unified activity feed including splits, merges, and orderbook fills. Support for both stdio and SSE transport modes. Access to platform-wide global stats and leaderboard data.

What can I use Graph Polymarket for?

Analyzing personal trading performance and P&L metrics on Polymarket. Identifying top-performing traders and their strategies. Monitoring market resolution status and open interest for specific markets. Auditing orderbook activity versus on-chain position data. Building automated dashboards for Polymarket platform statistics.

How do I install Graph Polymarket?

Install Graph Polymarket by running: npm install -g graph-polymarket-mcp

What MCP clients work with Graph Polymarket?

Graph Polymarket works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Graph Polymarket docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare