JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 79
  • Score
    100M100P100Q93579F
  • License MIT

Give your AI agent a USDC wallet. Pay-per-call any API. Hard daily cap the agent can't override. Demo Mode works with zero signup β€” `npx -y agent-payment-mcp` and ask Claude to list services.

Package Exports

  • agent-payment-mcp
  • agent-payment-mcp/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (agent-payment-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

agent-payment-mcp πŸ‹

Give your AI agent a USDC wallet. Pay-per-call any API. Hard daily cap the agent can't override.

npm downloads Glama score MCP Registry


⚑ Try in 30 seconds β€” no signup, no API key

1. Add to ~/Library/Application Support/Claude/claude_desktop_config.json (or your Cursor / Cline MCP config):

{
  "mcpServers": {
    "lemon": {
      "command": "npx",
      "args": ["-y", "agent-payment-mcp"]
    }
  }
}

2. Restart Claude Desktop.

3. Ask Claude:

"list the services available in lemon"

or

"use lemon to search Wikipedia for AI agents"

That's it. Demo Mode runs with a mock $1.00 USDC balance against real Wikipedia, real FX rate, and real httpbin APIs. No credentials needed.


Unlock paid services (free signup)

Demo Mode is real but limited. To use Serper (Google search), Hunter.io (verified emails), gBizINFO (JP corporate data), NTA invoice verification, and more β€” get a free Pay Token:

  1. Sign up at lemoncake.xyz/start (Google login, 30 sec)
  2. Issue a Pay Token from the dashboard
  3. Add it to the MCP config:
{
  "mcpServers": {
    "lemon": {
      "command": "npx",
      "args": ["-y", "agent-payment-mcp"],
      "env": {
        "LEMON_CAKE_PAY_TOKEN": "eyJ...",
        "LEMON_CAKE_BUYER_JWT":  "eyJ..."
      }
    }
  }
}

USDC top-up minimum: $5. Per-call pricing: $0.005–$0.05 depending on service.


Why "Pay Token"?

A Pay Token is a scoped JWT spend credential:

  • πŸ’° Hard daily cap β€” agent literally cannot exceed it (enforced server-side, not in the JWT body the agent can see).
  • πŸ”ͺ Kill switch β€” revoke any token instantly via dashboard. Already-issued tokens stop working in <1 second.
  • 🎯 Scope-limited β€” token can be ALL services or a single service ID.
  • 🧾 x402-compatible receipts β€” every charge produces a verifiable on-chain receipt.

This is the opposite of giving your agent an API key. Lost key = stolen wallet. Lost Pay Token = bounded loss + instant revoke.


What an agent can do with it

Agent (Claude Desktop, Cursor, Cline, any MCP client)
  β”‚
  β”œβ”€ list_services()          β†’ browse LemonCake API marketplace
  β”œβ”€ check_balance()          β†’ see remaining USDC
  β”œβ”€ call_service(...)        β†’ pay-per-call any HTTP API
  β”‚   β”œβ”€β”€ demo_search         (Wikipedia, free)
  β”‚   β”œβ”€β”€ demo_fx             (live FX rates, free)
  β”‚   β”œβ”€β”€ demo_echo           (httpbin, free)
  β”‚   β”œβ”€β”€ serper              (Google search, $0.005)
  β”‚   β”œβ”€β”€ hunter              (verified emails, $0.05)
  β”‚   β”œβ”€β”€ gbizinfo            (JP company registry, $0.01)
  β”‚   β”œβ”€β”€ nta_invoice         (JP tax invoice verify, $0.005)
  β”‚   └── …more added monthly
  └─ check_tax(taxid)         β†’ verify a JP T-number (free)

For developers building MCP servers

Want to monetize your own MCP server? Add USDC pay-per-call billing in 3 lines with @lemon-cake/mcp-sdk:

import { withPayment } from "@lemon-cake/mcp-sdk";

server.tool("my_premium_tool", withPayment({ price: 0.01 }, async (args) => {
  // your existing tool logic
  return { content: [{ type: "text", text: "result" }] };
}));

Buyer funds their USDC wallet β†’ agent invokes your tool β†’ LemonCake handles billing β†’ you collect. No Stripe setup, no KYC on your side.


Security

Audited May 2026 by @kleosr. All critical and high-severity findings fixed in v0.7+. See GitHub Security Advisories for details.

Built-in protections:

  • Server-side hard spend cap (agent cannot raise from inside a tool call)
  • Kill switch (instant token revocation)
  • Timing-safe HMAC signature verification on all webhooks
  • Idempotency keys required on paid calls (no double-charges on retries)
  • Buyer suspension enforced in auth middleware

Dashboard lemoncake.xyz/start
Docs github.com/evidai/agent-payment-mcp
SDK for sellers @lemon-cake/mcp-sdk
MCP Registry registry.modelcontextprotocol.io
Discord #showcase in MCP Discord
License MIT

Other LemonCake MCPs (Demo Mode all work the same way)

All built on @lemon-cake/mcp-sdk.