loadingβ¦
Search for a command to run...
loadingβ¦
Pay-per-call USDC payment proxy for AI agents. Issue scoped Pay Tokens with hard spending caps and auto-journal every charge to freee / Money Forward / QuickBoo
Pay-per-call USDC payment proxy for AI agents. Issue scoped Pay Tokens with hard spending caps and auto-journal every charge to freee / Money Forward / QuickBooks.
The billing, budget & identity layer for software for agents. Private Beta Β· Open core
Monetize any MCP/API in minutes, and let AI agents pay for it safely β each agent gets a spend-capped identity (budget, usage, pause/revoke). Buyers pay by card; no crypto wallet. First 3,000 calls free (lifetime). Then 3% only when your API earns.
License: MIT (SDK) Open core MCP Compatible x402 native npm: agent-payment-mcp FSA-confirmed Glama score
π Get started Β· π² Pricing Β· π Docs Β· π Live

βοΈ A real AI agent buys API calls by itself ($0.01 each), stops at its cap, and the API owner earns β no human, no crypto. Β· demo source
Monetizing an MCP/API? Start here β one command:
npx create-lemon-mcp my-paid-mcp # a paid MCP server, running in sandbox now
# then add a Seller Key in /app and set LEMONCAKE_SELLER_KEY β it charges for real (no code change)
Pick your path:
| I want to⦠| Do this |
|---|---|
| Monetize my MCP/API (sellers) | npx create-lemon-mcp β add a Seller Key in /app to go live |
| Add billing to a server I already have | @lemon-cake/mcp-sdk β wrap a tool with lc.charge(), or route through the gateway (no code) |
| Let an agent pay for paid APIs (buyers) | npx -y agent-payment-mcp β 8 free demo tools, no signup |
npx -y agent-payment-mcp
{ "mcpServers": { "lemon": { "command": "npx", "args": ["-y", "agent-payment-mcp"] } } }
Ask your agent to run list_demos / call_demo. To call paid APIs, set LC_PAY_TOKEN (get one at lemoncake.xyz/app).
LemonCake is an x402 payment rail for monetizing MCP servers and HTTP APIs. Sellers register an endpoint and set a price per call. Buyers prepay by card and receive a spend-capped Pay Token. Agents call the gateway with that token, and LemonCake verifies, meters, forwards, and records usage.
sequenceDiagram
participant A as π€ AI Agent
participant G as π LemonCake Gateway
participant API as Your API
A->>G: POST /g/:id (no token)
G-->>A: 402 + accepts[] (price, mintUrl)
A->>G: mint Pay Token (off-session, capped)
A->>G: Bearer :jwt
G->>API: forward (upstream key hidden)
API-->>A: 200 + result
Note over A,G: budget exhausted β 402 β agent self-funds β continues
Sellers register any HTTP API and set a price per call. Buyers / agents prepay with a card β Pay Token issued automatically β agent calls the API within budget. Budget exhausted β 402 challenge β agent self-funds β continues. No humans.
| Layer | Status | Where |
|---|---|---|
Buyer-side MCP (agent-payment-mcp) |
β MIT | npm, src |
Seller SDK (@lemon-cake/mcp-sdk) |
β MIT | npm, src |
| Starter templates | β MIT | examples/ |
| Docs site | β Public | lemoncake.xyz/docs |
| Gateway + billing engine | π Hosted | lemoncake.xyz |
| Dashboard (analytics, usage ledger) | π Hosted | lemoncake.xyz/app |
lemoncake.xyz/buy/<shortId>)Authorization: Bearer <token> to the gatewaybk_...) at /app β Pay Tokens panePOST /api/lc/agent/tokens (Bearer bk_) β off-session card charge β JWT// MCP config for agent with pre-issued Pay Token
{
"mcpServers": {
"lemon": {
"command": "npx",
"args": ["-y", "agent-payment-mcp"],
"env": {
"LC_PAY_TOKEN": "<jwt from Pay Token>"
}
}
}
}
Monetize any HTTP API or MCP server:
$0.01)sk_live_β¦) to charge from your own serverScaffold a paid MCP in one command β sandbox by default, production with one env var:
npx create-lemon-mcp my-paid-mcp # demo runs with no key
# then: set LEMONCAKE_SELLER_KEY=sk_live_β¦ β it charges for real (no code change)
Add billing to any tool with the SDK (@lemon-cake/mcp-sdk v1, no crypto):
import { createLemonCakeSDK } from "@lemon-cake/mcp-sdk";
const lc = createLemonCakeSDK(); // reads LEMONCAKE_SELLER_KEY (demo without it)
server.tool("my_premium_tool", "desc", { q: z.string() },
lc.charge({ price: 0.01 })(async ({ q }) => {
return { content: [{ type: "text", text: "result" }] };
}),
);
lc.charge wraps the handler: preflight (reserve) β run β settle (confirm on success, refund on failure). Or route existing traffic through https://lemoncake.xyz/g/<shortId> β no code changes required.
Give each AI agent its own spend-capped identity β so a fleet can pay for APIs without a shared card or runaway cost. Built on top of Pay Tokens; no balance pool, custody-free (an agent's "budget" is just the Pay Tokens bound to it).
agentId) β spend is attributed to that agent.pause / resume / revoke an agent; bound tokens are rejected at the gateway instantly (AGENT_PAUSED / AGENT_REVOKED), even with budget remaining.# manage agents (owner-authenticated)
POST /api/agents # create β { agent_id, ... }
POST /api/agents/:id/pause # kill switch (also /resume, /revoke)
GET /api/agents # list + per-agent spend rollup
accepts[] with price + mintUrlbk_...), no promptsnpx create-lemon-mcp, or lc.charge() on any tool, or route through the gatewayWWW-Authenticate: Lemoncake-Prepaidβββββββββββββββββββββββββββββββββββββββββββββββββββ
β Buyer / Agent β
β β³ prepays via card OR Buyer Key (bk_...) β
β β³ receives Pay Token (signed JWT) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β Authorization: Bearer <jwt>
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β LemonCake Gateway /g/<shortId> β
β β³ verify JWT signature β
β β³ check budget + calls + rate limit β
β β³ decrement spend, write to ledger β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β HTTPS + upstream_auth (hidden)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your API / MCP server (unchanged) β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
LemonCake is the middle box. It never holds funds β money flows Stripe β seller via Direct Charge.
Japan FSA Fintech Support Desk (2026-06) confirmed: no registration required. Custody-free design (Stripe Connect Direct Charge, no pooled balance).
| Jurisdiction | Basis |
|---|---|
| π―π΅ Japan | FSA β registration not required |
| πΊπΈ USA | FinCEN 2019 Β§4.5 β non-custodial software β MSB |
| πͺπΊ EU | MiCA β non-CASP |
| π¬π§ UK | FCA β Tech Service Provider |
| πΈπ¬ Singapore | MAS β DPT non-applicable |
| π¨π¦ Canada | FINTRAC β non-custodial exemption |
| π¨π Switzerland | FINMA β non-financial intermediary |
| Package | What it does |
|---|---|
| agent-payment-mcp | Main entry β x402 gateway + agent payment rail |
| @lemon-cake/mcp-sdk | Seller SDK β lc.charge() / lc.protect(), fiat, no crypto |
| create-lemon-mcp | Scaffold a paid MCP server β sandboxβprod with one env var |
| xstocks-mcp | Buy tokenized US stocks on Solana |
| alpaca-guard-mcp | Alpaca paper / live trading with hard daily cap |
| tokenized-stock-mcp | Dinari dShares |
Run in your terminal:
claude mcp add lemoncake-mcp -- npx CSA PROJECT - FZCO Β© 2026 IFZA Business Park, DDP, Premises Number 31174 - 001
Security
Low riskAutomated heuristic from public metadata β not a security guarantee.