LemonCake — AI agent payment infrastructure
The safe monetization layer for AI APIs · Open corePrivate Beta

Turn any AI API into a
paid API in minutes.

No monthly fee. Pay 3% only when your AI API earns.
Start free — your first 3,000 calls, with gateway, Pay Token, spend limits, and metering all included.

Currently shipping: SDK (lc.charge, lc.protect) — MIT, on npm today.
Q3 2026: hosted gateway, Pay Token issuance, margin dashboard. Design partners get early access.

Used by xstocks-mcp · gmx-mcp · alpaca-guard-mcp · tokenized-stock-mcp · agent-payment-mcp

tool-server.ts
import { createLemonCakeSDK } from "@lemon-cake/mcp-sdk";

const lc = createLemonCakeSDK(); // demo mode without env vars

// HTTP route — one line.
app.use(lc.protect("/api/search", { cost: 0.02 }));

// Or an MCP tool — same idea.
server.tool("search", lc.charge({ price: 0.02 }), handler);

Drop-in MCP middleware. Works with any MCP SDK. Free for your first 3,000 calls.

How it works

Four boxes between you
and per-call revenue.

STEP 1
Your API
Anything HTTP
STEP 2
Gateway
We add a URL prefix
STEP 3
Paid access
Buyer pays via Pay Token
STEP 4
Revenue
97% to you, 3% to us

You change one URL. We do gateway routing, Pay Token verification, rate limiting, usage metering, and settle the 97% to your wallet.

Why developers use LemonCake

Built for the things
payment infra makes annoying.

Six things you stop worrying about after wiring up LemonCake.

Usage-based billing

Charge per tool call, per token, per outcome. Sub-cent micro-payments work natively — no minimum transaction size, no Stripe-style $0.30 floor.

AI agent payments

Agents pay your endpoint directly with one-time spend caps. No human in the loop, no API-key sharing, no "reset my credentials" support tickets.

No API-key management

Stop issuing, rotating, and revoking keys. Buyers authenticate once at install time; you never touch their secrets.

Global by default

Works in countries where Stripe Connect doesn't. Japan, Indonesia, Argentina — supported on day one.

Embedded wallet

Your buyers don't need a crypto wallet. We embed one at signup; they sign in with email and forget the underlying mechanics.

MCP-native

Drop-in middleware for any MCP server. Auto-listing on Bazaar + Glama + Smithery + mcp.so + Claude Code Plugins Directory.

The billing stack today

Stripe is for humans. Orb & Metronome are for SaaS.
LemonCake is for AI.

Existing billing infra assumes a human swipes a card and an org renews a seat. AI APIs charge sub-cent per call to a non-human caller. Different shape — different stack.

StripeOrb / MetronomeLemonCake
Meter + invoice + pay in one SDKPay onlyMeter + invoice (pay via Stripe)Yes
AI agent as buyerCard-onlyOrg-billed onlyNative
Sub-cent per call$0.30 effective floorAllowed, but Stripe-billed$0.005
MCP / agent middlewareDrop-in
No API-key managementKeys still requiredKeys still requiredEmbedded auth
Free tierStripe rates applyEnterprise tiers1k tx / mo, gas covered
Open-source SDKClosedClosedMIT
Setup timeConnect onboardingImplementation engineerOne env var

We don't replace Stripe for human checkout. We're the stack you want when the buyer is an AI agent.

Not just billing — abuse prevention

We block runaway agents.
Before they cost you anything.

Pay Token spend caps + rate limits are checked at the gateway. A misbehaving agent in an infinite loop hits the wall instantly — your API never sees the request, your AWS bill never moves. The blocked-request feed in your dashboard shows you what we caught.

Blocked request feed (sample)
14:21:08spend_cap_exceeded$12.40
14:19:55rate_limit_exceeded$0.78
14:15:02permit_revoked$0.04
14:11:30spend_cap_exceeded$8.20

Sample data — live feed lands Q3 2026.

Coming Q3 2026 · Early access

Margin dashboard.

AI cost vs. revenue per agent, per endpoint, per token. Catch margin leaks before they compound. The metric Stripe / Orb / Metronome don't natively show — because their buyers don't have $0.50 of OpenAI cost behind every $0.05 of revenue. Yours do.

Join early access →

Open core, like Supabase & Clerk

Fork the SDK.
Let us host the boring stuff.

Pure-OSS billing infra dies the moment funding does. Pure-SaaS billing infra is lock-in by design. Open core is the only honest middle: MIT-licensed SDK + hosted execution. If we vanish, your integration keeps working.

Open · MIT

What you can fork

  • @lemon-cake/mcp-sdk
  • @lemon-cake/x402-server
  • agent-payment-mcp
  • examples/* (starter templates)
  • MCP adapters (Claude / Cursor / LangChain)
  • All docs and migration guides
Hosted

What we run as a service

  • Billing engine (settlement, ledger)
  • Revenue routing & payout logic
  • Dashboard (analytics, payouts, abuse)
  • Compliance (tax, invoicing, reporting)
  • Fraud / abuse detection
  • Hosted gateway & uptime SLA

MIT · Supabase / Clerk / Resend pattern · 5 production MCPs published

Safety rails

Kill switch

One-click revoke on the dashboard. Subsequent charges return 422 atomically.

Tiered limits (KYA)

$10/day default → $1k/day with Know-Your-Agent → $50k/day with full KYC.

Sandbox mode

Issue test tokens that match production behavior but never move real USDC.

Launch Plan · Private Beta

Turn your AI API into
a paid API today.

No monthly fee. Pay 3% only when your API earns. Start free — your first 3,000 calls, with gateway, Pay Token, spend limits, and metering all included.

No credit card. Manual onboarding (~24h) during Private Beta.