thegraph-token-mcp-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseThe Graph Token MCP Skill
The Graph Token MCP Skill
Use this skill to run The Graph Token API MCP operations through .
uxcReuse the skill for generic protocol discovery, envelope parsing, and error handling rules.
uxc使用本技能通过执行The Graph Token API MCP操作。
uxc复用技能实现通用协议发现、信封解析和错误处理规则。
uxcPrerequisites
前置条件
- is installed and available in
uxc.PATH - Network access to .
https://token-api.mcp.thegraph.com/ - A The Graph Token API from
API TOKEN (JWT)is available for authenticated calls.https://thegraph.market/dashboard
Important auth distinction:
- Do not reuse the API key directly.
thegraph-mcp-skill - uses a separate credential sourced from The Graph Market Token API dashboard.
thegraph-token-mcp-skill - The value used with must be the generated
Authorization: Bearer ..., not the raw dashboard API key.API TOKEN (JWT)
- 已安装且其路径已添加至
uxc环境变量。PATH - 可访问网络。
https://token-api.mcp.thegraph.com/ - 拥有来自的The Graph Token API
https://thegraph.market/dashboard,用于认证调用。API TOKEN (JWT)
重要的身份验证区别:
- 请勿直接复用的API密钥。
thegraph-mcp-skill - 使用来自The Graph Market Token API控制台的独立凭证。
thegraph-token-mcp-skill - 中使用的值必须是生成的
Authorization: Bearer ...,而非控制台原始API密钥。API TOKEN (JWT)
Core Workflow
核心工作流
- Verify endpoint and protocol with help-first probing:
uxc https://token-api.mcp.thegraph.com/ -h- Confirm protocol is MCP (in envelope).
protocol == "mcp"
- Configure a dedicated Token API JWT credential and binding:
- Generate the in
API TOKEN (JWT)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
- Generate the
- 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
- Inspect operation schema before execution:
thegraph-token-mcp-cli getV1Networks -hthegraph-token-mcp-cli getV1EvmTokens -hthegraph-token-mcp-cli getV1EvmBalances -h
- Prefer read operations first, then narrower wallet/token/pool queries.
- 通过优先辅助探测验证端点和协议:
uxc https://token-api.mcp.thegraph.com/ -h- 确认协议为MCP(信封中)。
protocol == "mcp"
- 配置专属的Token API JWT凭证和绑定:
- 在生成
https://thegraph.market/dashboardAPI 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
- 在
- 默认使用固定链接命令:
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 -hthegraph-token-mcp-cli getV1EvmTokens -hthegraph-token-mcp-cli getV1EvmBalances -h
- 优先执行读取操作,再进行更精准的钱包/代币/资金池查询。
Capability Map
能力映射
- Service discovery:
getV1HealthgetV1VersiongetV1Networks
- Token data:
getV1EvmTokensgetV1EvmTokensNative
- 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.
- 服务发现:
getV1HealthgetV1VersiongetV1Networks
- 代币数据:
getV1EvmTokensgetV1EvmTokensNative
- 钱包与转账数据:
getV1EvmBalances- 端点提供的转账/历史记录操作
- 市场与DEX数据:
- 端点提供的资金池 / OHLC / DEX操作
- 非EVM支持:
- 端点提供的TVM及其他链生态操作
在依赖操作名称或参数格式前,请务必检查当前端点版本的主机帮助和操作帮助。
Recommended Usage Pattern
推荐使用模式
- Start with network discovery:
thegraph-token-mcp-cli getV1Networks
- Confirm the operation and required arguments with .
-h - Query the narrowest surface first:
- token metadata for one contract
- balances for one address
- one pool / one token / one date range
- Expand to broader scans only when needed.
- 从网络发现开始:
thegraph-token-mcp-cli getV1Networks
- 使用确认操作及所需参数。
-h - 先查询最精准的范围:
- 单个合约的代币元数据
- 单个地址的余额
- 单个资金池 / 单个代币 / 单个日期范围
- 仅在需要时扩展至更广泛的扫描。
Guardrails
防护规则
- Keep automation on JSON output envelope; do not rely on .
--text - Parse stable fields first: ,
ok,kind,protocol,data.error - Use as default command path.
thegraph-token-mcp-cli - is equivalent to
thegraph-token-mcp-cli <operation> ...when the same auth binding is configured.uxc https://token-api.mcp.thegraph.com/ <operation> ... - Use direct only as temporary fallback when link setup is unavailable.
uxc "<endpoint>" ... - Prefer for simple arguments and positional JSON for nested objects.
key=value - If auth fails:
- confirm succeeds
uxc auth credential info thegraph-token - confirm resolves to
uxc auth binding match https://token-api.mcp.thegraph.com/thegraph-token - confirm the stored secret is the generated , not the raw API key from The Graph Market dashboard
API TOKEN (JWT) - rerun
thegraph-token-mcp-cli -h
- confirm
- 自动化操作请基于JSON输出信封,不要依赖格式。
--text - 优先解析稳定字段:,
ok,kind,protocol,data。error - 默认使用作为命令路径。
thegraph-token-mcp-cli - 当配置相同身份验证绑定时,等效于
thegraph-token-mcp-cli <operation> ...。uxc https://token-api.mcp.thegraph.com/ <operation> ... - 仅当链接设置不可用时,才临时使用直接作为 fallback。
uxc "<endpoint>" ... - 简单参数优先使用格式,嵌套对象使用位置JSON格式。
key=value - 若身份验证失败:
- 确认执行成功
uxc auth credential info thegraph-token - 确认解析到
uxc auth binding match https://token-api.mcp.thegraph.com/thegraph-token - 确认存储的密钥是生成的,而非The Graph Market控制台的原始API密钥
API TOKEN (JWT) - 重新运行
thegraph-token-mcp-cli -h
- 确认
Tested Real Scenario
已测试的真实场景
The endpoint was verified through host discovery and returned a live MCP tool list including:
uxcgetV1HealthgetV1VersiongetV1NetworksgetV1EvmTokensgetV1EvmTokensNativegetV1EvmBalances
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 from the dashboard-managed Token API key
API TOKEN (JWT) - 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通过主机发现验证了该端点,返回的实时MCP工具列表包括:
uxcgetV1HealthgetV1VersiongetV1NetworksgetV1EvmTokensgetV1EvmTokensNativegetV1EvmBalances
这确认了本技能的目标是真实的MCP接口,而非直接的OpenAPI主机。
Token API需要独立的Bearer令牌流程:
- 在管理令牌
https://thegraph.market/dashboard - 从控制台管理的Token API密钥生成
API TOKEN (JWT) - 将该JWT与子图MCP凭证分开存储
请勿将本技能记录或实现为可复用相同原始API密钥的形式。
thegraph-mcp-skillReferences
参考资料
- Invocation patterns:
references/usage-patterns.md
- 调用模式:
references/usage-patterns.md