The Graph logo

The Graph

Query indexed blockchain data and inspect subgraph schemas through The Graph’s GraphQL network over MCP.

Install The Graph

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "the-graph": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-the-graph"
      ],
      "env": {
        "PIPEWORX_API_KEY": "YOUR_VALUE_HERE",
        "PIPEWORX_META_TOOLS": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env PIPEWORX_API_KEY=YOUR_VALUE_HERE --env PIPEWORX_META_TOOLS=YOUR_VALUE_HERE --transport stdio the-graph -- npx -y @pipeworx/mcp-the-graph

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

The Graph MCP server exposes The Graph’s indexed blockchain data through GraphQL tools for MCP clients. It can run arbitrary queries against a selected subgraph and retrieve that subgraph’s schema through introspection. Use it when an agent needs structured blockchain data from a known subgraph, including the schema needed to construct queries. Connections can use the hosted Pipeworx gateway or a local npm stdio bridge.

Use cases

  • Query indexed blockchain entities from a selected subgraph
  • Inspect a subgraph schema before generating GraphQL
  • Build agent workflows around pools, tokens, or other indexed data
  • Route natural-language data requests through the Pipeworx gateway

Key features

  • Run arbitrary GraphQL queries against The Graph subgraphs
  • Inspect types, fields, and arguments with schema introspection
  • Accept deployment hashes in Qm and 0x formats
  • Support hosted MCP, local stdio, and HTTP access
  • Pass GraphQL variables and return query errors

Tools2

What The Graph lets your agent do. Expand a tool for its parameters.

Verified live~493 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/17 checks healthy over the last 89d

What it can do

From the 2 tools this server returned when we ran it; 2 declare their own safety hints.

Handles credentials · 2Makes network requests · 2Read-only tools · 2
Network at startup4 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age177 days
Maintainers1

Observed 2026-11-06 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · @pipeworx/mcp-the-graph (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads617Package downloads in the last 30 days.
Last commit26d agoMost recent push to the default branch.
Tools exposed2Callable tools this server registers over MCP.

How The Graph works

What The Graph MCP server does

The Graph MCP server connects MCP clients to subgraphs on The Graph network. It provides access to indexed blockchain data through GraphQL rather than requiring an agent to work with chain nodes directly. A subgraph is selected by its deployment identifier, which may use the older Qm… form or the newer 0x… identifier shown in The Graph Explorer.

The integration is an independent, unofficial connection operated through Pipeworx. It is intended for agents that need to read data exposed by The Graph subgraphs, such as entities and fields defined by a specific subgraph.

How it works

The hosted MCP endpoint is:

https://gateway.pipeworx.io/the-graph/mcp

A full Pipeworx gateway endpoint is also available at https://gateway.pipeworx.io/mcp. Both route requests through the same gateway and data sources. The pack endpoint lists The Graph tools together with shared Pipeworx meta-tools; the exact scope is reported in the MCP initialize response. The ask_pipeworx meta-tool can route natural-language requests across the wider catalog.

The server also supports a local stdio bridge installed from npm. The bridge forwards calls to the hosted gateway, so it requires network access and has no offline mode. Calls can also be made over HTTP through the gateway’s tool endpoint.

Setup and configuration

For a hosted MCP connection, add the endpoint to an MCP client configuration:

config.json
{
  "mcpServers": {
    "the-graph": {
      "url": "https://gateway.pipeworx.io/the-graph/mcp"
    }
  }
}

The npm option uses npx:

config.json
{
  "mcpServers": {
    "the-graph": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-the-graph"]
    }
  }
}

Anonymous npm-bridge calls are limited to 50 per day. Setting PIPEWORX_API_KEY provides an authenticated Pipeworx connection with a higher daily allowance. Set PIPEWORX_META_TOOLS=1 if the local bridge should list the shared gateway tools as well as The Graph tools.

The Graph operations accept a user-supplied API key through the _apiKey argument. Keys can be obtained from The Graph’s API key page. The gateway also supports a platform key configured as PLATFORM_THEGRAPH_KEY on the gateway side.

Tools and capabilities

  • query_subgraph runs an arbitrary GraphQL query against a selected deployment. It accepts subgraph_id, query, and optional GraphQL variables, and returns the GraphQL data block together with any errors.
  • introspect_schema requests a subgraph’s schema using standard GraphQL introspection. Its output includes types, fields, and arguments, helping an agent construct valid queries without consulting separate schema documentation.

Subgraph identifiers can be found in The Graph Explorer. The query URL for a subgraph ends with /subgraphs/id/<id>.

Limitations and notes

The legacy hosted service is no longer used; requests route through The Graph’s decentralized network gateway at gateway-arbitrum.network.thegraph.com. The integration requires network access. Pack endpoints currently include shared Pipeworx meta-tools, so the tool list can be larger than the two The Graph-specific operations. The integration is not affiliated with or endorsed by The Graph.

The package is licensed under MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about The Graph

The Graph is an MCP server that connects AI clients to The Graph’s indexed blockchain subgraphs. Its main tools, `query_subgraph` and `introspect_schema`, run GraphQL queries and retrieve schemas, including types, fields, and arguments, so agents can discover and request structured on-chain data.

Install it through an MCP client using the hosted URL or the npm stdio bridge. Use `https://gateway.pipeworx.io/the-graph/mcp` for a remote connection, or run `npx -y @pipeworx/mcp-the-graph` with the corresponding command configuration.

Pass your The Graph API key as the `_apiKey` tool argument. The npm bridge can separately use `PIPEWORX_API_KEY` for authenticated Pipeworx access, while the gateway supports `PLATFORM_THEGRAPH_KEY` as a platform-side configuration.

Find the identifier in The Graph Explorer or at the end of a subgraph query URL. The deployment ID appears after `/subgraphs/id/` and may start with `Qm` or use the newer `0x` format.

Yes, The Graph works with Cursor through the hosted MCP endpoint or the local npm stdio bridge. Add the endpoint or command to Cursor’s MCP configuration, then call the subgraph query and schema introspection tools.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewThe Graph AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/the-graph?style=directory)](https://allmcps.com/mcp/the-graph)
HTML Embed
<a href="https://allmcps.com/mcp/the-graph"><img src="https://allmcps.com/api/badge/the-graph?style=directory" alt="The Graph on AllMCPs" /></a>