# The Graph [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/pipeworx-io/mcp-the-graph  
**GitHub Stars:** 0  
**npm Downloads (last month):** 617  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/the-graph

## Description
The Graph MCP — indexed blockchain data via subgraph GraphQL queries

## Tools
Capabilities this server exposes over MCP:

- **query_subgraph** — Run a GraphQL query against a subgraph on The Graph network. subgraph_id is the deployment hash (starts with "Qm…" or the new "0x…" subgraph ID from thegraph.com/explorer). Returns the GraphQL `data` block plus any errors. Requires your own The Graph API key, passed as _apiKey.
- **introspect_schema** — Fetch a subgraph's GraphQL schema via standard introspection. Returns types, fields, and arguments so an agent can build queries without external docs. Requires your own The Graph API key, passed as _apiKey.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "the-graph": {
    "command": "npx",
    "args": ["-y","@pipeworx/mcp-the-graph"],
    "env": {
      "PIPEWORX_API_KEY": "",
      "PIPEWORX_META_TOOLS": ""
    }
  }
}
```

**Requires environment variables:** `PIPEWORX_API_KEY`, `PIPEWORX_META_TOOLS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## 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:

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

The npm option uses `npx`:

```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.

_Full upstream README: https://allmcps.com/mcp/the-graph/readme_

