# Thegraph MCP

> Thegraph MCP is an open-source MCP server for developer tools. MCP server that runs GraphQL queries against any indexed subgraph via The Graph gateway. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted
- **Repository:** https://github.com/mrfentmen/awesome-mcps
- **MCP Registry name:** io.github.mrfentmen/thegraph-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [crypto and web3](https://ai-powered.com/categories/crypto-and-web3)
- **Listing updated:** 2026-11-19

## About

Thegraph MCP is a stdio server published to npm as `thegraph-mcp` that connects AI clients to The Graph's gateway. Its registry entry describes it as a way to run GraphQL against any indexed subgraph, so an assistant can pull blockchain data that has already been indexed by a subgraph.

The server is one of the TypeScript MCP servers in the awesome-servers collection, whose README says most servers read public data without their own key, while those wrapping a vendor API need that vendor's key. The registry entry lists no environment variables for this package, and no remote endpoint is offered, so it runs locally over stdio.

It suits developers and analysts who want to query on-chain or protocol data from an MCP-compatible assistant without writing a separate integration.

## Features

- **GraphQL subgraph queries:** Executes GraphQL queries against subgraphs indexed by The Graph.
- **Gateway access:** Goes through The Graph gateway, so any indexed subgraph can be targeted.
- **Stdio transport:** Runs as a local process over stdio, compatible with MCP clients that launch local servers.
- **npm distribution:** Published as the npm package thegraph-mcp, version 1.0.0.
- **No declared env variables:** The registry entry lists no required environment variables.

## Good for

- Query on-chain protocol data from an AI assistant
- Explore a subgraph's entities through natural-language prompts
- Pull indexed blockchain metrics for analysis or reporting
- Prototype GraphQL queries against a subgraph before writing app code

## Install

### Claude Code (Terminal)

```sh
claude mcp add thegraph-mcp -- npx -y thegraph-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "thegraph-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "thegraph-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "thegraph-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "thegraph-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "thegraph-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "thegraph-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "thegraph-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "thegraph-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "thegraph-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "thegraph-mcp"
      ]
    }
  }
}
```

## FAQ

### How does this server connect to clients?

It uses the stdio transport; no remote endpoint is listed.

### How is it installed?

It is published on npm as thegraph-mcp, version 1.0.0.

### What does it do?

It runs GraphQL queries against any indexed subgraph through The Graph gateway.

### Does it require environment variables?

The registry entry lists none.

### Is Thegraph MCP free?

Yes. Thegraph MCP is open source, so you can use and self-host it for free.

### How do I add Thegraph MCP to Claude Code?

Run this command in your terminal: claude mcp add thegraph-mcp -- npx -y thegraph-mcp

### What are the best alternatives to Thegraph MCP?

The closest alternatives to Thegraph MCP are CGraph, Apollo MCP Server, Go Proxy MCP, Makefile MCP and MCPfinder - MCP Server Discovery.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [CGraph](https://ai-powered.com/mcp/cgraph): CGraph is an open-source MCP server for developer tools.
- [Apollo MCP Server](https://ai-powered.com/mcp/apollo-mcp-server): Apollo MCP Server is an open-source MCP server for developer tools.
- [Go Proxy MCP](https://ai-powered.com/mcp/go-proxy-mcp): Go Proxy MCP is an open-source MCP server for developer tools.
- [Makefile MCP](https://ai-powered.com/mcp/makefile-mcp-2): Makefile MCP is an open-source MCP server for developer tools.
- [MCPfinder - MCP Server Discovery](https://ai-powered.com/mcp/mcpfinder-mcp-server-discovery): MCPfinder - MCP Server Discovery is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/thegraph-mcp
