TheGraph MCP Server
TheGraph MCP 服务器
MCP 服务器使用来自The Graph的索引区块链数据为 AI 代理提供支持。
可用工具
1. 获取子图模式
获取指定子图的模式,为 AI 代理提供生成 GraphQL 查询所需的上下文。
参数:
subgraphId:子图 ID(例如“QmZBQcF...”)asText:输出格式标志true:返回人类可读的 GraphQL 模式false:返回 JSON 模式(默认)
2. 查询子图
针对指定子图执行 GraphQL 查询。虽然查询通常由 AI 生成,但您也可以手动创建自己的查询。
参数:
subgraphId:子图IDquery:GraphQL 查询字符串
Related MCP server: Subgraph Registry MCP
安装
克隆存储库
git clone https://github.com/kukapay/thegraph-mcp.git客户端配置
{ "mcpServers": { "thegraph-mcp": { "command": "uv", "args": ["--directory", "path/to/thegraph-mcp", "run", "main.py"], "env": { "THEGRAPH_API_KEY": "your_api_key_here" } } } }
示例提示
以下是一些触发该工具的自然语言提示:
架构查询
“以可读格式向我展示子图 QmZBQcF 的架构……”
“QmZBQcF...子图的结构是什么?请以 GraphQL 格式显示它”
“我需要了解子图 QmZBQcF 的数据模型...,您能获取它的模式吗?”
数据查询
“从子图 QmZBQcF 中查找过去 24 小时内交易量排名前 5 的代币……”
“显示子图 QmZBQcF 中所有流动性大于 100 万美元的货币对...”
“从 QmZBQcF... 子图获取最新的 10 个交换事件,包括代币符号和金额”
分析任务
“使用子图 QmZBQcF 分析上周 USDT 对的交易量……”
“比较子图 QmZBQcF 中 ETH 和 USDC 对的流动性……”
“从子图 QmZBQcF 中查找过去 24 小时内的异常交易模式...”
组合任务
“首先获取 QmZBQcF 的模式......然后帮我编写一个查询来查找高价值交易”
“检查 QmZBQcF 的模式......并告诉我哪些字段可用于查询代币价格”
“使用子图 QmZBQcF...,通过首先了解模式然后查询相关事件来分析大额交易的市场影响”
执照
本项目遵循 MIT 许可证。详情请参阅LICENSE文件。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that powers AI agents with indexed blockchain data from The Graph.3MIT
- AlicenseAqualityAmaintenanceAgent-friendly semantic classification of all subgraphs on The Graph Network. Pre-computed index of 15,500+ subgraphs with domain classification, protocol type detection, schema fingerprinting, canonical entity mapping, and composite reliability scoring.4370MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to execute GraphQL queries and retrieve schema information from any GraphQL endpoint.21418MIT
- AlicenseAqualityDmaintenanceProvides comprehensive GraphQL introspection, filtering, and query/mutation execution with safety controls. Enables AI agents to explore and interact with GraphQL APIs through natural language.7171MIT
Related MCP Connectors
The Graph MCP — indexed blockchain data via subgraph GraphQL queries
Provide AI agents and automation tools with contextual access to blockchain data including balance…
Agent-native scoring, search and routing for tokenized real-world assets across multi-chain.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kukapay/thegraph-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server