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.
Stripe-style USDC billing for any API. 8 free demo services no signup. Non-custodial.
☝️ 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
🚀 Get started
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
Ask your agent to run list_demos / call_demo. To call paid APIs, set LC_PAY_TOKEN (get one at lemoncake.xyz/app).
What is LemonCake?
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.
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.
🪪 Agent Identity
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).
Bind a Pay Token to an agent when issuing it (agentId) → spend is attributed to that agent.
Per-agent rollup — budget, spend, calls, last-used in the dashboard.
Kill switch — pause / resume / revoke an agent; bound tokens are rejected at the gateway instantly (AGENT_PAUSED / AGENT_REVOKED), even with budget remaining.
Server-authoritative — price is set on the endpoint; agents never carry a card or a seller key.
# 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