loading…
Search for a command to run...
loading…
An MCP server that powers AI agents with indexed blockchain data from The Graph.
An MCP server that powers AI agents with indexed blockchain data from The Graph.
An MCP server that powers AI agents with indexed blockchain data from The Graph.
Searches for subgraphs on The Graph Network by name or description. Uses the Network Subgraph's full-text search to find matching subgraphs, returning a list sorted by signal amount (highest first). Results include the subgraph's GraphQL schema, so agents can go directly from discovery to querying without a separate schema fetch.
Parameters:
searchQuery: The search term to find matching subgraphs (e.g., "uniswap", "aave", "ENS")Fetches the schema of a specified subgraph, providing AI agents with the context needed to generate GraphQL queries.
Parameters:
subgraphId: The subgraph ID (e.g., "QmZBQcF...")asText: Output format flagtrue: Returns human-readable GraphQL schemafalse: Returns JSON schema (default)Executes GraphQL queries against a specified subgraph. While queries are typically generated by AI, you can also manually craft your own.
Parameters:
subgraphId: The subgraph IDquery: GraphQL query stringInstall uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
Clone the Repository
git clone https://github.com/Data-Nexus-Web3/thegraph-mcp.git
Get an API Key
Sign up at The Graph Studio to get an API key (free for the first 100k queries)
Add the MCP Server
Claude Code:
claude mcp add -e THEGRAPH_API_KEY=your_api_key_here thegraph-mcp -- uv --directory path/to/thegraph-mcp run main.py
Claude Desktop / Other MCP Clients:
Add the following to your client's MCP config file (e.g. claude_desktop_config.json):
{
"mcpServers": {
"thegraph-mcp": {
"command": "uv",
"args": ["--directory", "path/to/thegraph-mcp", "run", "main.py"],
"env": {
"THEGRAPH_API_KEY": "your_api_key_here"
}
}
}
}
Here are some natural language prompts to trigger the tools:
This project is licensed under the MIT License. See the LICENSE file for details.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"thegraph-mcp": {
"command": "npx",
"args": []
}
}
}