An MCP server that powers AI agents with indexed blockchain data from The Graph. 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 flag - true: Returns human-readable GraphQL schema - false: Returns JSON schema (default) Executes GraphQL queries
Add this skill
npx mdskills install kukapay/thegraph-mcpProvides clear blockchain data access with well-documented tools and helpful example prompts
1# TheGraph MCP Server23An MCP server that powers AI agents with indexed blockchain data from [The Graph](https://thegraph.com/).45<a href="https://glama.ai/mcp/servers/@kukapay/thegraph-mcp">6 <img width="380" height="200" src="https://glama.ai/mcp/servers/@kukapay/thegraph-mcp/badge" alt="TheGraph Server MCP server" />7</a>8910111213## Available Tools1415### 1. getSubgraphSchema16Fetches the schema of a specified subgraph, providing AI agents with the context needed to generate GraphQL queries.1718**Parameters:**19- `subgraphId`: The subgraph ID (e.g., "QmZBQcF...")20- `asText`: Output format flag21 - `true`: Returns human-readable GraphQL schema22 - `false`: Returns JSON schema (default)2324### 2. querySubgraph25Executes GraphQL queries against a specified subgraph. While queries are typically generated by AI, you can also manually craft your own.2627**Parameters:**28- `subgraphId`: The subgraph ID29- `query`: GraphQL query string303132## Installation33341. **Clone the Repository**35 ```bash36 git clone https://github.com/kukapay/thegraph-mcp.git37 ```382. **Client Configuration**39 ```json40 {41 "mcpServers": {42 "thegraph-mcp": {43 "command": "uv",44 "args": ["--directory", "path/to/thegraph-mcp", "run", "main.py"],45 "env": {46 "THEGRAPH_API_KEY": "your_api_key_here"47 }48 }49 }50 }51 ```5253## Example Prompts5455Here are some natural language prompts to trigger the tools:5657### Schema Queries58- "Show me the schema for subgraph QmZBQcF... in a readable format"59- "What's the structure of the QmZBQcF... subgraph? Please display it in GraphQL format"60- "I need to understand the data model of subgraph QmZBQcF..., can you fetch its schema?"6162### Data Queries63- "Find the top 5 tokens by trading volume in the last 24 hours from subgraph QmZBQcF..."64- "Show me all pairs with liquidity greater than 1 million USD in subgraph QmZBQcF..."65- "Get the latest 10 swap events from the QmZBQcF... subgraph, including token symbols and amounts"6667### Analysis Tasks68- "Analyze the trading volume of USDT pairs in the last week using subgraph QmZBQcF..."69- "Compare the liquidity of ETH and USDC pairs in subgraph QmZBQcF..."70- "Find unusual trading patterns in the last 24 hours from subgraph QmZBQcF..."7172### Combined Tasks73- "First get the schema of QmZBQcF..., then help me write a query to find high-value transactions"74- "Check the schema of QmZBQcF... and tell me what fields are available for querying token prices"75- "Using subgraph QmZBQcF..., analyze the market impact of large trades by first understanding the schema and then querying relevant events"7677## License78This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Full transparency — inspect the skill content before installing.