How to Add Web Search to Claude Code, Cursor, Codex, OpenCode & Pi

SearchPipe is a remote MCP Server (streamable-http): one URL gives any AI coding agent real-time web search, full-text page extraction and cited answers. Below are copy-paste configuration snippets for Claude Code, Cursor, OpenAI Codex, OpenCode and Pi.

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 /mcp/ — 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 below and paste the snippet

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

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.

Using the searchpipe_search tool

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

ParameterDefaultDescription
query requiredWhat to search for
max_results51–20 results
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.

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

Free credits on signup — paste one URL into Claude Code, Cursor, Codex, OpenCode or Pi and start searching.

Get an API Key