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.

已驗證STDIO僅桌面網頁搜尋與抓取金融

概覽

AI 產生的概覽

本機 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。實際支付發票需另備錢包伺服器。需能連線搜尋端點。
安裝前請注意
每次搜尋都會花費 sats,預設端點每次 50 sats,實際由所設定的端點決定。伺服器本身不持有金鑰,但會把發票轉交給助理錢包,付款上限取決於該錢包的額度設定。待處理的搜尋查詢保存在記憶體中,行程遭入侵時可能外洩。查詢內容會傳送給所設定的第三方端點。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 L402 Search Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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:

  1. search(query) → returns a bolt11 Lightning invoice + payment_hash
  2. The agent pays the invoice with its own wallet — e.g. nwc-mcp's nwc_pay_invoice, under the agent's own budget caps
  3. 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

bash
npx -y l402-search-mcp

Claude Code (project scope):

bash
claude mcp add l402-search -s project -- npx -y l402-search-mcp

Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "l402-search": { "command": "npx", "args": ["-y", "l402-search-mcp"] }  }}

Pair it with a wallet server (e.g. nwc-mcp) so the agent can actually pay.

Tools

ToolPriceWhat it does
searchsats (set by the endpoint; 50 on the default)First call returns the invoice; the call with payment_preimage returns results.
search_service_infofreeEndpoint reachability, pending challenges, flow explainer.

Configuration

Everything is optional — the defaults work. Set in the environment or a .env next to the install (never read from cwd):

bash
SEARCH_SERVICE_URL=https://llmops-search.fly.dev  # any L402 search endpointCHALLENGE_TTL_SECONDS=900                          # match the endpoint's macaroon TTLAUDIT_LOG_PATH=./l402-search-mcp-audit.log         # NDJSON, append-onlyHTTP_TIMEOUT_MS=15000

The flow, end to end

agent                    l402-search-mcp              endpoint              agent's wallet  │  search("foo")            │                          │                       │  │ ────────────────────────► │  GET /search?q=foo       │                       │  │                           │ ───────────────────────► │                       │  │                           │  402 {macaroon, invoice} │                       │  │  {invoice, payment_hash}  │ ◄─────────────────────── │                       │  │ ◄──────────────────────── │  (macaroon cached)       │                       │  │  nwc_pay_invoice(invoice) │                          │                       │  │ ──────────────────────────┼──────────────────────────┼─────────────────────► │  │  {preimage}               │                          │                       │  │ ◄─────────────────────────┼──────────────────────────┼────────────────────── │  │  search("foo", preimage)  │                          │                       │  │ ────────────────────────► │  GET + Authorization:    │                       │  │                           │  L402 macaroon:preimage  │                       │  │                           │ ───────────────────────► │                       │  │  {results}                │  200 {results}           │                       │  │ ◄──────────────────────── │ ◄─────────────────────── │                       │

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分