Skip to main content
Glama
evidai

πŸ‹ LemonCake β€” drop-in USDC billing for any API Β· monetize in 1 line Β· x402 + MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}
logging
{}
prompts
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
setup

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.

list_services

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>.

call_service

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? }

check_balance

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] }

check_tax

Run a Japanese tax compliance check on a single transaction. No authentication required.

Performs three checks in one call:

  1. Validates the qualified-invoice registration number (T-number) against the NTA registry.

  2. Determines whether source-withholding (ζΊζ³‰εΎ΄εŽ) applies based on the service description.

  3. 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).

get_service_stats

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 }.

Prompts

Interactive templates invoked by user choice

NameDescription
explore-demo[FREE Β· no auth needed] Walks Claude through all 8 demo services (search, fx, translate, weather, geocode, time, dictionary, echo). Best first step on Glama Inspector to confirm the server is alive and useful even without a permit.
japan-tax-check[FREE Β· no auth needed] Uses the check_tax tool to verify a ι©ζ Όθ«‹ζ±‚ζ›Έη™Ίθ‘ŒδΊ‹ζ₯­θ€…η•ͺ号 against the NTA registry. ChatGPT/Gemini cannot do this β€” they hallucinate registration numbers. Real second demo.
discover-marketplace[FREE Β· no auth needed] Lists every approved service with its category and price. Useful before deciding whether to sign a permit.
spend-with-budget[REQUIRES permit β€” sign one free at lemoncake.xyz/start/v2] Pattern: check_balance β†’ call_service β†’ check_balance again, demonstrating the on-chain daily cap enforced by the permit.
real-vs-demo[FREE for demo half Β· permit needed for real half] Hits the same logical query against demo_search (Wikipedia, free) and a real marketplace search service to see the difference. Gracefully skips the paid half if no permit is set.
japan-finance-bundle[REQUIRES permit for gBizINFO + e-Gov Β· check_tax part is free] Combines gBizINFO 法人情報 + ε›½η¨ŽεΊ invoice check + e-Gov 法什 in one workflow.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/evidai/lemon-cake'

If you have feedback or need assistance with the MCP directory API, please join our Discord server