pay-mcp
USDC payments for AI agents on Base. Direct transfers, pre-funded tabs, x402 paywall handling, and service discovery.
README
@pay-skill/mcp
MCP server for Pay -- the complete x402 payment stack for AI agents. USDC on Base.
Gives any MCP-compatible client (Claude Desktop, Cursor, VS Code, custom frameworks) the full power of Pay: direct payments, tabs, x402 paywalls, service discovery, and wallet management. No CLI binary needed.
Setup
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"pay": {
"command": "npx",
"args": ["-y", "@pay-skill/mcp"]
}
}
}
VS Code / Cursor
Add to .vscode/mcp.json:
{
"servers": {
"pay": {
"command": "npx",
"args": ["-y", "@pay-skill/mcp"]
}
}
}
Claude Code
claude mcp add pay -- npx -y @pay-skill/mcp
That's it. On first run, the server generates a wallet and stores it in the OS keychain (Windows Hello, macOS Keychain, Linux Secret Service). Subsequent runs load it automatically.
Configuration
| Env Var | Required | Default | Description |
|---|---|---|---|
PAYSKILL_SIGNER_KEY |
No | — | Optional override. Raw hex key or .enc keystore password. Not needed for normal use. |
PAY_NETWORK |
No | mainnet |
mainnet (Base) or testnet (Base Sepolia) |
Key Resolution (checked in order)
- OS keychain (default) — Loads from the OS credential store via
keytar. On first run, a new keypair is generated and stored automatically. - Encrypted keystore — If
~/.pay/keys/default.encexists,PAYSKILL_SIGNER_KEYis used as the decryption password. - Raw hex key — If
PAYSKILL_SIGNER_KEYis a 64-char hex string, it's used directly. For dev/testing or importing an existing wallet. - Auto-generate — If none of the above, generates a new keypair and stores it in the OS keychain.
Diagnostic Check
Verify everything is configured correctly:
npx @pay-skill/mcp --check
Output:
pay-mcp diagnostic check
network: Base (chain 8453)
api: https://pay-skill.com/api/v1
wallet: 0x1234...
key: keychain
server: OK (router: 0xABCD...)
auth: OK (balance: $50.00)
All checks passed. MCP server is ready.
Tools (15)
Payments
| Tool | Description |
|---|---|
pay_send |
Direct USDC payment ($1 min). Confirmation thresholds: <$10 auto, $10-100 plan, >$100 explicit. |
pay_request |
HTTP request with x402 auto-payment. Handles 402 detection, direct/tab settlement, price skepticism. |
Tabs (metered accounts)
| Tool | Description |
|---|---|
pay_tab_open |
Open pre-funded tab ($5 min, $50 recommended). Provider charges per-call. |
pay_tab_close |
Close tab. Returns distribution breakdown (provider 99%, fee 1%, agent remainder). |
pay_tab_charge |
Charge against open tab (provider only). |
pay_tab_topup |
Add funds to open tab (agent only). |
pay_tab_list |
List tabs with idle/low-balance flags. |
Wallet
| Tool | Description |
|---|---|
pay_status |
Balance, locked/available funds, actionable suggestions. |
pay_fund |
Generate 1-hour funding link (Coinbase Onramp or direct USDC). |
pay_withdraw |
Generate 1-hour withdrawal link. |
pay_mint |
Mint testnet USDC (Base Sepolia only). |
Discovery & Webhooks
| Tool | Description |
|---|---|
pay_discover |
Search paid API services by keyword/category. |
pay_webhook_register |
Register webhook for payment events (HMAC-signed). |
pay_webhook_list |
List registered webhooks. |
pay_webhook_delete |
Delete a webhook. |
Resources (5)
| URI | Description |
|---|---|
pay://wallet/status |
Balance, tabs, locked/available |
pay://wallet/tabs |
All open tabs |
pay://tab/{tab_id} |
Single tab detail |
pay://wallet/address |
Wallet address |
pay://network |
Network config + contract addresses |
Prompts (3)
| Prompt | Description |
|---|---|
pay-for-service |
Guided: discover service, evaluate pricing, make request |
review-tabs |
Review tabs, flag idle, suggest close/topup |
fund-wallet |
Generate fund link, explain deposit process |
Development
git clone https://github.com/pay-skill/pay-mcp.git
cd pay-mcp
npm install
npm run build
npm test # unit tests (mocked)
npm run test:acceptance # testnet (requires PAYSKILL_SIGNER_KEY)
License
MIT
Part of Pay
Pay is the complete x402 payment stack -- gateway, facilitator, SDKs, CLI, and MCP server -- that lets AI agents pay for APIs with USDC on Base.
- Documentation
- Architecture
- SDK -- Python + TypeScript
- CLI -- Command-line tool
- pay-gate -- x402 payment gateway
- Protocol -- Smart contracts
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。