Add Live Web Search to Claude and Cursor via MCP
The Serpex MCP server gives Claude Desktop, Claude Code and Cursor a working serpex_search tool in a few minutes, no API wrapper code required. You add one JSON block, restart or reload, and the agent can search the live web on its own.
Below is the exact config for each client, how to confirm it actually connected, and what each call costs in credits.
What is MCP, in two sentences?
MCP (Model Context Protocol) is an open standard for connecting an AI application to external tools and data sources, the same way a USB port connects hardware regardless of the manufacturer. A client like Claude Desktop or Cursor runs an MCP server as a subprocess, discovers whatever tools that server exposes, and lets the model call them mid-conversation.
What does the Serpex MCP server give me?
Once configured, the server exposes exactly one tool:
serpex_search: search the live web and get back structured JSON (titles, URLs, snippets, positions), with an option to also return each page's content as markdown.
That's the whole tool surface. No separate content-fetch tool: pass include_content: true and content_results (5 or 10) as arguments to serpex_search itself and the page content comes back inline with the results, in the same call.
What do I need first?
A Serpex API key. Sign up at serpex.dev, 200 free credits, no card. You'll set it as SERPEX_API_KEY in each client's config below. It never touches your code, and the server reads it from the environment at startup.
How do I add it to Claude Desktop?
Open the config file directly, or open Claude Desktop, go to Settings > Developer, and click Edit Config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this block:
{"mcpServers": {"serpex": {"command": "npx","args": ["-y", "serpex-mcp"],"env": {"SERPEX_API_KEY": "sk_your_api_key"}}}}
Save the file and fully quit and restart Claude Desktop (not just close the window). It's the step that's easiest to skip, and Claude Desktop only reads this file on launch.
How do I add it to Cursor?
Cursor reads MCP servers from a JSON file called mcp.json. There are two locations, depending on whether you want the server available everywhere or just in one project:
- Global (all projects):
~/.cursor/mcp.json - Project only:
.cursor/mcp.jsonin your repo root
Same JSON shape as Claude Desktop:
{"mcpServers": {"serpex": {"command": "npx","args": ["-y", "serpex-mcp"],"env": {"SERPEX_API_KEY": "sk_your_api_key"}}}}
Cursor picks up the file without a restart in most cases, but if the server doesn't appear, reload the window.
How do I add it to Claude Code?
Claude Code has a CLI command for this, so you don't hand-write JSON at all:
claude mcp add --env SERPEX_API_KEY=sk_your_api_key --transport stdio serpex -- npx -y serpex-mcp
The -- matters: everything before it is Claude Code's own flags, everything after it is the exact command used to start the server. By default this adds the server locally to the current project. Add --scope user to make it available in every project on your machine, or --scope project to write it to a .mcp.json file you can commit and share with your team.
# available in every project, just for youclaude mcp add --env SERPEX_API_KEY=sk_your_api_key --transport stdio --scope user serpex -- npx -y serpex-mcp
How do I check it's actually working?
Claude Desktop: click the "Add files, connectors, and more" control at the bottom left of the chat box, then Manage connectors. You should see serpex listed with serpex_search in its tool list. If it's missing, quit Claude Desktop completely (check your system tray or dock, it sometimes stays running in the background) and reopen it.
Cursor: open Cursor Settings and find the MCP section. serpex should be listed as enabled, with serpex_search underneath it. If it shows an error instead, the cause is almost always a missing env value or a typo in the JSON.
Claude Code: run claude mcp list from your terminal, or type /mcp inside a session. Either one shows serpex with a connection status (Connected, Failed to connect, or similar) and its tool count.
Once it's connected in any client, just ask something the model can't already know: "search the web for today's top story about the Vercel AI SDK" is a reliable way to force a tool call and see it work.
What does it cost in credits?
Credits come out of the same Serpex balance whichever client is calling the tool:
- A plain
serpex_searchcall: 1 credit. - With
include_content: true: 3 credits when 1 to 5 pages come back with content, 6 credits when 6 to 10 do. You ask for 5 or 10 withcontent_results, and you pay for what was delivered. - If page content fails to come back for every requested result, you're only charged the plain search rate of 1 credit, never the content rate for content you didn't get.
- The same query repeated by your organization within about 5 minutes: 0 credits.
Page content fetching is best-effort: in practice content comes back for roughly 79% of requested results, since some pages block fetching or disallow it in robots.txt. Those come back with a content_error field instead of content, and a failed fetch on its own is never billed.
FAQ
Does one config work for every MCP client?
Almost. The JSON shape (mcpServers, command, args, env) is the same everywhere. Only the file location and how you trigger a reload differ by client.
Do I need to keep a terminal open for this to run?
No. npx -y serpex-mcp runs as a subprocess of the client itself, started and stopped automatically. You only run it manually from a terminal if you're testing the server standalone.
Can I use the same API key in Claude Desktop, Cursor and Claude Code at once? Yes. Credits are shared across your whole organization regardless of which client made the call, so watch your balance if you've wired it in everywhere.
What if the server shows as failed to connect?
Check that SERPEX_API_KEY is set correctly in the config (not left as the placeholder), that Node is installed so npx resolves, and that you fully restarted the client after saving.
Sign up for 200 free credits, no card required, and have your agent searching the live web in the next five minutes.