Add Web Search to Any AI Agent

SearchPipe is a remote MCP Server (streamable-http): one URL gives any AI agent real-time web search, full-text page extraction and cited answers. Below are copy-paste snippets for Claude Code, Cursor, OpenAI Codex, OpenCode and Pi — plus a generic config for your own custom MCP agent. Not using MCP? Call the REST API directly.

Before you start: get an API key and build the MCP URL

Get your API key

Sign up and verify your email — a default API key (prefix sp-) is generated automatically. Reveal it any time under "API Keys".

Build the MCP URL

Append your key to the /mcp/ endpoint (keep the trailing slash) — this single URL is all every client below asks for:

https://searchpipe.tech/mcp/?api_key=sp-YOUR_API_KEY

Tip: the API Keys page has a "one-line setup" copy button — paste that sentence into any agent and it configures itself.

Pick your client — or go generic — and paste the snippet

Jump straight to your agent: Claude Code · Cursor · Codex · OpenCode · Pi · Custom MCP agent.

Verify with a real search

Ask your agent to "use the searchpipe tool to look up the latest FastAPI release notes". A successful searchpipe_search call with source links confirms the setup. Note: a successful MCP handshake alone proves nothing — the handshake is unauthenticated; only a real tool call validates the key.

Claude Code

Fastest path — one CLI command (--transport http selects the remote HTTP transport):

claude mcp add --transport http searchpipe \
  "https://searchpipe.tech/mcp/?api_key=sp-YOUR_API_KEY"

# Confirm it is registered
claude mcp list

Or declare it in project scope via .mcp.json (share with your team via git):

{
  "mcpServers": {
    "searchpipe": {
      "type": "http",
      "url": "https://searchpipe.tech/mcp/?api_key=sp-YOUR_API_KEY"
    }
  }
}

Cursor

Open Cursor Settings → MCP → "Add MCP server", or edit ~/.cursor/mcp.json (global) / .cursor/mcp.json (project) directly:

{
  "mcpServers": {
    "searchpipe": {
      "url": "https://searchpipe.tech/mcp/?api_key=sp-YOUR_API_KEY"
    }
  }
}

Save and toggle the server on in the MCP panel. The same snippet works in Cline, Windsurf and VS Code (.vscode/mcp.json) — they all read a standard mcpServers map.

OpenAI Codex CLI

Codex reads MCP servers from ~/.codex/config.toml. Add a streamable-HTTP server entry with the url field:

[mcp_servers.searchpipe]
url = "https://searchpipe.tech/mcp/?api_key=sp-YOUR_API_KEY"
enabled = true

If you prefer not to put the key in the URL, keep it in an environment variable and let Codex send it as a bearer token:

[mcp_servers.searchpipe]
url = "https://searchpipe.tech/mcp/"
bearer_token_env_var = "SEARCHPIPE_API_KEY"
enabled = true

# In your shell: export SEARCHPIPE_API_KEY=sp-YOUR_API_KEY

Run codex mcp list to confirm the server is loaded, then start a session and trigger a search.

OpenCode

Add a remote MCP entry to opencode.json (project root) — "remote" is the type for streamable-HTTP servers:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "searchpipe": {
      "type": "remote",
      "url": "https://searchpipe.tech/mcp/?api_key=sp-YOUR_API_KEY",
      "enabled": true
    }
  }
}

To keep the key out of the config file, use headers instead:

{
  "mcp": {
    "searchpipe": {
      "type": "remote",
      "url": "https://searchpipe.tech/mcp/",
      "headers": {
        "Authorization": "Bearer sp-YOUR_API_KEY"
      },
      "enabled": true
    }
  }
}

Restart OpenCode so it reloads the config, then check the tools list for searchpipe_search.

Pi (the Pi coding agent)

Pi keeps its core minimal and does not ship an MCP client — MCP support comes from the community extension pi-mcp-adapter. Install it once:

pi install npm:pi-mcp-adapter

Then register SearchPipe in ~/.pi/agent/mcp.json (global) or .pi/mcp.json (project):

{
  "mcpServers": {
    "searchpipe": {
      "url": "https://searchpipe.tech/mcp/?api_key=sp-YOUR_API_KEY"
    }
  }
}

The adapter also supports "imports" — if SearchPipe is already configured in Cursor or Claude Code, you can inherit it instead:

{
  "imports": ["cursor", "claude-code"]
}

Restart Pi after editing; tools appear with an adapter prefix.

Custom / self-built MCP agents

Building your own agent on an MCP client — official Python/TypeScript SDKs or any streamable-http-capable host — needs no client-specific config file. Use the generic mcpServers shape:

{
  "mcpServers": {
    "searchpipe": {
      "type": "http",
      "url": "https://searchpipe.tech/mcp/?api_key=sp-YOUR_API_KEY"
    }
  }
}

If you drive the MCP client from code, point it at the endpoint and pass the key as a header:

Endpoint: https://searchpipe.tech/mcp/
Headers:  Authorization: Bearer sp-YOUR_API_KEY
          Accept: application/json, text/event-stream

Prefer plain HTTP over MCP? Call the REST API POST /search directly with the same key — identical parameters, results and billing. See the API docs or the Search API overview.

Using the searchpipe_search tool

Every client above ends up with the same single tool. Key parameters:

ParameterDefaultDescription
query required—What to search for
max_results5Up to 20 results (1–20); fewer when low-relevance results are filtered out
include_answerfalseAlso generate a cited AI answer
include_raw_contentfalseReturn full extracted page text
search_depthbasicbasic = 1 credit, advanced = 2 credits

Failed or moderated calls are automatically refunded. Full field-level response shape: API docs.

Claim verification: the searchpipe_verify tool

SearchPipe exposes a second MCP tool, searchpipe_verify: send a claim, get back a four-label verdict — supported, partial, unsupported or inconclusive — with the verbatim quotes that decide it. Use it when your agent must check a statement before repeating it: verify a citation the model produced, fact-check a draft answer, or audit sources before publishing. Each call typically takes 5–15 seconds (a real fetch-and-check pipeline, capped at 30s); the same endpoint is available over REST as POST /verify.

ParameterDefaultDescription
claim required—The statement or citation to verify (max 2000 characters)
modeautoEvidence route: paper (DOI/arXiv), web, or auto
evidence_urls—Up to 5 caller-supplied citations to check the claim against
max_evidence5Maximum number of evidence items returned (1–10)

Verdicts are billed per request; an inconclusive verdict is a valid deliverable (not refunded), while a pipeline failure (503) is refunded automatically. Full contract: Verification API.

Troubleshooting

Searches return "Missing valid sp- API key"

The key did not reach the server: the URL lost its ?api_key= part (often a redirect dropping the query string when the trailing slash is missing). Always copy the exact MCP link from the dashboard — it ends in /mcp/?api_key=… — or switch to header-based auth, which survives redirects.

"Invalid or revoked API key"

The key was revoked, or the trailing sp-… got truncated when copying. Re-copy from API Keys.

406 Not Acceptable when testing with curl

Normal for streamable-http: add -H "Accept: application/json, text/event-stream" and request /mcp/ (with the trailing slash).

Pi shows no searchpipe tools

The adapter must be installed before the config takes effect: run pi install npm:pi-mcp-adapter, restart Pi, and check the tools list again.

Related pages

Give your agent real-time web search today

1,000 free credits every month — connect any MCP-compatible agent with one URL, or call the REST API from your own code.

Get an API Key