OlympHill
thegraph-mcp logo

thegraph-mcpAn MCP server that powers AI agents with indexed blockchain data from The Graph.

(0)
Daniel NikulshynReviewed by Daniel Nikulshyn·Updated July 2026

Overview

TheGraph MCP Server is a server that powers AI agents with indexed blockchain data from The Graph. It provides tools for fetching subgraph schemas and executing GraphQL queries against subgraphs. The server is designed to be used with AI agents, but also allows for manual query crafting. The tool 'getSubgraphSchema' fetches the schema of a specified subgraph, which provides AI agents with the context needed to generate GraphQL queries. The schema can be returned in either human-readable GraphQL format or JSON schema format. The tool 'querySubgraph' executes GraphQL queries against a specified subgraph. These queries are typically generated by AI, but can also be manually crafted. The server requires configuration, including setting up an API key for The Graph. It is licensed under the MIT License.

Key features

  • getSubgraphSchema tool for fetching subgraph schemas
  • querySubgraph tool for executing GraphQL queries
  • Support for human-readable and JSON schema output formats
  • Configuration via client configuration file

Pricing

Model
Free
Category
MCP Servers
Rating
No reviews yet

Use cases

Schema Discovery

Fetching the schema of a specified subgraph to understand its data model and generate GraphQL queries

Data Querying

Executing GraphQL queries against a specified subgraph to retrieve specific blockchain data

AI-Powered Analysis

Using the MCP server with AI agents to analyze blockchain data and identify trends or patterns

Pros & Cons

Pros

  • Provides access to indexed blockchain data from The Graph
  • Allows for fetching subgraph schemas and executing GraphQL queries
  • Supports both human-readable and JSON schema output formats
  • Can be used with AI agents or for manual querying

Cons

  • Requires a The Graph API key for configuration
  • Limited information on scalability, performance, and reliability
  • No pre-built releases or packages available

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Q&A

How do I execute a custom query against a subgraph?

Use the querySubgraph tool, providing the subgraphId and a valid GraphQL query string. The tool will return the query results in JSON format.

Asked by Katarzyna Zielinska · Jan 6, 2026

What output formats are available for schemas?

The getSubgraphSchema tool can return the schema either as a human‑readable GraphQL string (when asText=true) or as a JSON schema (when asText=false).

Asked by Femi Adebayo · Dec 4, 2025

Can I use the server with my own AI agent?

Yes, the server is designed for AI agents. It exposes two tools: getSubgraphSchema to provide schema context and querySubgraph to execute GraphQL queries, which can be generated by an AI or crafted manually.

Asked by Piotr Baranowski · Dec 1, 2025

What is required to start using theGraph MCP Server?

You need to clone the repository, install dependencies, and set your The Graph API key in the client configuration file (THEGRAPH_API_KEY). Then run the server via the provided command.

Asked by Mohammed Al-Amin · Nov 20, 2025

Ask a question

MCP Servers alternatives