Skip to main content
Glama

paid-mcp-metering

按调用次数计费的 MCP 工具。

服务发现免费:POST /mcp 遵循 Model Context Protocol 规范,采用 JSON-RPC 2.0(initialize、tools/list、ping)。执行按量计费:POST /v1/t/{tool} 位于 x402 v2 付费墙之后。未付费请求会收到 HTTP 402 及支付要求;已付费请求携带 PAYMENT-SIGNATURE 请求头,并在工具运行前通过 facilitator 完成 USDC 结算。

工具

工具

价格

返回内容

web_search

$0.001/次

按相关性排序的实时网页结果及来源 URL

deep_research

$0.01/次

多来源研究过程,返回综合答案及引用来源

上游为 Exa(主)和 Tavily(备)。每个处理器实时返回上游输出,否则直接抛出异常——绝无预置响应。

Related MCP server: Base Intel Search

支付轨道(Rails)

x402 v2、USDC、EIP-155 网络由 X402_NETWORK 指定(默认 Base Sepolia 测试网,CAIP-2 为 eip155:84532)。Facilitator 默认为 https://x402.org/facilitator。

环境变量

用途

X402_PAY_TO

收款地址。结算必需;未设置时仅返回 402 支付要求

X402_NETWORK

CAIP-2 网络 ID(默认 eip155:84532)

X402_FACILITATOR_URL

x402 facilitator 端点

EXA_API_KEY / TAVILY_API_KEY

搜索上游服务的凭据

运行

npm install
npm run build
npm start          # node dist/x402-server.js
npm test           # build + node --test dist/test-x402.js

免费服务发现:

curl -s localhost:4021/mcp -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

付费执行:

curl -s localhost:4021/v1/t/web_search -H 'Content-Type: application/json' \
  -d '{"query":"x402 protocol","max_results":3}'
# -> 402 with payment requirements; pay via an x402 client and retry with PAYMENT-SIGNATURE

注册中心

server.json 面向官方 MCP Registry,标识为 io.github.dev55acc-ai/paid-mcp-metering。打上 v* 标签将触发 .github/workflows/publish-mcp.yml:测试、构建、npm 发布(设置了 NPM_TOKEN 时),随后通过 GitHub OIDC 认证完成注册中心发布——无需存储任何注册中心凭据。

许可证

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Pay-per-call web search for AI agents, settled in USDC on Base via the x402 protocol. No API key or subscription required; users fund a wallet and get a web_search tool.
    8 npm
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Exposes 25 paid API endpoints as MCP tools for AI agents, with payments in USDC on Base mainnet via the x402 protocol, enabling tasks like web search, company intelligence, and crypto research.
    25
    55 npm
    MIT