SuperAPIAI Directory

serpapi-mcp

github.com · AI developer platforms

Search results from Google, Bing, Yahoo, DuckDuckGo, YouTube, eBay and more via SerpApi, plus real-time weather and stock market data.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsAPI

About this tool

SerpApi MCP Server is a Model Context Protocol (MCP) server implementation for integrating SerpApi's search engine results and data extraction capabilities. It enables MCP-compatible clients (such as Claude Desktop, Codex, etc.) to perform searches and obtain structured search results through a unified interface.

Purpose and positioning: This project is aimed at developers and users who need to bring search engine data, weather, stock market, and other information into AI toolchains, exposing SerpApi's capabilities to AI clients and agents through the MCP standard protocol.

Main capabilities:

  • Multi-engine search: Supports engines such as Google, Bing, Yahoo, DuckDuckGo, YouTube, eBay, etc. The list of available engines can be viewed through the MCP resource serpapi://engines.
  • Engine resources: Each engine's parameter schema is provided through an MCP resource in the format serpapi://engines/<engine>.
  • Real-time weather data: Location-based weather and forecasts can be obtained through search queries.
  • Stock market data: Company financial and market data can be obtained through search integration.
  • Dynamic result handling: Automatically detects and formats different result types, such as answer boxes, organic results, news, images, shopping, etc.
  • Flexible response modes: Supports full or compact JSON responses; also supports Markdown responses, which the official documentation says can reduce token usage by an average of 50%, and by more than 90% for APIs with complex nested JSON.
  • Interactive UI (MCP Apps): Optional search_table and search_dashboard tools that render results as an interactive UI in supported hosts, avoiding large amounts of SERP JSON entering the model context.
  • Claude Desktop extension: One-click local installation via the .mcpb bundle.

Usage: The server provides a hosted service at mcp.serpapi.com and requires an API key. The API key can be obtained from the SerpApi dashboard. Connection authentication supports two methods:

  • Header-based: Authorization: Bearer YOUR_API_KEY (recommended, the key will not appear in URLs and logs)
  • Path-based: /YOUR_API_KEY/mcp (suitable for clients that cannot set headers) A key is not required to connect, list tools, or read resources; however, the search and App tools require a key, and an error is returned when the key is missing.

The main parameters of the search tool include:

  • params.q (required): search query
  • params.engine: search engine (default google_light)
  • params.location: geographic filtering
  • params.output: response format; if omitted, JSON (default); if set to md, returns Markdown
  • mode: response mode; compact removes metadata from JSON, and Markdown is unaffected For more parameters, see the SerpApi API reference.

The search response preserves the MCP structuredContent.result string and includes the same string in the text content. For JSON output, result is serialized JSON; for Markdown output, it is unmodified Markdown. Errors and cancellations use the same wrapper. A failed search execution sets isError: true; clients using FastMCP's advanced call_tool() should handle ToolError, or use call_tool_mcp() to check the result flag.

Some engines have specific required field rules, for example Google Flights requires departure and arrival identifiers, departure date, and return date for round trips; Google Hotels requires a destination or hotel query, check-in date, and check-out date; Google Maps Directions requires the missing origin and destination addresses; YouTube uses search_query, Yelp uses find_loc, Amazon uses k, etc. Clients supporting MCP 2026-07-28 will receive a form before searching to supply missing parameters.

Applicable scenarios:

  • Integrating multi-engine search capabilities into AI clients;
  • Obtaining real-time weather and stock market data;
  • Displaying search results through an interactive UI;
  • Running the search extension locally in Claude Desktop;
  • Serving as a search data provider in the MCP ecosystem.

Limitations and notesNotes:

  • A SerpApi API key is required to run searches and the App tools; these features cannot be used without a key;
  • The hosted service mcp.serpapi.com logs request metrics (method, status code, duration) and does not store queries or results, but the key in the URL path may appear in request logs, so using the Header method is recommended;
  • The Claude Desktop local bundle runs on the user's machine, with the key stored in Claude Desktop settings, and calls serpapi.com directly, not via mcp.serpapi.com;
  • Interactive UI tools require the host to support the MCP Apps extension; hosts that do not support it will ignore these tools;
  • Form-based guided search only takes effect on clients that support the corresponding capability; older clients will receive missing parameter errors.

The project is MIT licensed. The contribution process includes forking the repository, creating a feature branch, installing dependencies (uv install), committing changes, pushing the branch, and creating a Pull Request.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools