
L402 Search Mcp
io.github.llmops-pro由 GitHub 账号 llmops-pro 发布v0.1.0更新于 Oct 24, 2026
No-KYC web search for AI agents, paid per query in Lightning sats (L402). Holds no keys.
概览
本地 MCP 服务器,为助手提供按次付费的网页搜索工具,通过 L402 端点以闪电网络 sats 结算,无需 API 密钥。
- 可以做什么
- 对 L402 付费端点发起网页搜索,首次调用返回闪电网络发票和 payment_hash。
- 凭助手自身钱包返回的 payment_preimage 再次调用以取得搜索结果。
- 查看所配置端点的可达性、待处理挑战和付费流程说明。
- 将挑战、结果、端点错误等事件写入仅追加的审计日志。
- 适用场景
- 适合需要网页搜索但不想注册账号、申请 API 密钥或做 KYC 的助手,且已有可在预算上限内支付发票的闪电网络钱包服务器(如 nwc-mcp)。也适合接入自建的兼容 L402 的搜索端点。
- 运行要求
- 通过 npx 在本地运行(需要 Node.js)。无需账号或 API 密钥。可选环境变量:SEARCH_SERVICE_URL(默认指向托管端点)、CHALLENGE_TTL_SECONDS、AUDIT_LOG_PATH、HTTP_TIMEOUT_MS。实际支付发票需要另配钱包服务器。需能访问搜索端点。
安装
在 SourceWeft 中
- 打开 控制台中的 L402 Search Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
l402-search-mcp
No-KYC web search for AI agents — paid per query in Lightning sats, via MCP.
This is an MCP client-side server for L402-paywalled search endpoints. It gives any MCP-capable agent (Claude Desktop, Claude Code, Cursor, nostr-merchant, …) a search tool that costs sats instead of an API key:
search(query)→ returns a bolt11 Lightning invoice +payment_hash- The agent pays the invoice with its own wallet — e.g.
nwc-mcp'snwc_pay_invoice, under the agent's own budget caps search(query, payment_preimage)→ JSON results
No account. No API key. No KYC. Each payment buys exactly one search.
By default it points at https://llmops-search.fly.dev (50 sats/search, run by us), but SEARCH_SERVICE_URL works with any endpoint speaking the same L402 dialect.
The trust model (read this)
This server holds NO keys. Not a wallet connection, not an nsec, nothing. Payment happens in the agent's wallet, where the agent's own budget caps, allowlists, and audit logs apply. l402-search-mcp only:
- relays the L402 challenge (invoice) to the agent,
- remembers which macaroon belongs to which
payment_hash(so the agent only handles the preimage its wallet already returned), - makes the authorized retry.
Worst-case compromise of this process leaks pending search queries — never money.
Install
Claude Code (project scope):
Claude Desktop (claude_desktop_config.json):
Pair it with a wallet server (e.g. nwc-mcp) so the agent can actually pay.
Tools
Configuration
Everything is optional — the defaults work. Set in the environment or a .env next to the install (never read from cwd):
The flow, end to end
The macaroon never round-trips through the LLM — the agent only sees the invoice and hands back the preimage its wallet returned. sha256(preimage) = payment_hash recovers the rest.
Audit log
NDJSON, one line per event: startup, challenge_received, results_received, unknown_preimage, endpoint_error. Same shape as the other servers in the kit.
Part of the LLMOps.Pro agent-payments kit
nwc-mcp (wallet) · nostr-ops-mcp (NOSTR identity/publishing) · marketplace-mcp (storefront) · albyhub-admin-mcp (node admin) · paywall-mcp (sell YOUR tools for sats) · l402-search-mcp (buy search with sats)
MIT. Built by LLMOps.Pro · ⚡ [email protected]
来源:README.md,提交 1d0080f
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分