
Agent Payment
io.github.evidai由 GitHub 账号 evidai 发布v0.9.1更新于 Oct 24, 2026
Stripe-style USDC billing for any API. 8 free demo services no signup. Non-custodial.
概览
让 AI 代理通过 LemonCake 的 x402 付费通道调用付费 API,并管理代理的花费上限与身份。
- 可以做什么
- 通过 x402 付费通道调用 API:代理可经 LemonCake 网关调用付费端点,并在预算内自动付款。提供 8 个免费演示工具,无需注册即可试用。管理代理身份:可将 Pay Token 绑定到代理、查看各代理的花费汇总,并暂停、恢复或撤销代理。
- 适用场景
- 当你希望让 AI 代理在无人介入的情况下调用付费 API,或想先用免费演示工具试用 x402 付费流程时使用。若你只需要普通 API 调用,则不需要这层付费机制。
- 运行要求
- 以 npm 包在本地运行(需要 Node.js)。调用付费 API 需设置环境变量 LC_PAY_TOKEN;自主充值需在 /app 获取 Buyer Key 并先绑定银行卡。需连接 lemoncake.xyz 网关。
安装
在 SourceWeft 中
- 打开 控制台中的 Agent Payment,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
🍋 LemonCake
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
[An AI agent pays for paid API calls on its own — spend-capped, no crypto]
☝️ 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:
Pick your path:
Buyer-side MCP — try in 30 seconds
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.
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.
🧱 Open core
💳 How payment works
For buyers (human or agent)
- Open a buy link (
lemoncake.xyz/buy/<shortId>) - Pay with a card → Pay Token (JWT) issued automatically
- Pass
Authorization: Bearer <token>to the gateway - Gateway verifies, meters, forwards to the real API
- Budget exhausted → 402 challenge returned with payment instructions
For agents (fully autonomous)
- Issue a Buyer Key (
bk_...) at /app → Pay Tokens pane - Save a card once at /agent/fund
- Agent calls
POST /api/lc/agent/tokens(Bearer bk_) → off-session card charge → JWT - Agent uses JWT to call gateway — hard-capped, no human in the loop
🏗 Publish your API on LemonCake (sellers)
Monetize any HTTP API or MCP server:
- Sign in at lemoncake.xyz/app
- Add API — paste your URL, set price per call (e.g.
$0.01) - Share the buy link, or issue a Seller Key (
sk_live_…) to charge from your own server - You keep 97%. LemonCake takes 3% (Stripe Connect Direct Charge). Never holds funds.
Scaffold a paid MCP in one command — sandbox by default, production with one env var:
Add billing to any tool with the SDK (@lemon-cake/mcp-sdk v1, no crypto):
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/revokean 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.
✨ Features
For agents / buyers
- ✅ x402 native — 402 challenge returns
accepts[]with price + mintUrl - ✅ Hard-capped — per-mint / daily / monthly limits, server-enforced
- ✅ Off-session top-up — agent self-funds via Buyer Key (
bk_...), no prompts - ✅ Demo Mode — 8 free tools, try without any setup
For API providers / sellers
- ✅ 5-min go-live —
npx create-lemon-mcp, orlc.charge()on any tool, or route through the gateway - ✅ Custody-free — Stripe Connect Direct Charge, 97% goes directly to seller
- ✅ Usage ledger — every call recorded, revenue visible in dashboard
- ✅ Buy link — share one URL, buyers self-serve
For agent fleets / operators
- ✅ Per-agent identity — bind Pay Tokens to an agent, attribute spend
- ✅ Per-agent kill switch — pause / resume / revoke, enforced at the gateway
- ✅ Spend rollup — budget / spent / calls per agent
- ✅ No balance pool — custody-free; budget = the agent's bound Pay Tokens
Infrastructure
- 🔧 Stripe Connect Direct Charge (no custody)
- 🔧 x402 gateway with
WWW-Authenticate: Lemoncake-Prepaid - 🔧 EN / 日本語 / Español dashboard
- 🔧 JP FSA: registration not required (confirmed 2026-06)
🏗 Architecture
LemonCake is the middle box. It never holds funds — money flows Stripe → seller via Direct Charge.
🌍 Compliance
Japan FSA Fintech Support Desk (2026-06) confirmed: no registration required. Custody-free design (Stripe Connect Direct Charge, no pooled balance).
🔌 Package family
🛡 Security
- Server-side hard caps — per-mint / daily / monthly, cannot be exceeded
- Pay Token = signed JWT — HS256, verified on every gateway call
- upstream_auth never exposed — seller's real API key hidden from buyers
- RLS on all DB tables — Supabase row-level security enabled
- Stripe Connect Direct Charge — LemonCake never holds funds
来源:README.md,提交 f28f563
工具
0版本历史
1- v0.9.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分