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 Server?

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

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

Credentials and setup notes

  • A Gateway API key for The Graph Network.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Subgraph MCP Server

{
  "mcpServers": {
    "subgraph-mcp": {
      "command": "/path/to/subgraph-mcp",
      "env": {
        "GATEWAY_API_KEY": "YOUR_GATEWAY_API_KEY",
        "SUBGRAPH_REQUEST_TIMEOUT_SECONDS": "300"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • A Gateway API key for The Graph Network.
VariableDescriptionRequired
GATEWAY_API_KEYDeclared in the maintainer’s client configuration.Check documentation
SUBGRAPH_REQUEST_TIMEOUT_SECONDSDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

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

Frequently asked questions

A Model Context Protocol (MCP) server that allows LLMs to interact with Subgraphs available on The Graph Network. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.