query_subgraph

Pack: the-graph · Endpoint: https://gateway.pipeworx.io/the-graph/mcp

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.

Parameters

NameTypeRequiredDescription
subgraph_idstringyesSubgraph deployment ID (look up at thegraph.com/explorer; e.g., Uniswap v3 Ethereum is “5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV”)
querystringyesGraphQL query string
variablesobjectnoOptional GraphQL variables object

Example call

curl -X POST https://gateway.pipeworx.io/the-graph/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_subgraph","arguments":{}}}'

Connect

Add this to your MCP client config, or use one-click install buttons:

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

See Getting Started for client-specific install steps.

Regenerated from source · build May 21, 2026