Serper Search and Scrape MCP server

Integrates with the Serper API to enable web searches and webpage content extraction, supporting research, content aggregation, and data mining tasks.
Back to servers
Setup instructions
Provider
Marco Pesani
Release date
Feb 21, 2025
Language
TypeScript
Package
Stats
7.4K downloads
82 stars

The Serper Search and Scrape MCP server provides web search and webpage scraping capabilities using the Serper API, enabling Claude Desktop with powerful search and content extraction features. This server offers tools for Google searching and web scraping with rich functionality.

Requirements

  • Node.js version 18 or higher
  • Serper API key

Installation Options

Using Smithery

Install automatically via Smithery with:

npx -y @smithery/cli install @marcopesani/mcp-server-serper --client claude

Claude Desktop Setup

Add the server configuration to your Claude Desktop config file:

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "serper-search": {
      "command": "npx",
      "args": ["-y", "serper-search-scrape-mcp-server"],
      "env": {
        "SERPER_API_KEY": "your_api_key_here"
      }
    }
  }
}

Cline Extension Setup

  1. Open Cline extension settings
  2. Navigate to "MCP Servers" tab
  3. Click "Configure MCP Servers"
  4. Add this configuration:
{
  "mcpServers": {
    "github.com/marcopesani/mcp-server-serper": {
      "command": "npx",
      "args": ["-y", "serper-search-scrape-mcp-server"],
      "env": {
        "SERPER_API_KEY": "your_api_key_here"
      },
      "disabled": false,
      "autoApprove": ["google_search", "scrape"]
    }
  }
}

Cursor Setup

  1. Open Cursor settings
  2. Go to "Features" settings
  3. In "MCP Servers" section, click "Add new MCP Server"
  4. Name the server and select "command" as "Type"
  5. In the "Command" field, enter:
env SERPER_API_KEY=your_api_key_here npx -y serper-search-scrape-mcp-server

Docker Installation

Build the Docker image:

docker build -t mcp-server-serper .

Run with your API key:

docker run -e SERPER_API_KEY=your_api_key_here mcp-server-serper

Or using environment variables from a .env file:

docker run --env-file .env mcp-server-serper

Available Tools

Google Search

The google_search tool provides web search capabilities with:

  • Rich search results including organic listings, knowledge graph data, and related searches
  • Region and language targeting support
  • Optional parameters for location, pagination, and filtering
  • Advanced search operators including:
    • site: - Limit results to specific domain
    • filetype: - Limit to specific file types
    • inurl: - Find pages with specific words in URL
    • intitle: - Search for pages with specific words in title
    • before: and after: - Date filtering in YYYY-MM-DD format
    • exact: - Exact phrase matching
    • And more advanced operators

Web Scraping

The scrape tool extracts content from web pages with these features:

  • Plain text extraction
  • Optional markdown formatting
  • JSON-LD and head metadata extraction
  • Document structure preservation

Environment Configuration

Create a .env file in the root directory with your Serper API key:

SERPER_API_KEY=your_api_key_here

Note: Remember to replace your_api_key_here with your actual Serper API key in all configuration examples.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

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

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later