360 Secure SkillHub
360 安全技能中心

Skill

核心功能:支持发现活跃子图、预查查询费用、执行GraphQL获取多链(DeFi、NFT、ENS等)实时链上数据,通过x402以约0.01USDC按次付费,无API密钥、无账户,支付gasless。典型场景:需获取链上TVL、交易池、NFT数据等场景。输入为GraphQL查询或子图搜索指令,输出链上数据、费用报价或子图信息;可通过MCP服务器部署或直接调用网关使用。

paulieb14
paulieb14
热度 16.02
最近更新 2026-06-24 10:19:20
分类:数据依赖:MCP 服务 / 第三方 API应用场景:数据处理 / 财务 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add payql
Metadata
name
payql
description
Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Discover the right live subgraph, see the ~$0.01 price, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.
version
0.1.0
homepage
https://github.com/PaulieB14/payql
metadata
{"clawdbot":{"emoji":"💸"}}

PayQL — pay-per-query data from The Graph

Get live on-chain data from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~$0.01 USDC per query over x402. No API key, no account, no ETH for gas — the payment is the auth, and it's gasless (EIP-3009 transferWithAuthorization on Base).

The loop: discover → price → query

  1. Discover the right live subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.
  2. Price it — preflight the 402 challenge to read the exact USDC cost before paying (free).
  3. Query — send GraphQL, pay the 402 from your wallet, get the data + a receipt back.

Two ways to run it

A. PayQL MCP server (turnkey)

Install and wire into your harness (Claude Desktop / Code / Cursor):

{
  "mcpServers": {
    "payql": {
      "command": "npx",
      "args": ["-y", "payql"],
      "env": { "PAYQL_NETWORK": "base", "PAYQL_PRIVATE_KEY": "0xYOUR_BASE_WALLET_KEY" }
    }
  }
}

Tools: search_subgraphs, get_payment_info (free price quote), query_subgraph (paid), get_subgraph_schema, wallet_status. Full recipe + example queries in references/gateway.md.

B. No install — use your harness's own wallet

If your harness already has an x402 / pay-for-service capability, hit the gateway directly:

  • Gateway URL: https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>
  • POST GraphQL {"query":"..."}. On 402, pay the quoted USDC amount and retry — your x402 client does this automatically.

Full no-install recipe (discovery query, pricing, examples) in references/gateway.md.

Wallet & funding

Fund a Base wallet with USDC only — payments are gasless, so no ETH is required. Want spend caps/allowlists? Use an Ampersend-managed wallet (see the PayQL README). The per-query cost is $0.01 — there are no API keys, subscriptions, or platform fees; the x402 micropayment is the only cost.