SerpApi

Provides fast SerpApi-powered search across engines and a location lookup via MCP.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mcp-mirror-ilyazub_serpapi-mcp-server": {
      "command": "python",
      "args": [
        "path/to/server.py"
      ],
      "env": {
        "SERPAPI_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

You can run a Python MCP server that uses SerpApi to fetch live and archived search results from multiple engines. This server is designed to be easily connected to MCP clients such as Claude for Desktop, enabling fast search capabilities through a simple tool interface.

How to use

Connect the SerpApi MCP server to your MCP client. Use the available tools to perform searches across supported engines and to locate Google locations as needed. Practical workflows include listing supported engines, performing queries on a chosen engine, and locating nearby Google business results.

Available tools and resources include:

  • search: Run a search on a chosen engine with a query and optional parameters.
  • locations: Discover Google location data.

How to install

Prerequisites you need before starting:

  • Python 3.8+ installed on your system.

  • Pip available in your PATH.

Steps to set up and run the server you will connect your MCP client to:

pip install mcp serpapi python-dotenv
SERPAPI_API_KEY=your_api_key_here
python server.py

Configuration and usage notes

The server exposes a standard MCP stdio interface. To connect a client like Claude for Desktop, configure the MCP server in the client settings. Use the example configuration snippet to point the client at your local server script.

{
  "mcpServers": {
    "serpapi": {
      "command": "python",
      "args": ["path/to/server.py"]
    }
  }
}

Security and keys

Keep your SerpApi API key secret. Store it in a .env file in the server directory as SERPAPI_API_KEY. Do not publish this key or share the file publicly.

SERPAPI_API_KEY=your_api_key_here

Examples of usage patterns

  • List supported engines by querying the locations resource:
  • Engine list: Google, Google Light, Bing, Walmart, Yahoo, eBay, YouTube, DuckDuckGo, Yandex, Baidu.
  • Perform a search using the search tool by specifying the engine and a query, with optional parameters such as location.

Example engine list and a search workflow can be carried out through your MCP client by calling the respective tools with the required parameters.

Running in development vs production

To run in production, start the server with the normal command:

  • python server.py For development debugging with the MCP Inspector, you can run the development command if your setup provides one.

Available tools

search

Perform a search on a specified engine with a query and optional parameters.

locations

Find Google locations.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational