Get the FREE Ultimate OpenClaw Setup Guide →

mcp -serper

Serper MCP Server supporting search and webpage scraping

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio marcopesani-mcp-server-serper npx -y serper-search-scrape-mcp-server \
  --env SERPER_API_KEY="your_api_key_here"

How to use

This MCP server provides two main capabilities: web searching via the Serper API and content extraction from web pages. The google_search tool returns rich search results including organic results, knowledge graph data, and suggestions like people also ask and related searches. It supports region and language targeting as well as a variety of advanced operators (site, filetype, inurl, intitle, related, cache, before, after, exact, exclude, or) to refine queries. The scrape tool retrieves the textual content of pages, with options to include plain text and optional markdown, as well as embedded JSON-LD and head metadata, while preserving document structure. These tools are designed to be used together in Claude Desktop workflows to surface information and extract content from relevant pages.

How to install

Prerequisites:

  • Node.js v18 or newer installed on your system
  • npm ( comes with Node.js )
  • A Serper API key (required and set as SERPER_API_KEY)

Install manually:

  1. Install dependencies and build: npm install npm run build

  2. If developing, you can enable auto-rebuild and testing: npm run watch # auto-rebuild on changes npm test # run all tests npm run test:watch # run tests in watch mode npm run test:coverage # run tests with coverage

  3. Configure environment: Create a .env file in the project root and set: SERPER_API_KEY=your_api_key_here

  4. Run the server locally (example using npx as configured by MCP): npx -y serper-search-scrape-mcp-server

Optional integration steps (via Smithery or container):

  • Smithery install: npx -y @smithery/cli install @marcopesani/mcp-server-serper --client claude
  • Docker build/run examples are included in the repo’s docs if you prefer containerized deployment.

Additional notes

Environment variables and configuration:

  • SERPER_API_KEY is required for both search and scrape features
  • When using MCP via GUI tools (Cline, Cursor, Claude Desktop), you may need to provide the mcpServers entry with the appropriate command and args as shown: { "mcpServers": { "serper-search": { "command": "npx", "args": ["-y", "serper-search-scrape-mcp-server"], "env": { "SERPER_API_KEY": "your_api_key_here" } } } }

Common issues:

  • Ensure the Serper API key is valid and has permissions for the Serper API usage
  • The MCP communicates over stdio; if debugging, consider using the MCP Inspector tool to view IO
  • If running in Docker, pass the API key via environment or an env-file

Tips:

  • Use the google_search tool with advanced operators to narrow results before scraping
  • Use scrape after identifying relevant URLs to extract structured content quickly

Related MCP Servers

Sponsor this space

Reach thousands of developers