简介
配置基于 Base 链的 x402 Agent 微支付,支持 USDC 按请求计费,消除 API Key 摩擦,已处理超 1 亿笔交易。
原始描述
Configure x402 micropayments for agent-to-agent commerce via Uniswap. Set up your agent to pay per MCP request in USDC on Base (~200ms settlement) or accept x402 payments as a service provider. Use when the user wants to enable pay-per-use API access or monetize their agent's services.
通过你的 Agent 添加
安装目录:configure-x402/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
configure-x402 是专为 Agent-to-Agent 商务设计的配置工具,用于启用 x402 HTTP 原生支付协议。该 Skill 支持三种工作模式:Pay 模式(配置 Agent 为支付方,按请求付费调用外部 MCP 工具)、Accept 模式(配置 Agent 为收款方,对自有服务设置按请求收费)以及 Both 模式(双向支付)。通过生成本地配置文件(.uniswap/x402-config.json 和 .well-known/x402-manifest.json),设置 USDC 钱包地址、Base 链结算参数、工具分级定价($0.001-$0.05/次)及每小时消费上限(默认 $1.00)。配置完成后,Agent 可在约 200ms 内完成 USDC 链上结算,无需 API Key 或账户注册即可实现无摩擦的自动化支付。
显著优点
- 极速结算体验:基于 Base 链构建,实现约 200ms 的 USDC 结算速度,远快于传统支付网络,满足高频 Agent 交互需求。
- 零摩擦接入:彻底消除传统 API Key 管理和订阅模式的复杂性,实现真正的按请求付费(Pay-per-request),降低服务接入门槛。
- 经过验证的生态规模:已处理超过 1 亿笔 Agent 间交易,支持 80+ 生态项目,并被 Coinbase Bazaar 收录(12,365+ 服务),具有成熟的应用基础。
- 精细化定价策略:支持按工具类型差异化定价(如价格查询 $0.001、交易执行 $0.05),灵活适应不同服务的价值密度。
- 资金安全机制:内置每小时消费上限(maxSpendPerHour)保护,防止运行时代码异常或恶意调用导致资金耗尽。
潜在缺点或局限性
- 代币单一性限制:仅支持 USDC 支付,不支持 ETH、BTC 或其他稳定币,要求用户必须在 Base 链持有 USDC,增加了准备复杂度。
- 链上依赖风险:虽支持以太坊主网,但推荐使用 Base 链以获得最佳体验,存在 Gas 费波动和网络拥堵可能,且对 Coinbase 生态依赖度较高。
- 配置与运行时分离:生成的 JSON 配置文件为静态文档,实际支付流程依赖运行时 MCP 服务器和外部 Facilitator,配置错误可能导致支付失败但无即时反馈。
- 来源可信度限制:由个人开发者(wpank)维护(T3 来源),非 Coinbase 官方或顶级开源基金会直接维护,长期更新和维护稳定性存在一定不确定性。
- 市场覆盖局限:目前主要适用于 Coinbase/Base 生态系统,跨链互操作性有限,对于多链部署场景需要额外适配。
适合的目标群体
- API 服务提供者:希望将 MCP 工具或 Agent 服务货币化的开发者,特别是提供高频低价值服务(如价格查询、路由优化)的场景。
- Agent 运营开发者:需要访问付费 API 但希望避免订阅成本的 AI Agent 构建者,适合按需付费的灵活计费场景。
- DeFi 协议集成方:基于 Uniswap 生态构建的 Agent,需要集成 swap、流动性管理等付费功能的金融应用开发者。
- 微服务架构师:构建 Agent-to-Agent 商务网络,需要标准化、自动化支付协议的技术团队和产品经理。
使用风险
- 资金安全风险:需确保配置的 USDC 钱包地址正确且为您控制的合法地址,错误地址可能导致资金永久丢失;Pay 模式下需预存 USDC,存在资金占用和汇率波动(USDC 脱锚)风险。
- 运行时依赖风险:配置仅生成静态文件,实际支付依赖外部 Facilitator 和 Base 链上结算,若 Facilitator 服务不可用或 Base 链拥堵,可能导致服务中断或支付延迟。
- 定价僵化风险:配置的定价为固定美元金额,若市场费率大幅变化或 USDC 流动性问题,可能影响收益或成本结构,需定期手动调整配置。
- 合规法律风险:涉及加密货币支付,用户需自行确保符合当地法律法规,特别是 KYC/AML 要求,某些司法管辖区可能限制此类支付活动。
- 权限管理风险:Skill 需要文件写入权限生成配置,虽无代码执行风险,但需确保运行环境文件权限正确,防止配置被恶意篡改导致资金转向。
- 代币单一性限制:仅支持 USDC 支付,不支持 ETH、BTC 或其他稳定币,要求用户必须在 Base 链持有 USDC,增加了准备复杂度。
- 链上依赖风险:虽支持以太坊主网,但推荐使用 Base 链以获得最佳体验,存在 Gas 费波动和网络拥堵可能,且对 Coinbase 生态依赖度较高。
- 配置与运行时分离:生成的 JSON 配置文件为静态文档,实际支付流程依赖运行时 MCP 服务器和外部 Facilitator,配置错误可能导致支付失败但无即时反馈。
- 来源可信度限制:由个人开发者(wpank)维护(T3 来源),非 Coinbase 官方或顶级开源基金会直接维护,长期更新和维护稳定性存在一定不确定性。
- 市场覆盖局限:目前主要适用于 Coinbase/Base 生态系统,跨链互操作性有限,对于多链部署场景需要额外适配。
适合的目标群体
- API 服务提供者:希望将 MCP 工具或 Agent 服务货币化的开发者,特别是提供高频低价值服务(如价格查询、路由优化)的场景。
- Agent 运营开发者:需要访问付费 API 但希望避免订阅成本的 AI Agent 构建者,适合按需付费的灵活计费场景。
- DeFi 协议集成方:基于 Uniswap 生态构建的 Agent,需要集成 swap、流动性管理等付费功能的金融应用开发者。
- 微服务架构师:构建 Agent-to-Agent 商务网络,需要标准化、自动化支付协议的技术团队和产品经理。
使用风险
- 资金安全风险:需确保配置的 USDC 钱包地址正确且为您控制的合法地址,错误地址可能导致资金永久丢失;Pay 模式下需预存 USDC,存在资金占用和汇率波动(USDC 脱锚)风险。
- 运行时依赖风险:配置仅生成静态文件,实际支付依赖外部 Facilitator 和 Base 链上结算,若 Facilitator 服务不可用或 Base 链拥堵,可能导致服务中断或支付延迟。
- 定价僵化风险:配置的定价为固定美元金额,若市场费率大幅变化或 USDC 流动性问题,可能影响收益或成本结构,需定期手动调整配置。
- 合规法律风险:涉及加密货币支付,用户需自行确保符合当地法律法规,特别是 KYC/AML 要求,某些司法管辖区可能限制此类支付活动。
- 权限管理风险:Skill 需要文件写入权限生成配置,虽无代码执行风险,但需确保运行环境文件权限正确,防止配置被恶意篡改导致资金转向。
- 资金安全风险:需确保配置的 USDC 钱包地址正确且为您控制的合法地址,错误地址可能导致资金永久丢失;Pay 模式下需预存 USDC,存在资金占用和汇率波动(USDC 脱锚)风险。
- 运行时依赖风险:配置仅生成静态文件,实际支付依赖外部 Facilitator 和 Base 链上结算,若 Facilitator 服务不可用或 Base 链拥堵,可能导致服务中断或支付延迟。
- 定价僵化风险:配置的定价为固定美元金额,若市场费率大幅变化或 USDC 流动性问题,可能影响收益或成本结构,需定期手动调整配置。
- 合规法律风险:涉及加密货币支付,用户需自行确保符合当地法律法规,特别是 KYC/AML 要求,某些司法管辖区可能限制此类支付活动。
- 权限管理风险:Skill 需要文件写入权限生成配置,虽无代码执行风险,但需确保运行环境文件权限正确,防止配置被恶意篡改导致资金转向。
技能正文
name: configure-x402
description: Configure x402 micropayments for agent-to-agent commerce via Uniswap. Set up your agent to pay per MCP request in USDC on Base (~200ms settlement) or accept x402 payments as a service provider. Use when the user wants to enable pay-per-use API access or monetize their agent's services.
model: sonnet
Configure x402
Overview
Overview
Configures the x402 HTTP-native payment protocol for agent-to-agent micropayments settled on Base. x402 uses the HTTP 402 "Payment Required" status code to enable pay-per-request billing — agents pay fractions of a cent per API call in USDC, with ~200ms settlement, no API keys, no accounts, and no subscriptions.
This skill supports two modes:
- Pay mode: Configure your agent to pay for MCP tool calls and external API access via x402
- Accept mode: Configure your agent as an x402 service provider that accepts micropayments for its services
- Both: Enable bidirectional x402 payments
x402 has processed 100M+ agent-to-agent transactions across 80+ ecosystem projects (Feb 2026). It eliminates API key onboarding friction and creates revenue streams from every agent interaction.
When to Use
Activate when the user says:
- "Set up x402 payments for my agent"
- "Enable pay-per-swap via x402"
- "Configure my agent to accept x402 payments"
- "Set up micropayments on Base"
- "Enable x402 for my MCP server"
- "Monetize my agent's API"
- "Configure pay-per-request billing"
- "Set up agent-to-agent payments"
Parameters
Parameter
Required
Default
Description
mode
No
both
Payment mode: "pay" (pay for services), "accept" (accept payments), or "both"
walletAddress
Yes
--
USDC wallet address on Base for sending/receiving payments
chain
No
base
Settlement chain (Base recommended for ~200ms settlement)
pricePerCall
No
see pricing
Price per MCP tool call in USDC (for accept mode). Defaults to recommended pricing below.
supportedTools
No
all
Which MCP tools to gate behind x402 payments (for accept mode). "all" or comma-separated list.
maxSpendPerHour
No
$1.00
Maximum x402 spend per hour (for pay mode). Safety limit to prevent runaway costs.
facilitator
No
auto
x402 facilitator to use. "auto" selects the best available facilitator on Base.
Recommended Pricing (Accept Mode)
| Parameter | Required | Default | Description |
|---|---|---|---|
mode |
No | both | Payment mode: "pay" (pay for services), "accept" (accept payments), or "both" |
walletAddress |
Yes | -- | USDC wallet address on Base for sending/receiving payments |
chain |
No | base | Settlement chain (Base recommended for ~200ms settlement) |
pricePerCall |
No | see pricing | Price per MCP tool call in USDC (for accept mode). Defaults to recommended pricing below. |
supportedTools |
No | all | Which MCP tools to gate behind x402 payments (for accept mode). "all" or comma-separated list. |
maxSpendPerHour |
No | $1.00 | Maximum x402 spend per hour (for pay mode). Safety limit to prevent runaway costs. |
facilitator |
No | auto | x402 facilitator to use. "auto" selects the best available facilitator on Base. |
| Tool Category | Price per Call | Examples |
|---|---|---|
| Price quotes | $0.001 | get_token_price, get_quote |
| Pool analytics | $0.003 | get_pool_info, get_pool_volume_history |
| Route optimization | $0.005 | get_pools_by_token_pair, search_tokens |
| Simulation | $0.01 | simulate_transaction |
| Execution | $0.05 | execute_swap, add_liquidity |
Workflow
-
Parse configuration from the user's request. Determine the payment mode, wallet address, chain, pricing, and tool scope. Validate the wallet address format.
-
Validate wallet: Verify the wallet address exists on the target chain and has a USDC balance (for pay mode) or can receive USDC (for accept mode). Check that the chain supports x402 settlement.
-
Write x402 configuration: Generate the x402 configuration file at .uniswap/x402-config.json with:
- Payment mode (pay/accept/both)
- Wallet address and chain
- Facilitator endpoint
- Per-tool pricing (accept mode)
- Spending limits (pay mode)
- Supported tools list
For accept mode, also generate the .well-known/x402-manifest.json that advertises the agent's x402-enabled endpoints to other agents.
-
Verify setup: Confirm the configuration is valid by checking:
- Wallet connectivity on the settlement chain
- Facilitator availability
- USDC token approval for the facilitator contract (if pay mode)
- Configuration file is properly formatted
Output Format
x402 Configuration Complete
Mode: Both (pay + accept)
Chain: Base (8453)
Wallet: 0x1234...abcd
Facilitator: Auto-selected (Coinbase x402)
Pay Mode:
Max Spend: $1.00/hour
USDC Balance: $50.00 (sufficient)
Accept Mode:
Pricing:
Price quotes: $0.001/call
Pool analytics: $0.003/call
Route optimization: $0.005/call
Simulation: $0.010/call
Execution: $0.050/call
Tools Gated: All (17 tools)
Config Files:
.uniswap/x402-config.json
.well-known/x402-manifest.json
Status: Ready for x402 payments
Important Notes
- x402 settles on Base by default (~200ms). Ethereum mainnet settlement is possible but slower and more expensive.
- USDC is the only supported payment token for x402. The wallet must hold USDC on the settlement chain.
- The
maxSpendPerHour safety limit prevents runaway costs in pay mode. Adjust based on expected usage.
- x402 uses the HTTP 402 "Payment Required" status code. When a client hits an x402-gated endpoint without payment, it receives a 402 response with payment instructions.
- Facilitators handle the payment settlement. The "auto" option selects the best available facilitator on the target chain.
- For accept mode, the
.well-known/x402-manifest.json file makes your agent discoverable on Coinbase Bazaar (12,365+ services).
- x402 payments are per-request. There are no subscriptions, API keys, or accounts. Each request includes a micropayment.
- All x402 transactions are logged for treasury management and can be tracked via the
manage-treasury skill.
- This skill does not execute any on-chain transactions. It only generates configuration files. The actual x402 payment flow happens at runtime when the MCP server processes requests.
Error Handling
Error
User-Facing Message
Suggested Action
Invalid wallet
"Invalid wallet address format."
Provide a valid Ethereum address (0x...)
No USDC balance
"Wallet has no USDC on [chain]. x402 payments require USDC."
Fund the wallet with USDC on Base
Chain not supported
"[chain] does not support x402 settlement."
Use Base (recommended) or Ethereum
Facilitator unavailable
"No x402 facilitator available on [chain]."
Try Base (most facilitators available)
Config write failed
"Could not write x402 configuration: [reason]."
Check file permissions
Wallet not configured
"No agent wallet found. Set up a wallet first."
Use setup-agent-wallet skill first
Invalid pricing
"Price per call must be positive and in USDC."
Provide valid pricing values
Parse configuration from the user's request. Determine the payment mode, wallet address, chain, pricing, and tool scope. Validate the wallet address format.
Validate wallet: Verify the wallet address exists on the target chain and has a USDC balance (for pay mode) or can receive USDC (for accept mode). Check that the chain supports x402 settlement.
Write x402 configuration: Generate the x402 configuration file at .uniswap/x402-config.json with:
- Payment mode (pay/accept/both)
- Wallet address and chain
- Facilitator endpoint
- Per-tool pricing (accept mode)
- Spending limits (pay mode)
- Supported tools list
For accept mode, also generate the .well-known/x402-manifest.json that advertises the agent's x402-enabled endpoints to other agents.
Verify setup: Confirm the configuration is valid by checking:
- Wallet connectivity on the settlement chain
- Facilitator availability
- USDC token approval for the facilitator contract (if pay mode)
- Configuration file is properly formatted
x402 Configuration Complete
Mode: Both (pay + accept)
Chain: Base (8453)
Wallet: 0x1234...abcd
Facilitator: Auto-selected (Coinbase x402)
Pay Mode:
Max Spend: $1.00/hour
USDC Balance: $50.00 (sufficient)
Accept Mode:
Pricing:
Price quotes: $0.001/call
Pool analytics: $0.003/call
Route optimization: $0.005/call
Simulation: $0.010/call
Execution: $0.050/call
Tools Gated: All (17 tools)
Config Files:
.uniswap/x402-config.json
.well-known/x402-manifest.json
Status: Ready for x402 payments
Important Notes
- x402 settles on Base by default (~200ms). Ethereum mainnet settlement is possible but slower and more expensive.
- USDC is the only supported payment token for x402. The wallet must hold USDC on the settlement chain.
- The
maxSpendPerHour safety limit prevents runaway costs in pay mode. Adjust based on expected usage.
- x402 uses the HTTP 402 "Payment Required" status code. When a client hits an x402-gated endpoint without payment, it receives a 402 response with payment instructions.
- Facilitators handle the payment settlement. The "auto" option selects the best available facilitator on the target chain.
- For accept mode, the
.well-known/x402-manifest.json file makes your agent discoverable on Coinbase Bazaar (12,365+ services).
- x402 payments are per-request. There are no subscriptions, API keys, or accounts. Each request includes a micropayment.
- All x402 transactions are logged for treasury management and can be tracked via the
manage-treasury skill.
- This skill does not execute any on-chain transactions. It only generates configuration files. The actual x402 payment flow happens at runtime when the MCP server processes requests.
Error Handling
Error
User-Facing Message
Suggested Action
Invalid wallet
"Invalid wallet address format."
Provide a valid Ethereum address (0x...)
No USDC balance
"Wallet has no USDC on [chain]. x402 payments require USDC."
Fund the wallet with USDC on Base
Chain not supported
"[chain] does not support x402 settlement."
Use Base (recommended) or Ethereum
Facilitator unavailable
"No x402 facilitator available on [chain]."
Try Base (most facilitators available)
Config write failed
"Could not write x402 configuration: [reason]."
Check file permissions
Wallet not configured
"No agent wallet found. Set up a wallet first."
Use setup-agent-wallet skill first
Invalid pricing
"Price per call must be positive and in USDC."
Provide valid pricing values
maxSpendPerHour safety limit prevents runaway costs in pay mode. Adjust based on expected usage..well-known/x402-manifest.json file makes your agent discoverable on Coinbase Bazaar (12,365+ services).manage-treasury skill.| Error | User-Facing Message | Suggested Action |
|---|---|---|
| Invalid wallet | "Invalid wallet address format." | Provide a valid Ethereum address (0x...) |
| No USDC balance | "Wallet has no USDC on [chain]. x402 payments require USDC." | Fund the wallet with USDC on Base |
| Chain not supported | "[chain] does not support x402 settlement." | Use Base (recommended) or Ethereum |
| Facilitator unavailable | "No x402 facilitator available on [chain]." | Try Base (most facilitators available) |
| Config write failed | "Could not write x402 configuration: [reason]." | Check file permissions |
| Wallet not configured | "No agent wallet found. Set up a wallet first." | Use setup-agent-wallet skill first |
| Invalid pricing | "Price per call must be positive and in USDC." | Provide valid pricing values |
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。