
Payagent Mcp
io.github.stevemilton由 GitHub 账号 stevemilton 发布v4.0.0更新于 Oct 24, 2026
Pay x402 APIs in USDC on Base, Solana, and BNB Chain with spend mandates, receipts, idempotency.
概览
一个本地 MCP 服务器,让 AI 助手在 Base、Solana 和 BNB Chain 上以 USDC 支付 x402 API,支持支出限额、收据和幂等。
- 可以做什么
- 发现与检查付费 API:按意图和预算搜索目录,并在不付款的情况下读取某个 URL 的价格和支付要求。支付 x402 资源:执行请求、402 挑战、策略校验、付款和收据的完整流程,并以幂等键保证重试安全。查看余额与历史:显示当前身份、充值地址、链上 USDC 余额、限额和近期付款。购买支付信号:获取关于某个 x402 资源是否真正结算并交付的签名探测证据。管理钱包:在启用 admin 配置时创建、充值、列出和重命名代理。
- 适用场景
- 当助手需要调用按请求收费的 x402 API,并希望在对话内完成付款时使用,可选择托管式支出限额或自托管钱包私钥。适合需要预算上限、收据和安全重试的代理工作流,而非一次性手动付款。
- 运行要求
- 以 stdio 在本地运行,通常通过 MCP 客户端配置中的 npx 启动;启动时不需要任何环境变量。之后选择钱包模式:托管模式通过 setup 用邮箱自助开通账户,或设置 PAYAGENT_PRIVATE_KEY 为已充值的 EVM 私钥以本地签名、免注册。ARISPAY_API_KEY 可选,设置 PAYAGENT_MCP_PROFILE=admin 会加载钱包管理工具。需要访问 ArisPay API 和相关区块链的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Payagent Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@arispay/payagent-mcp
One coherent USDC payment product for AI agents: call x402-paid APIs, with spend mandates, receipts, and idempotency. Works with Claude Desktop, Cursor, Windsurf, or any MCP client. A thin wrapper around the payagent SDK.
Two ways to hold the wallet:
- Local key (zero signup). Set
PAYAGENT_PRIVATE_KEYto a funded EOA key.paysigns EIP-3009 locally — no ArisPay account, no email. The only guardrail is the wallet balance; use a dedicated low-balance wallet. - Delegated custody (managed, recommended).
setup({ email })self-provisions an account, a CDP-managed wallet, and a spend mandate in one call. ArisPay enforces per-transaction, daily, and monthly limits server-side before signing; no private key ever lives in this process.
Tools
Seven core tools (the default surface):
Wallet administration (create_agent, fund_agent, list_agents, rename_agent) loads only when the host config sets PAYAGENT_MCP_PROFILE=admin.
Every tool declares MCP safety annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); pay and check_payment_signal are the only destructive tools — both spend real money.
Support matrix
Notes:
- All prices are quoted by sellers in the 402 challenge;
payprefers an EVM variant and falls back to Solana when the seller offers no EVM option. - Delegated mandates are integer cents, validated server-side before any signature exists. Local mode has no server-side cap.
- Settlement is a single on-chain
transferWithAuthorization(EIP-3009): it succeeds or reverts atomically. When the seller returnsX-PAYMENT-RESPONSE, the receipt carries the settlement transaction hash. - ArisPay's own facilitator (
facilitator.arispay.app) charges no facilitator fee; sellers may use any facilitator, and their fee/finality policy applies.
Setup
Add the server to your MCP client config. No environment variables are required — pick a wallet mode later, from inside the chat, or set one of the env options below.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
For the zero-signup mode, add the key to the env block:
Cursor
Same server block in .cursor/mcp.json. Windsurf: same pattern in ~/.codeium/windsurf/mcp_config.json.
Cold start, from nothing
- Zero signup: generate a key with
npx payagent wallet new, put it in the host config asPAYAGENT_PRIVATE_KEY, send USDC on Base to the printed address.balanceshows the deposit address;paypays. - Managed: ask the agent to run
setup({ email: "[email protected]" })— it returns the wallet address and mandate. Fund the wallet with USDC, confirm withbalance, thenpay. Credentials persist to~/.payagent/config.jsonand are shared with thepayagentCLI.
Environment variables (all optional)
Migrating from v3
v4 is a breaking release: the surface collapsed to one x402/USDC product.
Receipts and idempotency
pay requires a caller-chosen idempotencyKey (min 8 chars — use a UUID). Every completed payment writes a machine-readable receipt (amount, asset, network, wallet, settlement tx, remaining mandate) to ~/.payagent/mcp-receipts.json. Re-calling pay with a key that already paid returns the stored receipt and does not pay again — including when the paid request failed mid-flight. history lists receipts in self-custody mode; delegated mode reads the authoritative server feed.
How it works
- The agent calls
paywith a URL and anidempotencyKey; the seller answers HTTP 402 with its price. - With
PAYAGENT_PRIVATE_KEYset,payagentsigns the EIP-3009 authorization locally. Otherwise ArisPay validates the request against the agent's mandate and signs via Coinbase CDP. payagentretries with the signed payment header; the seller's facilitator settles USDC on-chain.- The tool returns the paid response plus a structured receipt.
In delegated mode, no private key lives in this process and payments that breach the mandate are rejected before any on-chain action. In local mode, the key is yours and stays in your process.
Install
Or invoke directly via npx @arispay/payagent-mcp from an MCP client config — no pre-install required. npx buyforme-mcp is the same server under the consumer brand.
Related
- payagent — the SDK + CLI for programmatic use
- facilitator.arispay.app — ArisPay's open x402 facilitator, where paid 402s settle
- x402 protocol — HTTP 402 payment standard
License
MIT
来源:README.md,提交 ba86a72
工具
0版本历史
1- v4.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分