
MeshSearch
Search privately. Pay anonymously. Trust no one.
About
The problem it solves ## The Problem It Solves **Every web search you make is a data exhaust trail.** Google, Bing, and most AI search tools log your IP, your queries, and your patterns — building a profile that's sold, subpoenaed, or breached. MeshSearch makes private web search practical for both humans and AI agents: - **AI agents that search the web leak their user's intent.** MeshSearch gives Claude, Cursor, and any MCP-compatible agent a search tool where queries are ZK-committed before leaving the device — the relay network never sees the plaintext query. - **Anonymous micropayments instead of surveillance.** Instead of paying with your attention and identity, you pay per-search with USDC via x402 — no account, no tracking, just a wallet signature. - **Auditable routing, not a black box.** Traffic routes through 3 ENS-named relay hops. Every result shows which relay operators handled your traffic — you can verify it on-chain. - **Your history, under your key.** Search history is AES-256-GCM encrypted with your wallet key and stored on Fileverse. Only you can decrypt it. No server ever sees plaintext.
How it's made
Challenges we ran into ## Challenges I Ran Into **1. Getting the x402 payment flow to actually fire** The MCP tool was returning results without triggering payment — the 402 response was being swallowed silently. The fix was separating the payment gate into its own `/api/paid-search` endpoint on the Next.js side and ensuring the client re-sent the request with the signed USDC authorization attached. **2. ENS resolution was fake** The relay routing code was pattern-matching strings like `relay1.meshsearch.eth` instead of actually resolving them on L1. Swapped in `@ensdomains/ensjs` v4 with `ensPublicActions` on a viem client — now relays do real forward/reverse resolution at startup and each routing decision. **3. Using the wrong Fileverse product entirely** First pass used Fileverse's low-level Storage V2 IPFS API (UCAN tokens, multipart uploads, Contract/Invoker/Chain headers). The hackathon integration was actually the **dDocs API** — a completely different product with simple REST + API key auth (`POST /api/ddocs`, `GET /api/ddocs/:ddocId`). Rewrote the storage service from scratch once the hackathon docs clarified the correct endpoint surface. **4. ZK proof generation being synchronous in tests** Semaphore v4 Groth16 proof generation blocked the event loop long enough to cause test timeouts. Moved proof generation to a worker and added `vi.setSystemTime` mocking in tests to avoid flakiness.