Labsco
MCP SERVER

SerpApi MCP Server

by ilyazub

One search tool covering every SerpApi engine — Google, Amazon, YouTube, Scholar, eBay and more — with a Markdown output mode that cuts token use by half on average.

Web Search Engines
Summary
The output modes are the feature.

Search results are the classic way to blow a context window — a single SERP response can be thousands of tokens of nested JSON. This server gives you three levers: Markdown output, a compact JSON mode that strips metadata, and, in hosts that support MCP Apps, table and dashboard tools that render the results as UI so the payload never reaches the model at all. One tool across all engines keeps the tool list small too.

What it is

The MCP server for SerpApi, available as a hosted service at mcp.serpapi.com or self-hostable. Rather than a tool per engine it exposes one search tool that takes the engine and its parameters, with per-engine parameter schemas published as MCP resources so a client can look up what an engine accepts.

What you get
  • A single tool spanning every SerpApi engine — Google, Bing, Yahoo, DuckDuckGo, YouTube, eBay, Amazon, Google Scholar, the Apple App Store and more — `search`
  • Per-engine parameter schemas exposed as resources, so the model can discover what an engine takes rather than guessing — `serpapi://engines` for the index and `serpapi://engines/<engine>` for one
  • Response shaping that matters for context budget: `params.output` set to `md` returns Markdown, which the project says cuts token usage by 50% on average and by more than 90% for APIs with deeply nested JSON, while `mode` set to `compact` strips metadata from the JSON
  • Result types detected and formatted automatically — answer boxes, organic results, news, images, shopping
  • Weather and stock data reachable through ordinary search queries
  • Two opt-in tools for hosts that support the MCP Apps extension, which render results as interactive UI so the bulk SERP JSON never enters the model's context — `search_table` for a sortable table, `search_dashboard` for summary metrics, a source-breakdown chart and click-to-expand detail
  • Hosts without MCP Apps support simply ignore those two tools and lose nothing
Requirements

A SerpApi API key from your SerpApi dashboard. For the hosted service, that is all: point the client at `https://mcp.serpapi.com/YOUR_SERPAPI_API_KEY/mcp` over HTTP, or use header authentication with `Authorization: Bearer YOUR_API_KEY` against `https://mcp.serpapi.com/mcp`. Self-hosting needs Python 3.13 or higher with `uv` (`uv sync && uv run src/server.py`), or the Docker image, and the same key. `params.q` is the only required search argument; `params.engine` defaults to `google_light`. Licensed MIT.

Setup effort

One command plus a key — claude mcp add --transport http serpapi https://mcp.serpapi.com/YOUR_SERPAPI_API_KEY/mcp, then supply credentials