🍋 LemonCake — Billing & budgets for AI agents
🍋 LemonCake — KI-Agent-Wallet & USDC Pay-per-call MCP-Server
🎮 Sofort ausprobieren — keine Registrierung erforderlich. Klicke oben auf "Try in Browser" → lass BEIDE Felder für Umgebungsvariablen LEER → klicke auf Start Inspector. Der Demo-Modus greift auf echte Wikipedia- / httpbin- / Live-FX-APIs zu. Kein Konto, keine Karte, kein API-Key.
📦 v0.5.0 Umbenennung: Das npm-Paket heißt jetzt
pay-per-call-mcp(vormalslemon-cake-mcp). Der alte Name funktioniert weiterhin als dünner Wrapper, aber neue Konfigurationen solltennpx -y pay-per-call-mcpverwenden.
Gib deinem KI-Agenten eine Wallet. Pay-per-call USDC-Zahlungen für jede HTTP-API — direkt aus Claude Desktop, Cursor, Cline oder jedem anderen MCP-Client. Kein Mensch im Prozess, keine API-spezifischen Registrierungen, kein Jonglieren mit API-Keys.
Mit dem MCP-Server von LemonCake können Sie über MCP-kompatible Clients wie Claude Desktop, Cursor oder Cline kostenpflichtige APIs ohne menschliches Eingreifen mit USDC aufrufen.
Englisch ↓ Quickstart · Tools · Use Cases · Kompatibilität
🚀 3 Minuten Schnellstart
Für die Nutzung des MCP-Servers sind ein LemonCake-Konto und ein USDC-Guthaben erforderlich.
Kostenloses Konto erstellen — Erledigt mit nur einer E-Mail-Adresse.
Guthaben aufladen — Mindestens $5 USDC oder JPYC (Billing).
Buyer JWT kopieren — Über Dashboard → API Keys.
In der unten stehenden
claude_desktop_config.jsonkonfigurieren.
📚 Details: Quickstart-Dokumentation
Related MCP server: @arispay/payagent-mcp
📦 Installation
Für Claude Desktop
Füge dies zu ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) oder %APPDATA%\Claude\claude_desktop_config.json (Windows) hinzu:
{
"mcpServers": {
"pay-per-call": {
"command": "npx",
"args": ["-y", "pay-per-call-mcp"],
"env": {
"LEMON_CAKE_BUYER_JWT": "eyJhbGci..."
}
}
}
}Starte Claude Desktop neu, und die LemonCake-Tools erscheinen unter dem 🔨 Werkzeug-Symbol.
Cursor / Cline / Andere MCP-Clients
Verwende analog dazu den Server-Startbefehl npx -y pay-per-call-mcp und setze LEMON_CAKE_BUYER_JWT als Umgebungsvariable.
Node.js-Anforderung: v20 oder höher
🛠️ Verfügbare Tools
Tool-Name | Zweck | Hauptparameter |
| Ersteinrichtungs-Guide (gibt Anweisungen zur Kontoerstellung/Aufladung) | — |
| Liste der im LemonCake-Marktplatz verfügbaren kostenpflichtigen APIs |
|
| Aufruf eines Dienstes mit Bezahlung via Pay Token |
|
| Aktuelles USDC-Guthaben und KYA-Limit abrufen | — |
| Überprüfung der Registrierungsnummer für qualifizierte Rechnungen über die NTA-API |
|
| Nutzungsstatistiken und Abrechnungshistorie pro Dienst | — |
Alle Argument-Schemata sind über den MCP Inspector oder tools/list abrufbar.
🎮 Demo-Modus (Testen ohne Anmeldedaten)
Wenn du den Server startest, ohne LEMON_CAKE_BUYER_JWT / LEMON_CAKE_PAY_TOKEN zu setzen, wechselt er automatisch in den DEMO-MODUS. Folgendes funktioniert ohne Registrierung:
list_services→ Zeigt den echten Marktplatz + 3 Demos:demo_search(Wikipedia),demo_echo(httpbin),demo_fx(open.er-api).call_service→demo_*-Dienste rufen echte kostenlose APIs auf und liefern Rohdaten (keine Kosten, keine Authentifizierung).check_balance→ Gibt ein Mock-Guthaben von$1.00zurück (mode: "demo").check_tax/get_service_stats→ Wie gewohnt (erfordern ohnehin keine Authentifizierung).
→ Auch im Glama Inspector oder in der npm-Testumgebung kannst du das Verhalten ohne Konfiguration prüfen. Wenn du echte kostenpflichtige APIs aufrufen möchtest, setze einfach LEMON_CAKE_PAY_TOKEN.
💡 Try these prompts (MCP-Prompts)
Dieser Server unterstützt die Prompts-Fähigkeit von MCP. Die folgenden Presets erscheinen im "Prompt Picker" von Glama Inspector / Claude Desktop / Cursor und können mit einem Klick ausgeführt werden:
Prompt-Name | Inhalt | Auth |
🎮 | Demo-Modus: setup → list_services → demo_search → demo_fx in einem Durchgang | Nein |
🛍 | Listet alle Dienste des echten Marktplatzes und empfiehlt Top 3 nach Zweck | Nein |
🇯🇵 | Validierung der Steuernummer für qualifizierte Rechnungen via NTA + Quellensteuerprüfung | Nein |
💰 | Demonstriert Budgetverwaltung: check_balance → call_service → check_balance | demo OK / für echte Dienste PAY_TOKEN |
🔄 | Vergleicht dieselbe Abfrage zwischen demo_search und echtem Serper | demo OK / für Vergleich PAY_TOKEN |
🏯 | Japanische Unternehmensrecherche kombiniert mit gBizINFO + NTA + e-Gov | PAY_TOKEN (Demo-Teile nicht nötig) |
→ Sobald du pay-per-call MCP (ehemals lemon-cake) in Glama / Claude Desktop aktivierst, werden diese automatisch als Vorschläge angezeigt.
💡 Anwendungsbeispiel
In Claude Desktop:
„Rufe mit LemonCake
demo_agent_search_apifür 0,50 USDC auf und suche nach 'AI agent payments'.“
Claude führt automatisch aus:
Überprüfung des Setup-Status via
setup(nur beim ersten Mal).call_service(serviceId="demo_agent_search_api", limitUsdc="0.50", body={query:"AI agent payments"}).Zusammenfassung und Antwort mit den Ergebnissen.
🎯 Use Cases
Autonome Forschungs-Agenten — Lass deinen Agenten für Premium-Suche, Scraping oder Daten-APIs bezahlen, ohne deine Kreditkartendaten preiszugeben.
Multi-API-Workflows — Ein JWT, ein Guthaben, Dutzende von Upstream-APIs. Keine Registrierung pro Anbieter oder rotierende Keys nötig.
Compliance-bewusste Ausgaben — KYA-Limits (Know-Your-Agent) begrenzen, wie viel ein Agent pro Sitzung/Tag ausgeben darf.
Japanische Steuerautomatisierung —
check_taxvalidiert Nummern für qualifizierte Rechnungen gegen die NTA-API für steuerliche Konformität.Idempotente Wiederholungen —
idempotencyKeymachtcall_servicesicher für Wiederholungen, ohne doppelte Abbuchungen zu riskieren.
✅ Getestete Clients
Client | Status | Hinweise |
Claude Desktop (macOS / Windows) | ✅ | Primäres Ziel |
Cursor | ✅ | stdio-Transport |
Cline (VS Code) | ✅ | stdio-Transport |
Claude Code CLI | ✅ | stdio-Transport |
Continue.dev | ✅ | MCP-Unterstützung seit v0.9 |
Benutzerdefinierte MCP-Clients | ✅ | Jeder Client, der MCP 1.10+ über stdio spricht |
🔐 Umgebungsvariablen
Variablenname | Erforderlich | Beschreibung |
| ✅ | Buyer JWT (erhältlich im Dashboard unter Settings → API Keys) |
| — | Pay Token JWT (erforderlich für |
| — | API-Endpunkt (Standard: |
🏃 Lokale Entwicklung
git clone https://github.com/evidai/lemon-cake.git
cd lemon-cake/mcp-server
npm install
npm run build
npm startDocker
docker build -t pay-per-call-mcp .
docker run --rm -i -e LEMON_CAKE_BUYER_JWT=eyJhbGci... pay-per-call-mcpDas Image wird auch für die In-Browser-Vorschau des Glama Inspectors verwendet.
🔗 Links
📄 Lizenz
MIT © LemonCake
Available Tools
6 toolscall_serviceA
Invoke an upstream API service through LemonCake's pay-per-call proxy. Each successful call automatically debits USDC from your wallet via the permit you signed. LemonCake never holds your USDC — the transfer is direct wallet → provider on Base.
PRECONDITIONS:
• LEMON_CAKE_PERMIT env var must be set for real services. Get one in ~30 seconds at
https://lemoncake.xyz/start/v2 (sign in with Google, sign 1 EIP-712 permit, copy the blob).
If missing, the tool returns a structured PERMIT_MISSING error with how-to-fix steps.
• DEMO MODE: any serviceId starting with demo_ works WITHOUT a permit and hits real
free upstreams (Wikipedia / httpbin / Open-Meteo / Nominatim / MyMemory / dictionaryapi /
worldtimeapi / open.er-api). 8 demos cover search / echo / fx / translate / weather /
geocode / time / dictionary — useful for Glama Inspector or new-user trial. They are
marked with mode: "demo" and incur no charge.
• serviceId must come from list_services.
BEHAVIOR: • Returns the upstream response body verbatim (JSON or text), plus the X-Charge-Id and X-Amount-Usdc headers reported by the proxy. • HTTP 402 Payment Required is returned as a normal result (NOT thrown) so the agent can autonomously stop spending when the daily $25 permit cap is exhausted. • Pass the same idempotencyKey to retry safely without double-charging. • This tool spends real money and contacts an external service — it is non-idempotent by default and has external side effects.
x402-COMPATIBLE INTERFACE:
• Successful calls include an x402Receipt field with { scheme, chain, asset, amount,
recipient, paymentIntentId, settledAt }. Same shape as on-chain x402 receipts so the
agent's payment-handling logic is portable.
• If upstream returns an x402 challenge (WWW-Authenticate: x402, X-402-* headers, or
body.x402), it's parsed into x402Challenge for the agent to reason about.
• If upstream returns 202 + Retry-After + X-Payment-Status: pending, the result is
{ status: "PAYMENT_PENDING", paymentIntentId, retryAfterMs, retryContract }.
Re-call with the same idempotencyKey to resume — no double-charge.
Returns: { status, chargeId, amountUsdc, response, x402Receipt?, x402Challenge?, hint? }
Inputs: serviceId (required), body, path, method, +1 more.
check_balanceARead-onlyIdempotent
Check the current on-chain USDC balance of the wallet that owns the configured permit.
PRECONDITIONS: • DEMO MODE (no LEMON_CAKE_PERMIT): returns a canned $1.00 demo balance so trial users see something useful before signing. • LIVE: queries Base USDC.balanceOf(owner) directly + reports remaining daily permit cap. LemonCake's backend doesn't store the balance — it's read from the chain.
Use BEFORE call_service to confirm sufficient funds and remaining daily cap.
Returns: { balanceUsdc, dailyCap, remainingToday, ownerAddress, [mode], [note] }
Inputs: no named parameters.
check_taxARead-onlyIdempotent
Run a Japanese tax compliance check on a single transaction. No authentication required.
Performs three checks in one call:
Validates the qualified-invoice registration number (T-number) against the NTA registry.
Determines whether source-withholding (源泉徴収) applies based on the service description.
If withholding applies, computes the withholding amount and net payable.
Intended for Japanese corporations that pay AI / API services and need to file withholding correctly under the qualified-invoice (インボイス制度) regime.
Returns: { invoice: { valid, name, ... }, withholding: { required, rate, amount, net } } Errors: invalid registrationNumber returns invoice.valid = false (not an exception).
Inputs: grossAmountJpy (required), registrationNumber (required), serviceDescription (required).
get_service_statsARead-onlyIdempotent
Return public usage statistics for every approved service on the marketplace. No authentication required.
Use this AFTER list_services and BEFORE call_service to pick a service based on real-world traction (call counts, USDC revenue, last-used timestamp).
Returns: an array of { serviceId, callCount, totalRevenueUsdc, lastCalledAt }.
Inputs: no named parameters.
list_servicesARead-onlyIdempotent
List approved API services available on the LemonCake marketplace. No authentication required.
Use this BEFORE call_service to discover serviceId values and per-call USDC pricing.
When LEMON_CAKE_PERMIT is missing, 8 demo services are prepended: demo_search → Wikipedia opensearch demo_echo → httpbin.org/anything demo_fx → live FX rates (open.er-api) demo_translate → 80+ languages (MyMemory) demo_weather → current weather any lat/lon (Open-Meteo) demo_geocode → place name → lat/lon (OpenStreetMap Nominatim) demo_time → IANA timezone time + DST (worldtimeapi) demo_dictionary → English definitions / synonyms (dictionaryapi.dev) All real upstreams, no auth, free. Live users (permit set) see real marketplace entries; demo_* IDs remain callable directly.
Each item: { id, name, provider, type ('API' | 'MCP'), pricePerCall, [usage], [mode] }.
Errors: HTTP-level errors are returned as Error: API <status>: <body>.
Inputs: limit.
setupARead-onlyIdempotent
Show the LemonCake MCP first-run setup guide. No authentication required. Call this tool FIRST to learn what is missing and how to obtain a permit.
If LEMON_CAKE_PERMIT is not set, the server is in DEMO MODE: list_services returns 8 free demo services (search / echo / fx / translate / weather / geocode / time / dictionary) powered by real upstreams (Wikipedia, httpbin, Open-Meteo, Nominatim, etc.). call_service and check_balance respond with mock data so you can verify integration before signing.
Returns the current credential status (permit presence), demo-mode flag, and step-by-step instructions for getting a permit at /start/v2, including a sample MCP client config snippet ready to paste.
Returns: { version, apiUrl, mode, credentials, availableTools, setupSteps, permitUrl, docs } Errors: none — this tool always succeeds.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct role: setup guides onboarding, list_services discovers offerings, call_service executes paid calls, check_balance monitors funds, check_tax handles compliance, and get_service_stats provides marketplace analytics. There is no meaningful overlap or ambiguity between them.
Tool names follow a consistent snake_case verb_noun pattern: list_services, call_service, check_balance, check_tax, get_service_stats. Even 'setup' fits as a single-word imperative without breaking the overall stylistic consistency.
Six tools is a well-scoped count for a billing/proxy service: onboarding, discovery, execution, balance checking, tax compliance, and usage stats each earn their place. The server feels neither bloated nor thin.
The core lifecycle is well covered: discover services, call them, check balance, and verify tax obligations. Minor gaps exist, such as no explicit transaction-history or budget-configuration tool, but the daily cap and receipt fields mitigate these and the main workflows are complete.
Maintenance
Related MCP Connectors
Machine-payable API infrastructure for autonomous agents. Per-call x402 settlement in USDC.
30 pay-per-call APIs for AI agents: compliance, trade, safety, web, data. USDC on Base via x402.
Non-custodial stablecoin bill-pay rails on Celo & Base for AI agents, settled on-chain via MCP.
Pay-per-use MCP tools for AI agents. USDC on Base via x402. No API keys.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to manage USDC wallets on Solana, allowing them to send payments, create invoices, and access paid APIs within human-defined spending limits. It uses threshold signatures to provide agents with financial autonomy while ensuring secure oversight and transaction approval.36248 npm4Apache 2.0

@arispay/payagent-mcpofficial
AlicenseAqualityBmaintenanceEnables AI agents to call paid APIs and settle HTTP 402 payment challenges with USDC on Base, without private keys ever being involved.7444 npmMIT- AlicenseAqualityDmaintenanceLets AI agents discover, pay for, and call any HTTP API per request using USDC, with gasless nanopayments and no API keys or accounts needed.561 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to make non-custodial USDC payments on Base through an MCP endpoint, with server-enforced per-payment and daily caps, human approval bands, and recipient allowlists.739 npmMIT