Skip to main content
Glama
searchapi-mcp
by sudo-dk

searchapi-mcp

A Model Context Protocol server for SearchApi.io. It gives any MCP client (Claude Desktop, Cursor, or your own agent) live, structured results from Google, Google Jobs, Shopping, News, Scholar, Maps, YouTube and 100+ other engines, trimmed down to what a model actually needs.

Why trimming matters

Raw SERP JSON is designed to be complete, not to fit in a context window. One Google Shopping response is about 217 KB, mostly base64 thumbnails and multi-KB product tokens. Passing that to a model costs tens of thousands of tokens and pushes out everything else in the conversation. Each tool here keeps only the fields an agent reasons with: titles, prices, dates, authors, citation counts, links and pagination.

Measured on live responses (Nov 2026):

Engine

Raw response

Tool output

Smaller by

google_shopping (10 items)

217 KB

5.0 KB

43×

google_jobs

121 KB

17.1 KB

7×

google

54 KB

8.3 KB

6×

google_news

45 KB

9.5 KB

5×

youtube

31 KB

7.4 KB

4×

google_maps

29 KB

7.3 KB

4×

google_scholar

26 KB

5.8 KB

4×

Related MCP server: free-search-mcp

Tools

Tool

Engine

Key parameters

Returns

google_search

google

q, location, gl, hl, time_period, page

Organic results, AI overview, answer box, knowledge graph, related questions

google_news

google_news

q, location, time_period, sort_by, page

Articles with ISO dates, top stories

google_jobs

google_jobs

q, location, next_page_token

Title, company, location, schedule/salary, description excerpt, apply link

google_shopping

google_shopping

q, location, price_min, price_max, max_results, page

Title, price, seller, rating, reviews, delivery

google_scholar

google_scholar

q, as_ylo, as_yhi, num, page

Title, authors, publication, citation count, PDF link

youtube_search

youtube

q, gl, hl, page_token

Title, channel, views, length, publish time

search

any

engine, q, extra_params

Engine-specific shaping where available (e.g. google_maps), otherwise a generic clean-up plus available_keys

Every tool returns the same envelope:

  • results and result_count, always.

  • next_page when there's more. Pass it back to the same tool to get the next page.

  • notice when SearchApi returns no results. This is not a tool error, so the agent can try something else.

See examples/ for real outputs and prompts to try.

Setup

git clone https://github.com/sudo-dk/searchapi-mcp.git
cd searchapi-mcp
npm install
npm run build

Get an API key at searchapi.io.

Use with Claude Desktop

Add the server to claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows), then restart Claude Desktop.

{
  "mcpServers": {
    "searchapi": {
      "command": "node",
      "args": ["/absolute/path/to/searchapi-mcp/dist/index.js"],
      "env": { "SEARCHAPI_API_KEY": "your_key_here" }
    }
  }
}

If you'd rather not keep the key in the Claude config, put it in the project's .env and let Node load it (Node 20.6+):

{
  "mcpServers": {
    "searchapi": {
      "command": "/opt/homebrew/bin/node",
      "args": [
        "--env-file=/absolute/path/to/searchapi-mcp/.env",
        "/absolute/path/to/searchapi-mcp/dist/index.js"
      ]
    }
  }
}

Claude Desktop doesn't inherit your shell's PATH. If node isn't found, use the absolute path from which node.

Development

cp .env.example .env   # add your key
npm test               # offline unit tests against recorded responses
npm run smoke          # live end-to-end check over MCP (~10 searches)
  • src/searchapi.ts: the HTTP client and the trimming rules for each engine.

  • src/index.ts: the MCP tool definitions.

  • test/fixtures/: real SearchApi responses, cut down to a few items each.

  • scripts/smoke.mjs: a minimal MCP client that calls every tool against the live API.

Notes

  • Google Jobs coverage: Google Jobs isn't available in every country. In testing it returned listings for the US, UK and Canada but none for Finland, Sweden or Germany. SearchApi rejects gl=fi for this engine outright.

  • The API key is sent in the Authorization header, never in the URL, so it can't end up in error messages or logs.

  • Server logs go to stderr so they never corrupt the stdio JSON-RPC channel.

  • This is an independent open-source wrapper of SearchApi's public API, not an official SearchApi product.

License

MIT, see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Web search API and MCP server for developers building AI agents.

      https://searchpipe.tech/mcp/
    • Your agent needs the open web — searched by more than one engine, and read as clean markdown rather than raw HTML. **What you can ask for** • "Search this question with two providers and tell me where they disagree." • "Scrape these 40 URLs into markdown, in one batch." • "Crawl this documentation site and give me every page." • "Do deep research on this topic and cite the sources." • "Find the academic papers behind this claim." **How to use it** Point any MCP client at https://mcp.aisa.one/search/mcp and sign in with OAuth — there is no key to create or paste. 30 tools across several independent providers: Tavily and Exa search, answers, contents and agent runs; Firecrawl scrape, batch scrape, crawl, map and search; Perplexity Sonar, Sonar Pro, reasoning and deep research; Oxylabs AI search and LLM jobs; OpenAI and Anthropic web search; and scholarly search. **Why this rather than the source** Several independent indexes behind one account, because one engine's blind spot is not visible from inside it. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the page here, then ask the same agent who links to it or how much traffic it gets — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/seo-serp/mcp for the Google results page itself, https://mcp.aisa.one/seo-serp-other-engines/mcp for Bing, Baidu and Naver.

    • Free web search for AI agents. No API key required. Hosted MCP in active development.

      https://api.ssearch.cc/mcp
    • Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.

      https://pixserp.com/api/v1/mcp

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A comprehensive MCP server providing 15 web tools including search, scraping, screenshots, SEO audits, and DNS/SSL checks through a single installation. It delivers clean, LLM-optimized outputs so AI agents can focus on reasoning rather than parsing raw HTML.
      15
      17 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP tool server that gives any AI agent the ability to search, scrape, and analyze content across the internet.
      42
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for web search powered by Google AI Mode (Gemini). Enables any AI agent to search the web in real-time for free and without rate limits.
      2
      188
      MIT