TheGraph MCP Server

by kukapay
MIT License
3

Integrations

  • Allows executing GraphQL queries against specified subgraphs, with tools for fetching schema information and querying data

TheGraph MCP 服务器

MCP 服务器使用来自The Graph的索引区块链数据为 AI 代理提供支持。

可用工具

1. 获取子图模式

获取指定子图的模式,为 AI 代理提供生成 GraphQL 查询所需的上下文。

参数:

  • subgraphId :子图 ID(例如“QmZBQcF...”)
  • asText :输出格式标志
    • true :返回人类可读的 GraphQL 模式
    • false :返回 JSON 模式(默认)

2. 查询子图

针对指定子图执行 GraphQL 查询。虽然查询通常由 AI 生成,但您也可以手动创建自己的查询。

参数:

  • subgraphId :子图ID
  • query :GraphQL 查询字符串

安装

  1. 克隆存储库
    git clone https://github.com/kukapay/thegraph-mcp.git
  2. 客户端配置
    { "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文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

使用来自 The Graph 的索引区块链数据为 AI 代理提供支持,使它们能够获取子图模式并针对区块链数据执行 GraphQL 查询。

  1. 可用工具
    1. 获取子图模式
    2. 查询子图
  2. 安装
    1. 示例提示
      1. 架构查询
      2. 数据查询
      3. 分析任务
      4. 组合任务
    2. 执照

      Related MCP Servers

      • A
        security
        A
        license
        A
        quality
        Facilitates comprehensive architectural design and evaluation through specialized agents, rich resources, and powerful tools covering diverse architectural domains, including cloud, AI, and blockchain.
        Last updated -
        3
        943
        15
        TypeScript
        ISC License
      • -
        security
        F
        license
        -
        quality
        A Python-based server that enables AI assistants to interact with an Unraid server through the official Unraid GraphQL API, providing read-only access to system information, Docker containers, VMs, storage, and more.
        Last updated -
        2
        Python
        • Linux
      • -
        security
        A
        license
        -
        quality
        A comprehensive toolkit for building AI agents with blockchain capabilities, enabling interactions with multiple blockchain networks for tasks like wallet management, fund transfers, smart contract interactions, and cross-chain asset bridging.
        Last updated -
        2
        TypeScript
        GPL 3.0
        • Linux
        • Apple
      • -
        security
        A
        license
        -
        quality
        A comprehensive server that enables AI agents to interact with multiple EVM-compatible blockchain networks through a unified interface, supporting ENS resolution, token operations, and smart contract interactions.
        Last updated -
        94
        TypeScript
        MIT License
        • Linux
        • Apple

      View all related MCP servers

      ID: zqspkrzqph