用途:该技能通过 uxc 运行 The Graph Token API MCP 操作,覆盖代币元数据、钱包余额、转账记录、持有者、池与市场数据等查询,并复用 uxc 的协议发现、信封解析与错误处理规则。
前置条件:需已安装 uxc 并在 PATH 中可用;可访问 https://token-api.mcp.thegraph.com/;需从 https://thegraph.market/dashboard 获取 The Graph Token API 的 API TOKEN(JWT)用于认证调用。注意认证区分:不要直接复用 thegraph-mcp-skill 的 API key,本技能使用独立凭据,Authorization: Bearer 的值必须是生成的 API TOKEN(JWT),而非仪表盘原始 API key。
主要能力:服务发现包括 getV1Health、getV1Version、getV1Networks;代币数据包括 getV1EvmTokens、getV1EvmTokensNative;钱包与转账包括 getV1EvmBalances 及端点暴露的转账/历史操作;市场与 DEX 数据包括端点暴露的 pool、OHLC、dex 操作;非 EVM 覆盖包括端点暴露的 TVM 及其他链族。使用前应始终查看当前端点版本的 host help 与操作 help,确认操作名与参数形态。
使用方式:先用 uxc https://token-api.mcp.thegraph.com/ -h 验证端点与协议,确认 protocol == "mcp"。配置独立 JWT 凭据与绑定:uxc auth credential set thegraph-token --secret-env THEGRAPH_TOKEN_API_JWT;uxc auth binding add --id thegraph-token-mcp --host token-api.mcp.thegraph.com --scheme https --credential thegraph-token --priority 100。默认使用固定链接命令:command -v thegraph-token-mcp-cli,如缺失则执行 uxc link thegraph-token-mcp-cli https://token-api.mcp.thegraph.com/,然后 thegraph-token-mcp-cli -h。执行前检查操作 schema,例如 thegraph-token-mcp-cli getV1Networks -h、getV1EvmTokens -h、getV1EvmBalances -h。建议从网络发现开始,优先只读操作,再收窄到单个合约、单个地址、单个池/token/日期范围,仅在需要时扩大范围。简单参数优先用 key=value,嵌套对象用位置 JSON。
限制与错误处理:自动化应基于 JSON 输出信封,不要依赖 --text;优先解析稳定字段 ok、kind、protocol、data、error。thegraph-token-mcp-cli <operation> ... 在配置相同认证绑定时等价于 uxc https://token-api.mcp.thegraph.com/ <operation> ...;仅在链接不可用时临时用直接 uxc "<endpoint>" ... 作为回退。认证失败时:确认 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 key;再重跑 thegraph-token-mcp-cli -h。端点已经过 uxc host 发现验证,返回真实 MCP 工具列表,确认其为真实 MCP 面而非直接 OpenAPI 主机。引用见 references/usage-patterns.md。