Mcp X402

io.github.codespar由 GitHub 账号 codespar 发布v0.1.5更新于 Oct 27, 2026

DEPRECATED: no live endpoint (api.x402.org does not resolve)

已验证STDIO仅桌面金融开发者工具

概览

AI 生成的概览

已弃用的本地 MCP 服务器,面向 x402 HTTP 微支付协议;其唯一端点已无法解析,工具无法访问任何服务。

可以做什么
  • 为受 402 保护的资源付款,并核验 x402 支付是否已在链上结算
  • 创建、读取、列出和删除端点的 x402 付费墙配置
  • 查询 USDC 余额,浏览和查看支付历史
  • 列出支持的区块链网络、代币与 facilitator
  • 注意:README 说明该包已弃用,且没有任何工具能访问服务。
适用场景
仅当你已有可用的 x402 facilitator 端点、想把它作为参考或起点时使用;按当前发布状态不适合用于真实的代理支付。
运行要求
通过 npx 从 npm 包 @codespar/mcp-x402 在本地运行,通常配置在 Claude Desktop、Claude Code、Cursor 或 VS Code 中。需要 facilitator API 密钥(X402_API_KEY)和钱包地址(X402_WALLET_ADDRESS),可选 X402_NETWORK(base 或 solana)。
安装前请注意
该包已弃用,其唯一主机无法通过 DNS 解析,工具无法访问服务。这些工具设计用于在链上发送 USDC 支付以及创建或删除付费墙,因此任何可用的配置都会花费真实资金并更改端点设置。它需要以环境变量提供 facilitator API 密钥和钱包地址。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp X402,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@codespar/mcp-x402

Deprecated: no live endpoint. Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): api.x402.org, the only host this server calls, does not resolve in DNS. x402 has no central API: it is an HTTP 402 protocol, and each seller picks the facilitator that verifies payment. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with X402_BASE_URL. To bring the package back, open an issue in mcp-dev-latam with the provider's documented base URL.

MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)

[npm] [License: MIT]

What is x402?

x402 is an open protocol that enables machine-to-machine micropayments at the HTTP layer. When an AI agent requests a resource and receives HTTP 402 Payment Required, it automatically sends a USDC payment on-chain and retries — no checkout UI, no merchant integration, pure HTTP.

This is the payment rail purpose-built for agentic commerce.

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

json
{  "mcpServers": {    "x402": {      "command": "npx",      "args": ["-y", "@codespar/mcp-x402"],      "env": {        "X402_API_KEY": "your-key",        "X402_WALLET_ADDRESS": "your-wallet-address"      }    }  }}

Claude Code

bash
claude mcp add x402 -- npx @codespar/mcp-x402

Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

json
{  "servers": {    "x402": {      "command": "npx",      "args": ["-y", "@codespar/mcp-x402"],      "env": {        "X402_API_KEY": "your-key",        "X402_WALLET_ADDRESS": "your-wallet-address"      }    }  }}

Tools (10)

ToolPurpose
pay_requestPay for a 402-protected resource.
verify_paymentVerify if a x402 payment was received and settled on-chain
create_paywallCreate a x402 paywall configuration for an endpoint.
get_paywallGet paywall configuration for a specific URL
list_paywallsList all configured x402 paywalls
delete_paywallRemove a x402 paywall from an endpoint
get_balanceGet available USDC balance for x402 payments
list_paymentsList x402 payment history with optional filters
get_paymentGet details of a specific x402 payment
get_supported_networksList supported blockchain networks, tokens, and facilitators for x402 payments

Authentication

x402 uses a Bearer API key from a registered facilitator.

Get your credentials

  1. Visit the x402 documentation
  2. Set up a facilitator or use Coinbase's hosted facilitator
  3. Generate an API key
  4. Get your wallet address (Base or Solana)
  5. Set the environment variables

Environment Variables

VariableRequiredDescription
X402_API_KEYYesAPI key for x402 facilitator
X402_WALLET_ADDRESSYesWallet address for sending/receiving payments
X402_NETWORKNoBlockchain network: base (default) or solana

Use Cases

  • Agent accessing premium APIs — AI agent pays per-request for data feeds, LLM APIs, or premium content
  • Micropayment monetization — Protect your API endpoints with sub-cent paywalls
  • Machine-to-machine commerce — Agents autonomously purchasing compute, data, or services

Roadmap

v0.2 (planned)

  • create_subscription — Set up recurring micropayments for an endpoint
  • estimate_cost — Estimate cost before paying for a resource
  • batch_pay — Pay for multiple resources in a single transaction

v0.3 (planned)

  • Multi-token support (ETH, SOL beyond USDC)
  • Streaming payments for long-running agent tasks

Want to contribute? Open a PR or request a tool.

Links

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

来源:packages/crypto/x402/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.1.5最新Sep 27, 2026
  2. v0.1.4Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分