Overview
Features
getSubgraphSchema
Fetches the schema of a specified subgraph, providing context for generating GraphQL queries; supports asText to choose human-readable GraphQL schema or JSON schema.
querySubgraph
Executes GraphQL queries against a specified subgraph, enabling AI-generated or manual queries.
Schema output format option
asText flag lets users choose between a readable GraphQL schema (true) or a JSON schema (default) for getSubgraphSchema.
AI-ready subgraph data access
Provides AI agents with indexed blockchain data from The Graph to power informed querying and analysis.
Installation and client configuration
Includes clone-based setup and a sample client configuration showing how to register the MCP server (thegraph-mcp) with command, args, and THEGRAPH_API_KEY environment variable.
Prompts and usage examples
Includes extensive example prompts for schema queries, data queries, analysis tasks, and combined tasks to guide usage.
Who Is This For?
- AI developers:Build AI agents that query and analyze blockchain data from The Graph via subgraphs.
- Data scientists / researchers:Query and analyze indexed blockchain data using subgraphs for research and analytics.
- Subgraph developers / integrators:Integrate MCP-based querying into applications that rely on The Graph subgraphs.




