Blog

Add Live Web Search to Claude and Cursor via MCP

By Kartey R

Founder of Serpex

Updated 6 min read
Technology

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. Each search returns up to 10 results and, when the agent asks, the top pages as clean Markdown in the same call. New accounts get 200 free credits with no card.

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 two tools:

  • 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.
  • serpex_extract: turn up to 10 known URLs into clean markdown (or HTML). Pages that cannot be extracted come back with an error and are not charged.

For search plus content you do not need the second tool: pass include_content: true and content_results (5 or 10) to serpex_search itself and the page content comes back inline with the results, in the same call. Use serpex_extract when the agent already has the URLs.

What do I need first?

A Serpex API key. Sign up at app.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:

json
{
"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.json in your repo root

Same JSON shape as Claude Desktop:

json
{
"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:

bash
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.

bash
# available in every project, just for you
claude 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_search call: 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 with content_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 70% 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.

Try Serpex

Sign up for 200 free credits, no card required, and have your agent searching the live web in the next five minutes. The docs cover the MCP server and the quickstart, and pricing lists the pay-as-you-go rates, with credits that never expire.

Serpex Blog

Related Articles

More content you might be interested in

Oct 24, 2026 · 8 min read

Vibe Coding Web Search: Add a Search API With Cursor, Claude Code or Lovable

Add web search to an app you build with AI, no coding needed: get a key, give your agent the docs, keep the key server-side. Cursor, Claude Code, Lovable.

Technology
Read More
Oct 24, 2026 · 14 min read

Search APIs for Enterprise AI (2026): Security, Rate Limits and Cost at Scale

Questions to ask before signing a search API contract for enterprise AI: security, retention, SLAs, rate limits, billing, and cost at 1M-10M searches.

Technology
Read More
Oct 23, 2026 · 15 min read

PHP2Shell vs the Knowledge Cutoff: CVE-2026-109618, Tested Oct 2026

Only 3 of 36 top-3 search results for PHP2Shell came from the PHP project. We built a 91-line agent that checks CVE-2026-109618 against primary sources.

Technology
Read More
Oct 19, 2026 · 19 min read

Which Search API Is Cheapest at 100k, 1M and 10M Searches a Month? (Prices Checked October 2026)

Search API costs at 100k, 1M and 10M searches a month, checked Oct 23, 2026. Lowest list: $0.20/1k. Serpex: $0.50-$0.80, from $0.20 at 10M+.

Technology
Read More
Oct 19, 2026 · 8 min read

How to Add Web Search to an AI Workflow or RAG Pipeline (Python, 2026)

How to add web search to an AI workflow or RAG pipeline in Python (2026): one call returns pages as Markdown to chunk, rank and cite, with real monthly costs.

Technology
Read More
Oct 19, 2026 · 8 min read

Tavily Pricing in 2026: What 10k, 100k and 1M Searches Cost

Tavily pricing in 2026: $8 per 1,000 credits pay as you go, $5 on Growth. Monthly cost at 10k, 100k and 1M searches, advanced depth, Extract and alternatives.

Technology
Read More
Oct 19, 2026 · 8 min read

Serper vs Tavily (2026): Pricing, Output and Which to Use

Serper vs Tavily in 2026: Serper costs $0.30 to $1.00 per 1,000 searches, Tavily $5 to $8. Free tiers, output, page content, LangChain support and which to use.

Technology
Read More
Oct 19, 2026 · 8 min read

Google Custom Search API Is Closing: What to Use by January 1, 2027

The Google Custom Search JSON API is closed to new users and existing ones must move by January 1, 2027. Replacements and 2026 costs at 10k and 100k searches.

Technology
Read More
Oct 3, 2026 · 7 min read

Web Search in n8n: HTTP Request, AI Agent or Community Node

Add web search to an n8n workflow with the HTTP Request node, use it as an AI Agent tool with $fromAI(), or install the n8n-nodes-serpex community node.

Technology
Read More