l402-search-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@l402-search-mcpsearch for latest AI news"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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_hashThe agent pays the invoice with its own wallet — e.g.
nwc-mcp'snwc_pay_invoice, under the agent's own budget capssearch(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.
Related MCP server: giskard-search
Install
npx -y l402-search-mcpClaude Code (project scope):
claude mcp add l402-search -s project -- npx -y l402-search-mcpClaude Desktop (claude_desktop_config.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
Tool | Price | What it does |
| sats (set by the endpoint; 50 on the default) | First call returns the invoice; the call with |
| free | Endpoint 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):
SEARCH_SERVICE_URL=https://llmops-search.fly.dev # any L402 search endpoint
CHALLENGE_TTL_SECONDS=900 # match the endpoint's macaroon TTL
AUDIT_LOG_PATH=./l402-search-mcp-audit.log # NDJSON, append-only
HTTP_TIMEOUT_MS=15000The 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 · ⚡ sovereigncitizens@getalby.com
Available Tools
2 toolssearchA
No-KYC web search, paid per query in Lightning sats (L402). Call with just query → returns a bolt11 invoice + payment_hash. Pay the invoice with your wallet tool (e.g. nwc_pay_invoice), then call again with the SAME query plus payment_preimage from the pay result → returns JSON results. Each payment buys exactly one search of exactly that query.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query. Must be identical on the paid retry. | |
| payment_preimage | No | 64-hex preimage returned by your wallet after paying the invoice. Omit on the first call. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses the two-step payment protocol, the requirement for identical query on retry, and that each payment buys exactly one search. It covers the entire behavior needed to use the tool correctly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense paragraph of about 4 sentences, front-loaded with the key feature 'No-KYC web search, paid per query'. It is clear but could be more structured (e.g., bullet points) for even quicker parsing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description explains the usage process well, it lacks details about the output format (beyond 'returns JSON results') and error scenarios (e.g., invalid preimage, expired invoice). Given no output schema, more information about the return structure would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema already describes both parameters (query and payment_preimage) with 100% coverage. The description adds valuable context about the two-step process, that query must be identical, and that payment_preimage is omitted on first call, enhancing understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it's a web search tool with a unique payment mechanism via Lightning (L402). It distinguishes from the sibling tool 'search_service_info' which likely provides service info, not search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a step-by-step process for using the tool: first call with query to get invoice, pay, then second call with query and payment_preimage. It explicitly says to omit payment_preimage on first call and to use a wallet tool like nwc_pay_invoice. No explicit when-not-to-use, but the process is well-defined.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_service_infoA
Free: status of the configured L402 search endpoint — reachability, price, and how the payment flow works.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the tool is free and returns status, reachability, price, and payment flow information. No side effects are mentioned, but it is logically read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with key info 'Free:', and uses lists to convey scope. Extremely concise with no superfluous text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no parameters and no output schema, the description adequately explains what the tool returns. Could potentially detail how to interpret results, but overall sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so baseline score applies. Description adds no parameter info, which is acceptable given zero parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it checks the status of the L402 search endpoint, including reachability, price, and payment flow. This distinguishes it from the sibling 'search' tool by focusing on service health rather than performing searches.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage is to check the search service before using the search tool, but lacks explicit when-not or alternative guidance. The 'Free:' prefix hints at no cost, but no detailed usage conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools have clearly distinct purposes: 'search' performs a paid query, while 'search_service_info' provides free metadata about the service. There is no overlap in functionality.
Both tools start with 'search', but one is a single verb while the other is a compound noun. The pattern is mostly consistent, though not fully uniform.
With only 2 tools, the surface is minimal. For the niche L402 search domain, it may be sufficient, but it feels slightly thin compared to typical integration scopes.
The set covers the core workflow: check service status and perform a paid search. However, missing features like invoice management or search history create minor gaps for advanced use cases.
Maintenance
Related MCP Connectors
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Scrape, crawl and search the web for AI agents via MCP.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Web search and URL-to-markdown for agents. Pay per call in USDC on Base, no signup.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceFully decentralized P2P web search engine for LLMs. Crawls, indexes, and searches the web via a peer-to-peer network — no API key, no billing. Exposes 5 MCP tools: web_search, fetch_page, crawl_url, fact_check, and status.5MIT
- AlicenseAqualityBmaintenancePay-per-use semantic web search for AI agents. Powered by SearxNG, agents pay in sats via Lightning Network micropayments — no API keys required.51Apache 2.0
- AlicenseAqualityDmaintenanceAn MCP server that provides real-time web search to AI agents via a pay-per-search USDC microtransaction system.5671MIT
- AlicenseNot gradedqualityDmaintenanceEnables web search for AI agents with pay-per-search in USDC, no API keys needed.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/llmops-pro/l402-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server