Subgraph MCP Server

A Model Context Protocol (MCP) server that allows LLMs to interact with Subgraphs available on The Graph Network.

Remote serverstreamable-http

What is the Subgraph MCP MCP server?

Connect Subgraph MCP to Claude, Cursor or any other MCP client and it stops being a tab you switch to. A Model Context Protocol (MCP) server that allows LLMs to interact with Subgraphs available on The Graph Network. The subgraph mcp mcp server is what makes that connection.

What the server does

  • Get the GraphQL schema for any subgraph/deployment
  • Execute GraphQL queries against any subgraph/deployment
  • Find the top subgraph deployments for a contract address on a specific chain
  • Search for subgraphs by keyword
  • Get 30-day query volume for subgraph deployments
  • Supports MCP resources, tools, and prompts

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • Requirements — The Requirements tool exposed by this server
  • Configuration — Add the following to your configuration file of your client (e.g.,claude_desktop_config.json):

Credentials and setup notes

Configuration is passed through the environment: AUTH_HEADER, GATEWAY_API_KEY, SUBGRAPH_REQUEST_TIMEOUT_SECONDS, YOUR_GATEWAY_API_KEY, METRICS_HOST. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • A Gateway API key for The Graph Network.

Installation

Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

Where it fits

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. Subgraph MCP's toolset — Requirements, Configuration — is a fair guide to whether it matches your workflow. It is maintained by graphops; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Subgraph MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
RequirementsThe Requirements tool exposed by this server.
ConfigurationAdd the following to your configuration file of your client (e.g.,claude_desktop_config.json):

How to install the Subgraph MCP MCP server

{
  "mcpServers": {
    "subgraph-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "--header",
        "Authorization:${AUTH_HEADER}",
        "https://subgraphs.mcp.thegraph.com/sse"
      ],
      "env": {
        "AUTH_HEADER": "Bearer YOUR_GATEWAY_API_KEY" // <-- Replace with your actual key
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • A Gateway API key for The Graph Network.
VariableDescriptionRequired
AUTH_HEADERConfiguration value read at startup.Optional
GATEWAY_API_KEYCredential the server authenticates with.Yes
SUBGRAPH_REQUEST_TIMEOUT_SECONDSConfiguration value read at startup.Optional
YOUR_GATEWAY_API_KEYCredential the server authenticates with.Yes
METRICS_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • Use Subgraph MCP to Requirements.
  • Use Subgraph MCP to Configuration.

Frequently asked questions

It connects Subgraph MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 2 tools (Requirements, Configuration) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Subgraph MCP directly.