If you’ve ever wanted to ask blockchain data questions in plain English without worrying about GraphQL syntax, query limits, or which subgraph to use, know Subgraph MCP is the missing piece.
In this guide, you’ll learn how to:
Get an API key from The Graph MarketplaceConfigure Subgraph MCP in Cursor or Claude DesktopUnderstand how this unlocks ~15,000 subgraphs for natural‑language querying
No custom queries. No rate‑limit anxiety. Just ask questions.
What is Subgraph MCP?
Subgraph MCP (Model Context Protocol) lets large language models (LLMs) reason about and query subgraphs on your behalf.
Instead of writing GraphQL yourself, you:
Ask a question in natural languageThe LLM selects the best subgraph or you can ask it to use a subgraph based on deployment IDIt generates and runs the query. It reads the schema to know what content each subgraph has.You get structured results back
All powered by The Graph’s decentralized data layer.
Why Subgraph MCP Matters
Without MCP:
You must know which subgraph to use. This requires a lot of filtering and searching.You must write correct GraphQL query.You must manage API limits and errors.
With Subgraph MCP:
One API key gives access to ~15,000 subgraphsThe LLM chooses the right schema automaticallyQueries are handled safely and efficientlyYou focus on questions, not infrastructure
This is what makes “chatting with blockchain data” actually practical.
Step 1: Get an API Key from The Graph Marketplace
Subgraph MCP uses an API key.
1. Create an API Key with The Graph
https://medium.com/media/376d9fbba1e2db2c1dafd44cc9b99c05/href
⚠️ Treat this like a password. Anyone with this token can query on your behalf.
Step 2: Download Cursor
Graph Docs
https://thegraph.com/docs/en/ai-suite/subgraph-mcp/cursor/
Cursor Quickstart docs
https://cursor.com/docs/get-started/quickstart
Step 3. Configure Subgraph MCP in Cursor
Head to settings:
Click on Tools and MCPs:
Cursor supports MCP via a simple JSON config.
Paste the following JSON and replace Bearer GATEWAY_API_Key
*use your API Key from above
{
“mcpServers”: {
“subgraph”: {
“command”: “npx”,
“args”: [“mcp-remote”, “–header”, “Authorization:${AUTH_HEADER}”, “https://subgraphs.mcp.thegraph.com/sse”],
“env”: {
“AUTH_HEADER”: “Bearer GATEWAY_API_KEY”
}
}
}
}
Step 4. Save and Restart Cursor
Once enabled, Cursor can now:
Discover subgraph schemasGenerate queries automaticallyExecute them securely
Configure Subgraph MCP in Claude Desktop
Claude Desktop uses the same MCP concept with a local config file.
Graph Docs for Claude
https://thegraph.com/docs/en/ai-suite/subgraph-mcp/claude/
1. Install Claude Desktop
https://medium.com/media/05df3b28f86791fefa297db1aeb48254/href
2. Add the Subgraph MCP Server
Paste the following JSON and replace Bearer GATEWAY_API_Key
*use your API Key from above
{
“mcpServers”: {
“subgraph”: {
“command”: “npx”,
“args”: [“mcp-remote”, “–header”, “Authorization:${AUTH_HEADER}”, “https://subgraphs.mcp.thegraph.com/sse”],
“env”: {
“AUTH_HEADER”: “Bearer GATEWAY_API_KEY”
}
}
}
}https://medium.com/media/5d8398ebce74de2ba11bd7f9c4c976b5/href
3. Restart Claude Desktop
Claude will now be able to:
Inspect thousands of subgraph schemasChoose the correct one automaticallyRun queries safely on your behalfhttps://medium.com/media/aa414b5222748ce81b82969ed63e520c/href
What You Can Ask Once It’s Set Up
After setup, you can ask questions like:
“What was Uniswap v3 volume on Base yesterday?”“Show me the top token holders for this ERC‑20.”“How many users interacted with this contract last week?”“What’s the TVL change for this protocol over 30 days?”
You don’t need to:
Know the subgraph nameKnow the deployment ID (it does help to point AI to deployment ID).Write queries
The LLM handles all of it.
Final Thoughts
Subgraph MCP turns The Graph into a conversational data layer.
With a single question:
You unlock ~15,000 subgraphsYou eliminate boilerplate queriesYou let LLMs do what they’re good at: reasoning
If you’re building dashboards, bots, research tools, or just exploring on‑chain data this is the fastest path from question to answer.
Talk to 15,000+ Subgraphs: Setting Up Subgraph MCP in Cursor or Claude Desktop was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.
