thegraph-token-mcp-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

The Graph Token MCP Skill

The Graph Token MCP Skill

Use this skill to run The Graph Token API MCP operations through
uxc
.
Reuse the
uxc
skill for generic protocol discovery, envelope parsing, and error handling rules.
使用本技能通过
uxc
执行The Graph Token API MCP操作。
复用
uxc
技能实现通用协议发现、信封解析和错误处理规则。

Prerequisites

前置条件

  • uxc
    is installed and available in
    PATH
    .
  • Network access to
    https://token-api.mcp.thegraph.com/
    .
  • A The Graph Token API
    API TOKEN (JWT)
    from
    https://thegraph.market/dashboard
    is available for authenticated calls.
Important auth distinction:
  • Do not reuse the
    thegraph-mcp-skill
    API key directly.
  • thegraph-token-mcp-skill
    uses a separate credential sourced from The Graph Market Token API dashboard.
  • The value used with
    Authorization: Bearer ...
    must be the generated
    API TOKEN (JWT)
    , not the raw dashboard API key.
  • 已安装
    uxc
    且其路径已添加至
    PATH
    环境变量。
  • 可访问
    https://token-api.mcp.thegraph.com/
    网络。
  • 拥有来自
    https://thegraph.market/dashboard
    的The Graph Token API
    API TOKEN (JWT)
    ,用于认证调用。
重要的身份验证区别:
  • 请勿直接复用
    thegraph-mcp-skill
    的API密钥。
  • thegraph-token-mcp-skill
    使用来自The Graph Market Token API控制台的独立凭证。
  • Authorization: Bearer ...
    中使用的值必须是生成的
    API TOKEN (JWT)
    ,而非控制台原始API密钥。

Core Workflow

核心工作流

  1. Verify endpoint and protocol with help-first probing:
    • uxc https://token-api.mcp.thegraph.com/ -h
    • Confirm protocol is MCP (
      protocol == "mcp"
      in envelope).
  2. Configure a dedicated Token API JWT credential and binding:
    • Generate the
      API TOKEN (JWT)
      in
      https://thegraph.market/dashboard
    • Store it separately from the subgraph credential, for example:
      • uxc auth credential set thegraph-token --secret-env THEGRAPH_TOKEN_API_JWT
    • Bind the Token API endpoint to that dedicated credential:
      • uxc auth binding add --id thegraph-token-mcp --host token-api.mcp.thegraph.com --scheme https --credential thegraph-token --priority 100
  3. Use fixed link command by default:
    • command -v thegraph-token-mcp-cli
    • If missing, create it:
      • uxc link thegraph-token-mcp-cli https://token-api.mcp.thegraph.com/
    • thegraph-token-mcp-cli -h
  4. Inspect operation schema before execution:
    • thegraph-token-mcp-cli getV1Networks -h
    • thegraph-token-mcp-cli getV1EvmTokens -h
    • thegraph-token-mcp-cli getV1EvmBalances -h
  5. Prefer read operations first, then narrower wallet/token/pool queries.
  1. 通过优先辅助探测验证端点和协议:
    • uxc https://token-api.mcp.thegraph.com/ -h
    • 确认协议为MCP(信封中
      protocol == "mcp"
      )。
  2. 配置专属的Token API JWT凭证和绑定:
    • https://thegraph.market/dashboard
      生成
      API TOKEN (JWT)
    • 将其与子图凭证分开存储,例如:
      • uxc auth credential set thegraph-token --secret-env THEGRAPH_TOKEN_API_JWT
    • 将Token API端点绑定到该专属凭证:
      • uxc auth binding add --id thegraph-token-mcp --host token-api.mcp.thegraph.com --scheme https --credential thegraph-token --priority 100
  3. 默认使用固定链接命令:
    • command -v thegraph-token-mcp-cli
    • 若不存在则创建:
      • uxc link thegraph-token-mcp-cli https://token-api.mcp.thegraph.com/
    • thegraph-token-mcp-cli -h
  4. 执行前检查操作 schema:
    • thegraph-token-mcp-cli getV1Networks -h
    • thegraph-token-mcp-cli getV1EvmTokens -h
    • thegraph-token-mcp-cli getV1EvmBalances -h
  5. 优先执行读取操作,再进行更精准的钱包/代币/资金池查询。

Capability Map

能力映射

  • Service discovery:
    • getV1Health
    • getV1Version
    • getV1Networks
  • Token data:
    • getV1EvmTokens
    • getV1EvmTokensNative
  • Wallet and transfer data:
    • getV1EvmBalances
    • transfer/history operations exposed by the endpoint
  • Market and DEX data:
    • pool / OHLC / dex operations exposed by the endpoint
  • Non-EVM coverage:
    • TVM and other chain families exposed by the endpoint
Always inspect host help and operation help in the current endpoint version before relying on an operation name or argument shape.
  • 服务发现:
    • getV1Health
    • getV1Version
    • getV1Networks
  • 代币数据:
    • getV1EvmTokens
    • getV1EvmTokensNative
  • 钱包与转账数据:
    • getV1EvmBalances
    • 端点提供的转账/历史记录操作
  • 市场与DEX数据:
    • 端点提供的资金池 / OHLC / DEX操作
  • 非EVM支持:
    • 端点提供的TVM及其他链生态操作
在依赖操作名称或参数格式前,请务必检查当前端点版本的主机帮助和操作帮助。

Recommended Usage Pattern

推荐使用模式

  1. Start with network discovery:
    • thegraph-token-mcp-cli getV1Networks
  2. Confirm the operation and required arguments with
    -h
    .
  3. Query the narrowest surface first:
    • token metadata for one contract
    • balances for one address
    • one pool / one token / one date range
  4. Expand to broader scans only when needed.
  1. 从网络发现开始:
    • thegraph-token-mcp-cli getV1Networks
  2. 使用
    -h
    确认操作及所需参数。
  3. 先查询最精准的范围:
    • 单个合约的代币元数据
    • 单个地址的余额
    • 单个资金池 / 单个代币 / 单个日期范围
  4. 仅在需要时扩展至更广泛的扫描。

Guardrails

防护规则

  • Keep automation on JSON output envelope; do not rely on
    --text
    .
  • Parse stable fields first:
    ok
    ,
    kind
    ,
    protocol
    ,
    data
    ,
    error
    .
  • Use
    thegraph-token-mcp-cli
    as default command path.
  • thegraph-token-mcp-cli <operation> ...
    is equivalent to
    uxc https://token-api.mcp.thegraph.com/ <operation> ...
    when the same auth binding is configured.
  • Use direct
    uxc "<endpoint>" ...
    only as temporary fallback when link setup is unavailable.
  • Prefer
    key=value
    for simple arguments and positional JSON for nested objects.
  • If auth fails:
    • confirm
      uxc auth credential info thegraph-token
      succeeds
    • confirm
      uxc auth binding match https://token-api.mcp.thegraph.com/
      resolves to
      thegraph-token
    • confirm the stored secret is the generated
      API TOKEN (JWT)
      , not the raw API key from The Graph Market dashboard
    • rerun
      thegraph-token-mcp-cli -h
  • 自动化操作请基于JSON输出信封,不要依赖
    --text
    格式。
  • 优先解析稳定字段:
    ok
    ,
    kind
    ,
    protocol
    ,
    data
    ,
    error
  • 默认使用
    thegraph-token-mcp-cli
    作为命令路径。
  • 当配置相同身份验证绑定时,
    thegraph-token-mcp-cli <operation> ...
    等效于
    uxc https://token-api.mcp.thegraph.com/ <operation> ...
  • 仅当链接设置不可用时,才临时使用直接
    uxc "<endpoint>" ...
    作为 fallback。
  • 简单参数优先使用
    key=value
    格式,嵌套对象使用位置JSON格式。
  • 若身份验证失败:
    • 确认
      uxc auth credential info thegraph-token
      执行成功
    • 确认
      uxc auth binding match https://token-api.mcp.thegraph.com/
      解析到
      thegraph-token
    • 确认存储的密钥是生成的
      API TOKEN (JWT)
      ,而非The Graph Market控制台的原始API密钥
    • 重新运行
      thegraph-token-mcp-cli -h

Tested Real Scenario

已测试的真实场景

The endpoint was verified through
uxc
host discovery and returned a live MCP tool list including:
  • getV1Health
  • getV1Version
  • getV1Networks
  • getV1EvmTokens
  • getV1EvmTokensNative
  • getV1EvmBalances
This confirms the skill target is a real MCP surface rather than a direct OpenAPI host.
The Token API requires its own bearer token workflow:
  • manage the token in
    https://thegraph.market/dashboard
  • generate
    API TOKEN (JWT)
    from the dashboard-managed Token API key
  • store that JWT separately from the subgraph MCP credential
Do not document or implement this skill as if it reused the same raw API key as
thegraph-mcp-skill
.
通过
uxc
主机发现验证了该端点,返回的实时MCP工具列表包括:
  • getV1Health
  • getV1Version
  • getV1Networks
  • getV1EvmTokens
  • getV1EvmTokensNative
  • getV1EvmBalances
这确认了本技能的目标是真实的MCP接口,而非直接的OpenAPI主机。
Token API需要独立的Bearer令牌流程:
  • https://thegraph.market/dashboard
    管理令牌
  • 从控制台管理的Token API密钥生成
    API TOKEN (JWT)
  • 将该JWT与子图MCP凭证分开存储
请勿将本技能记录或实现为可复用
thegraph-mcp-skill
相同原始API密钥的形式。

References

参考资料

  • Invocation patterns:
    • references/usage-patterns.md
  • 调用模式:
    • references/usage-patterns.md