Serper Search and Scrape

搜索与获取

by marcopesani

基于 TypeScript 的 MCP server,调用 Serper API 提供网页搜索与抓取,可接入 Cursor、Cline、Claude Desktop 等客户端。

把网页搜索与抓取统一接入 MCP,兼容 Cursor、Cline、Claude Desktop,让 AI 助手更稳地拿到实时网页信息,省掉自己搭桥的麻烦。

什么是 Serper Search and Scrape

基于 TypeScript 的 MCP server,调用 Serper API 提供网页搜索与抓取,可接入 Cursor、Cline、Claude Desktop 等客户端。

核心功能 (2 个工具)

google_search

Tool to perform web searches via Serper API and retrieve rich results. It is able to retrieve organic search results, people also ask, related searches, and knowledge graph.

scrape

Tool to scrape a webpage and retrieve the text and, optionally, the markdown content. It will retrieve also the JSON-LD metadata and the head metadata.

README

Serper Search and Scrape MCP Server

smithery badge

A TypeScript-based MCP server that provides web search and webpage scraping capabilities using the Serper API. This server integrates with Claude Desktop to enable powerful web search and content extraction features.

<a href="https://glama.ai/mcp/servers/5zk327i0pj"> <img width="380" height="200" src="https://glama.ai/mcp/servers/5zk327i0pj/badge" alt="serper-search-scrape-mcp-server MCP server" /> </a>

Features

Tools

  • google_search - Perform web searches via Serper API

    • Rich search results including organic results, knowledge graph, "people also ask", and related searches
    • Supports region and language targeting
    • Optional parameters for location, pagination, time filters, and autocorrection
    • Supports advanced search operators:
      • site: Limit results to specific domain
      • filetype: Limit to specific file types (e.g., 'pdf', 'doc')
      • inurl: Search for pages with word in URL
      • intitle: Search for pages with word in title
      • related: Find similar websites
      • cache: View Google's cached version of a specific URL
      • before: Date before in YYYY-MM-DD format
      • after: Date after in YYYY-MM-DD format
      • exact: Exact phrase match
      • exclude: Terms to exclude from search results
      • or: Alternative terms (OR operator)
  • scrape - Extract content from web pages

    • Get plain text and optional markdown content
    • Includes JSON-LD and head metadata
    • Preserves document structure

Requirements

  • Node.js >= 18
  • Serper API key (set as SERPER_API_KEY environment variable)

Development

Install dependencies:

bash
npm install

Build the server:

bash
npm run build

For development with auto-rebuild:

bash
npm run watch

Run tests:

bash
npm test                  # Run all tests
npm run test:watch       # Run tests in watch mode
npm run test:coverage    # Run tests with coverage
npm run test:integration # Run integration tests

Environment Variables

Create a .env file in the root directory:

code
SERPER_API_KEY=your_api_key_here

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

bash
npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Installation

Installing via Smithery

To install Serper Search and Scrape for Claude Desktop automatically via Smithery:

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

Claude Desktop

Add the server config at:

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

Cline

  1. Open the Cline extension settings
  2. Open "MCP Servers" tab
  3. Click on "Configure MCP Servers"
  4. Add the server config:
json
{
  "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"]
    }
  }
}

Additional Cline configuration options:

  • disabled: Set to false to enable the server
  • autoApprove: List of tools that don't require explicit approval for each use

Cursor

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

Docker

You can also run the server using Docker. First, build the image:

bash
docker build -t mcp-server-serper .

Then run the container with your Serper API key:

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

Alternatively, if you have your environment variables in a .env file:

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

For development, you might want to mount your source code as a volume:

bash
docker run -v $(pwd):/app --env-file .env mcp-server-serper

Note: Make sure to replace your_api_key_here with your actual Serper API key.

常见问题

Serper Search and Scrape 是什么?

基于 TypeScript 的 MCP server,调用 Serper API 提供网页搜索与抓取,可接入 Cursor、Cline、Claude Desktop 等客户端。

Serper Search and Scrape 提供哪些工具?

提供 2 个工具,包括 google_search、scrape

相关 Skills

agent-browser

by chulla-ceja

热门

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

搜索与获取
未扫描3.7k

接口规范

by alexxxiong

热门

API 规范管理工具 - 跨项目 API 文档的初始化、更新、查询与搜索。Triggers: 'API文档', 'API规范', '接口文档', '路由解析', 'apispec', 'API lookup', 'API search'.

搜索与获取
未扫描3.7k

investment-research

by caijichang212

热门

Perform structured investment research (投研分析) for a company/stock/ETF/sector using a repeatable framework: fundamentals (basic/财务报表与商业模式), technical analysis (技术指标与关键价位), industry research (行业景气与竞争格局), valuation (估值对比/情景), catalysts and risks, and produce a professional research report + actionable plan. Use when the user asks for: equity/ETF analysis, earnings/financial statement breakdown, peer/industry comparison, valuation ranges, bull/base/bear scenarios, technical trend/support-resistance, or a full research memo.

搜索与获取
未扫描3.7k

相关 MCP Server

by Anthropic

热门

Puppeteer 是让 Claude 自动操作浏览器进行网页抓取和测试的 MCP 服务器。

这个服务器解决了手动编写 Puppeteer 脚本的繁琐问题,适合需要自动化网页交互的开发者,比如抓取动态内容或做端到端测试。不过,作为参考实现,它可能缺少生产级的安全防护,建议在可控环境中使用。

搜索与获取
82.9k

网页抓取

编辑精选

by Anthropic

热门

Fetch 是 MCP 官方参考服务器,让 AI 能抓取网页并转为 Markdown 格式。

这个服务器解决了 AI 直接处理网页内容时格式混乱的问题,适合需要让 Claude 分析在线文档或新闻的开发者。不过作为参考实现,它缺乏生产级的安全配置,你得自己处理反爬虫和隐私风险。

搜索与获取
82.9k

Brave 搜索

编辑精选

by Anthropic

热门

Brave Search 是让 Claude 直接调用 Brave 搜索 API 获取实时网络信息的 MCP 服务器。

如果你想让 AI 助手帮你搜索最新资讯或技术文档,这个工具能绕过传统搜索的限制,直接返回结构化数据。特别适合需要实时信息的开发者,比如查 API 更新或竞品动态。不过它依赖 Brave 的 API 配额,高频使用可能受限。

搜索与获取
82.9k

评论