
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 分