🔌

Serper MCP

Search350

Fast and affordable web search API for AI agents.

Claude DesktopCursorAll MCP-compatible clients

Overview

Fast and affordable web search API for AI agents.

Setup

Run with npx:

npx -y @modelcontextprotocol/server-serper

Configuration

SERPER_API_KEY environment variable

Documentation

Serper MCP

Overview

Serper MCP is a Model Context Protocol server that provides access to Serper's search API, a fast and affordable alternative to Google Search API. It enables AI agents to perform web searches, retrieve search results, and access real-time information from the internet.

Serper offers a developer-friendly API with generous free tiers, making it ideal for AI applications that need to stay current with web content. The MCP server provides structured access to search results including titles, snippets, URLs, and related search queries.

Features

  • Web Search: Search the web for relevant results
  • News Search: Retrieve recent news articles
  • Shopping Search: Find product listings and prices
  • Local Search: Find local businesses and services
  • Image Search: Search for images (via Serper API)
  • Related Queries: Get related search suggestions
  • Fast Response: Optimized for AI agent workloads
  • Cost-Effective: Affordable pricing with generous free tier

Installation

npx -y @modelcontextprotocol/server-serper

Or install globally:

npm install -g @modelcontextprotocol/server-serper

Configuration

Add to your Claude Desktop config:

{
  "mcpServers": {
    "serper": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-serper"],
      "env": {
        "SERPER_API_KEY": "your-api-key"
      }
    }
  }
}

Get your API key from Serper.dev.

Available Tools

ToolDescription
searchPerform a general web search
newsSearch for recent news articles
shoppingSearch for products and prices
localSearch for local businesses
relatedGet related search queries

Usage Examples

General Web Search

from mcp import ClientSession, StdioClientTransport
import asyncio

async def search():
    transport = StdioClientTransport(
        command="npx",
        args=["-y", "@modelcontextprotocol/server-serper"]
    )
    
    async with ClientSession(transport) as session:
        await session.initialize()
        
        result = await session.call_tool(
            "search",
            arguments={
                "q": "best AI agent frameworks 2026",
                "num": 10
            }
        )
        
        for organic in result.organic:
            print(f"Title: {organic.title}")
            print(f"URL: {organic.link}")
            print(f"Snippet: {organic.snippet}")
            print()
        
        # Related searches
        for related in result.relatedSearches:
            print(f"Related: {related}")

News Search

async def news_search():
    result = await session.call_tool(
        "news",
        arguments={
            "q": "artificial intelligence",
            "num": 5
        }
    )
    
    for article in result.news:
        print(f"Headline: {article.title}")
        print(f"Source: {article.source}")
        print(f"Published: {article.date}")
        print(f"URL: {article.link}")
        print()

Shopping Search

async def shopping_search():
    result = await session.call_tool(
        "shopping",
        arguments={
            "q": "mechanical keyboard",
            "num": 5
        }
    )
    
    for product in result.shopping:
        print(f"Product: {product.title}")
        print(f"Price: {product.price}")
        print(f"Store: {product.store}")
        print(f"Rating: {product.rating}")
        print(f"URL: {product.link}")
        print()

Local Search

async def local_search():
    result = await session.call_tool(
        "local",
        arguments={
            "q": "coffee shops near me",
            "num": 5
        }
    )
    
    for place in result.local:
        print(f"Name: {place.title}")
        print(f"Address: {place.address}")
        print(f"Rating: {place.rating}")
        print(f"Phone: {place.phone}")
        print()

Advanced Features

Search with Location

result = await session.call_tool(
    "search",
    arguments={
        "q": "Italian restaurant",
        "gl": "us",
        "hl": "en",
        "location": "San Francisco, CA"
    }
)

Search with Date Range

result = await session.call_tool(
    "news",
    arguments={
        "q": "climate change",
        "tbs": "qdr:w"  # Past week
    }
)

Related Queries for Research

async def find_related_topics(query: str):
    result = await session.call_tool(
        "related",
        arguments={"q": query}
    )
    return result.relatedSearches

# Use for expanding research topics
topics = find_related_topics("machine learning")
for topic in topics:
    print(f"Explore: {topic}")

Multi-query Research

async def comprehensive_research(topic: str):
    # General search
    general = await session.call_tool("search", {"q": topic})
    
    # News search
    news = await session.call_tool("news", {"q": topic})
    
    # Related queries
    related = await session.call_tool("related", {"q": topic})
    
    return {
        "general_results": general.organic,
        "news": news.news,
        "related_topics": related.relatedSearches
    }

Pros

  • ✅ Fast and reliable search API
  • ✅ Generous free tier (2,500 queries/month)
  • ✅ Multiple search types (web, news, shopping, local)
  • ✅ Developer-friendly documentation
  • ✅ Structured JSON responses
  • ✅ Good for AI agent workloads
  • ✅ Affordable paid tiers

Cons

  • ❌ Not as comprehensive as Google Search API
  • ❌ Free tier has rate limits
  • ❌ No direct access to Google's full index
  • ❌ Some features require paid tier
  • ❌ Limited historical data

When to Use

  • Real-time information — Stay current with web content
  • Research assistance — Find relevant sources and references
  • News monitoring — Track recent developments
  • Product research — Compare products and prices
  • Local discovery — Find nearby businesses
  • Content creation — Gather information for articles
  • Competitive analysis — Monitor competitor activities

Resources