2 v1.6.0 更新于 2026-10-25

x402 Conformance MCP Server

x402 payment safety checks: validate a 402 answer, prove a server never serves before settlement.

适用客户端

本地客户端
Claude Desktop、Claude Code、Cursor、Cline 等支持本地 MCP 的客户端

安装配置

本地运行(npm)
{
  "mcpServers": {
    "x402-conformance": {
      "command": "npx",
      "args": [
        "-y",
        "x402-conformance-mcp"
      ]
    }
  }
}
本地运行(docker)
{
  "mcpServers": {
    "x402-conformance": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/atsp-protocol/x402-conformance:1.6.0"
      ]
    }
  }
}

将上方 JSON 加入 MCP 客户端配置(如 Claude Desktop 的 claude_desktop_config.json 或项目的 .mcp.json)即可接入;远程接入按客户端要求填写 URL 与鉴权头。

提供的工具 接入后 Agent 可调用这 3 个工具

x402_check_payment_required
向 x402 付费 URL 发送一次未付费 GET,按规范(P1-P7)检查其 402 响应,不付款或签名。
x402_start_facilitator_double
在 127.0.0.1 上启动 x402 facilitator 替身并返回其 URL,供本地的资源服务器作为 facilitator 使用。
x402_probe_resource_server
通过故障注入(R0-R10)对回环上的 x402 资源服务器进行评分测试,仅通过 facilitator 替身以测试载荷付款。