io.github.pay-skill/pay-mcp

السجل الرسمي المالية والمدفوعات

USDC payments for AI agents on Base — direct, tabs, x402 paywalls, discovery

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @pay-skill/mcp
Claude Code
claude mcp add pay-mcp -e 'PAYSKILL_SIGNER_KEY=<your payskill_signer_key>' -e 'PAY_NETWORK=<PAY_NETWORK>' -- npx -y @pay-skill/mcp@0.2.8
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "pay-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@pay-skill/mcp@0.2.8"
            ],
            "env": {
                "PAYSKILL_SIGNER_KEY": "<your payskill_signer_key>",
                "PAY_NETWORK": "<PAY_NETWORK>"
            }
        }
    }
}

متغيرات البيئة

  • PAYSKILL_SIGNER_KEY سري Private key hex for importing an existing wallet (optional — generates new wallet if not set)
  • PAY_NETWORK Network to use: mainnet or testnet (default: mainnet)

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. @pay-skill/mcp
  2. Setup
  3. Configuration
  4. Diagnostic Check
  5. Tools (15)
  6. Resources (5)
  7. Prompts (3)
  8. Development
  9. License
  10. Part of Pay

@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 VarRequiredDefaultDescription
PAYSKILL_SIGNER_KEYNo—Optional override. Raw hex key or .enc keystore password. Not needed for normal use.
PAY_NETWORKNomainnetmainnet (Base) or testnet (Base Sepolia)
Key Resolution (checked in order)
  1. OS keychain (default) — Loads from the OS credential store via keytar. On first run, a new keypair is generated and stored automatically.
  2. Encrypted keystore — If ~/.pay/keys/default.enc exists, PAYSKILL_SIGNER_KEY is used as the decryption password.
  3. Raw hex key — If PAYSKILL_SIGNER_KEY is a 64-char hex string, it's used directly. For dev/testing or importing an existing wallet.
  4. 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
ToolDescription
pay_sendDirect USDC payment ($1 min). Confirmation thresholds: <$10 auto, $10-100 plan, >$100 explicit.
pay_requestHTTP request with x402 auto-payment. Handles 402 detection, direct/tab settlement, price skepticism.
Tabs (metered accounts)
ToolDescription
pay_tab_openOpen pre-funded tab ($5 min, $50 recommended). Provider charges per-call.
pay_tab_closeClose tab. Returns distribution breakdown (provider 99%, fee 1%, agent remainder).
pay_tab_chargeCharge against open tab (provider only).
pay_tab_topupAdd funds to open tab (agent only).
pay_tab_listList tabs with idle/low-balance flags.
Wallet
ToolDescription
pay_statusBalance, locked/available funds, actionable suggestions.
pay_fundGenerate 1-hour funding link (Coinbase Onramp or direct USDC).
pay_withdrawGenerate 1-hour withdrawal link.
pay_mintMint testnet USDC (Base Sepolia only).
Discovery & Webhooks
ToolDescription
pay_discoverSearch paid API services by keyword/category.
pay_webhook_registerRegister webhook for payment events (HMAC-signed).
pay_webhook_listList registered webhooks.
pay_webhook_deleteDelete a webhook.

Resources (5)

URIDescription
pay://wallet/statusBalance, tabs, locked/available
pay://wallet/tabsAll open tabs
pay://tab/{tab_id}Single tab detail
pay://wallet/addressWallet address
pay://networkNetwork config + contract addresses

Prompts (3)

PromptDescription
pay-for-serviceGuided: discover service, evaluate pricing, make request
review-tabsReview tabs, flag idle, suggest close/topup
fund-walletGenerate 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_TESTNET_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.

الأسئلة الشائعة

ما هو io.github.pay-skill/pay-mcp؟

USDC payments for AI agents on Base — direct, tabs, x402 paywalls, discovery

كيف أثبّت io.github.pay-skill/pay-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add pay-mcp -e 'PAYSKILL_SIGNER_KEY=<your payskill_signer_key>' -e 'PAY_NETWORK=<PAY_NETWORK>' -- npx -y @pay-skill/mcp@0.2.8. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.pay-skill/pay-mcp إلى مفتاح API؟

نعم. يتطلب PAYSKILL_SIGNER_KEY، وتضبطها في إعداداته.

هل io.github.pay-skill/pay-mcp مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون io.github.pay-skill/pay-mcp؟

ينشره pay-skill. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.