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.
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. - INLINECODE8 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.
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.
Capability Map
-
getV1Health
-
getV1Version
-
getV1Networks
-
getV1EvmTokens
-
getV1EvmTokensNative
- - Wallet and transfer data:
-
getV1EvmBalances
- transfer/history operations exposed by the endpoint
- pool / OHLC / dex operations exposed by the endpoint
- 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.
Recommended Usage Pattern
- 1. Start with network discovery:
-
thegraph-token-mcp-cli getV1Networks
- 2. 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
- 4. Expand to broader scans only when needed.
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. - INLINECODE38 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 INLINECODE46
Tested Real Scenario
The endpoint was verified through uxc host discovery and returned a live MCP tool list including:
- - INLINECODE48
- INLINECODE49
- INLINECODE50
- INLINECODE51
- INLINECODE52
- INLINECODE53
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 INLINECODE54
- 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.
References
- INLINECODE57
The Graph Token MCP 技能
使用此技能通过 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 密钥。
- thegraph-token-mcp-skill 使用来自 The Graph Market Token API 仪表盘的独立凭证。
- 与 Authorization: Bearer ... 一起使用的值必须是生成的 API TOKEN (JWT),而不是原始的仪表盘 API 密钥。
核心工作流程
- 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
TOKENAPI_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. 在执行前检查操作模式:
- thegraph-token-mcp-cli getV1Networks -h
- thegraph-token-mcp-cli getV1EvmTokens -h
- thegraph-token-mcp-cli getV1EvmBalances -h
- 5. 优先使用读取操作,然后是更窄范围的钱包/代币/池查询。
能力映射
- getV1Health
- getV1Version
- getV1Networks
- getV1EvmTokens
- getV1EvmTokensNative
- getV1EvmBalances
- 端点暴露的转账/历史操作
- 端点暴露的池/OHLC/DEX 操作
- 端点暴露的 TVM 和其他链族
在依赖操作名称或参数结构之前,始终检查当前端点版本的主机帮助和操作帮助。
推荐使用模式
- 1. 从网络发现开始:
- thegraph-token-mcp-cli getV1Networks
- 2. 使用 -h 确认操作和所需参数。
- 首先查询最窄的表面:
- 单个合约的代币元数据
- 单个地址的余额
- 单个池/单个代币/单个日期范围
- 4. 仅在需要时扩展到更广泛的扫描。
防护措施
- - 保持自动化使用 JSON 输出信封;不要依赖 --text。
- 首先解析稳定字段:ok、kind、protocol、data、error。
- 使用 thegraph-token-mcp-cli 作为默认命令路径。
- 当配置了相同的认证绑定时,thegraph-token-mcp-cli ... 等同于 uxc https://token-api.mcp.thegraph.com/ ...。
- 仅在链接设置不可用时,临时使用直接的 uxc ... 作为回退。
- 简单参数优先使用 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
测试过的真实场景
该端点通过 uxc 主机发现进行了验证,并返回了包含以下内容的实时 MCP 工具列表:
- - getV1Health
- getV1Version
- getV1Networks
- getV1EvmTokens
- getV1EvmTokensNative
- getV1EvmBalances
这确认了技能目标是真实的 MCP 表面,而不是直接的 OpenAPI 主机。
Token API 需要其自己的 bearer token 工作流程:
- - 在 https://thegraph.market/dashboard 中管理 token
- 从仪表盘管理的 Token API 密钥生成 API TOKEN (JWT)
- 将该 JWT 与子图 MCP 凭证分开存储
不要将此技能记录或实现为复用与 thegraph-mcp-skill 相同的原始 API 密钥。
参考
- references/usage-patterns.md