home / mcp / serper search and scrape mcp server

Serper Search and Scrape MCP Server

Serper MCP Server supporting search and webpage scraping

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "marcopesani-mcp-server-serper": {
      "command": "npx",
      "args": [
        "-y",
        "serper-search-scrape-mcp-server"
      ],
      "env": {
        "SERPER_API_KEY": "your_api_key_here"
      }
    }
  }
}

You can enable powerful web search and content extraction in Claude Desktop by running a dedicated MCP server that uses the Serper API for search and page scraping. This server exposes two tools you can use: a web search tool and a scrape tool, letting you fetch rich search results and extract structured content from pages for downstream tasks.

How to use

You will interact with this MCP server through an MCP client, choosing the tools you need and sending search or scrape requests. The available tools are google_search for web searches via the Serper API and scrape for extracting plain text, optional markdown, and metadata from web pages. Use google_search when you need organic results, knowledge graph data, and advanced operators. Use scrape when you want to pull the main content and structured data from a URL for further processing.

How to install

Prerequisites you need before installation:

  • Node.js 18+ is required
  • A Serper API key is required and must be set in the environment variable SERPER_API_KEY

Install dependencies and build the server using the following commands.

npm install
```
```bash
npm run build

Run and test locally

To run tests and development helpers, use these commands. They cover unit tests, integration tests, and development rebuilds.

npm test
```
```bash
npm run test:watch
```
```bash
npm run test:coverage
```
```bash
npm run test:integration

Environment and configuration notes

Create a configuration file or set environment variables to provide your Serper API key. The MCP server reads the key from SERPER_API_KEY.

# Example environment setup
export SERPER_API_KEY=your_api_key_here
```

You can also place the key directly in a config script or start command, depending on how you launch the MCP server.

Installation and configuration for Claude Desktop, Cline, Cursor, Cursor, and Docker

The server is configured as an MCP entry that you run alongside Claude Desktop or other MCP clients. You will specify the runtime command and environment so the client can interact with the server.

{
  "mcpServers": {
    "serper-search": {
      "command": "npx",
      "args": ["-y", "serper-search-scrape-mcp-server"],
      "env": {
        "SERPER_API_KEY": "your_api_key_here"
      }
    }
  }
}

Debugging and inspection

If you need to debug MCP interactions, use the MCP Inspector to access debugging tools from a browser. This helps you trace requests and responses when running the server in development mode.

npm run inspector

Available tools

google_search

Performs web searches via Serper API and returns rich results including organic results, knowledge graph, people also ask, and related searches. Supports region, language, pagination, time filters, autocorrection, and advanced operators.

scrape

Extracts content from web pages to obtain plain text and optional markdown, plus JSON-LD and head metadata, while preserving document structure.

Serper Search and Scrape MCP Server - marcopesani/mcp-server-serper