Skip to main content
Glama

SerpMCP

PyPI version PyPI downloads Python 3.10+ License: MIT MCP

Сервер Model Context Protocol (MCP) для поиска в Google с использованием SERP API через AceDataCloud API.

Выполняйте поиск в Google и получайте структурированные результаты напрямую из Claude, VS Code или любого другого клиента, совместимого с MCP.

Возможности

  • Веб-поиск — Обычный поиск в Google со структурированными результатами

  • Поиск изображений — Поиск изображений с URL-адресами и миниатюрами

  • Поиск новостей — Получение последних новостных статей по любой теме

  • Поиск видео — Поиск видео на YouTube и других источниках

  • Поиск мест — Поиск местных компаний и организаций

  • Поиск по картам — Поиск локаций и географической информации

  • Граф знаний — Получение структурированной информации об объектах

  • Локализация — Поддержка множества стран и языков

  • Фильтрация по времени — Фильтрация результатов по временному диапазону

Related MCP server: SerpApi MCP Server

Справочник инструментов

Инструмент

Описание

serp_google_search

Поиск в Google и получение структурированных результатов через SERP API.

serp_google_images

Поиск в Google Images и получение результатов с изображениями.

serp_google_news

Поиск в Google News и получение результатов со статьями.

serp_google_videos

Поиск в Google Videos и получение результатов с видео.

serp_google_places

Поиск в Google местных мест и компаний.

serp_google_maps

Поиск локаций в Google Maps.

serp_list_search_types

Список всех доступных типов поиска Google.

serp_list_countries

Список часто используемых кодов стран для поиска Google.

serp_list_languages

Список часто используемых кодов языков для поиска Google.

serp_list_time_ranges

Список доступных фильтров временного диапазона для поиска Google.

serp_get_usage_guide

Получение подробного руководства по использованию инструментов Google SERP.

Быстрый старт

1. Получите ваш API-токен

  1. Зарегистрируйтесь на платформе AceDataCloud

  2. Перейдите на страницу документации API

  3. Нажмите "Acquire" (Получить), чтобы получить ваш API-токен

  4. Скопируйте токен для использования ниже

2. Используйте размещенный сервер (рекомендуется)

AceDataCloud предоставляет управляемый MCP-сервер — локальная установка не требуется.

Эндпоинт: https://serp.mcp.acedata.cloud/mcp

Все запросы требуют Bearer-токен. Используйте API-токен из шага 1.

Claude.ai

Подключитесь напрямую на Claude.ai через OAuth — API-токен не требуется:

  1. Перейдите в Claude.ai Настройки → Интеграции → Добавить еще

  2. Введите URL сервера: https://serp.mcp.acedata.cloud/mcp

  3. Завершите процесс входа через OAuth

  4. Начните использовать инструменты в вашем диалоге

Claude Desktop

Добавьте в ваш конфиг (~/Library/Application Support/Claude/claude_desktop_config.json на macOS):

{
  "mcpServers": {
    "serp": {
      "type": "streamable-http",
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Cursor / Windsurf

Добавьте в ваш MCP-конфиг (.cursor/mcp.json или .windsurf/mcp.json):

{
  "mcpServers": {
    "serp": {
      "type": "streamable-http",
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

VS Code (Copilot)

Добавьте в ваш MCP-конфиг VS Code (.vscode/mcp.json):

{
  "servers": {
    "serp": {
      "type": "streamable-http",
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Или установите расширение Ace Data Cloud MCP для VS Code, которое объединяет все 15 MCP-серверов с настройкой в один клик.

JetBrains IDEs

  1. Перейдите в Настройки → Инструменты → AI Assistant → Model Context Protocol (MCP)

  2. Нажмите Добавить → HTTP

  3. Вставьте:

{
  "mcpServers": {
    "serp": {
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Claude Code

Claude Code поддерживает MCP-серверы нативно:

claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp \
  -h "Authorization: Bearer YOUR_API_TOKEN"

Или добавьте в .mcp.json вашего проекта:

{
  "mcpServers": {
    "serp": {
      "type": "streamable-http",
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Cline

Добавьте в настройки MCP Cline (.cline/mcp_settings.json):

{
  "mcpServers": {
    "serp": {
      "type": "streamable-http",
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Amazon Q Developer

Добавьте в вашу конфигурацию MCP:

{
  "mcpServers": {
    "serp": {
      "type": "streamable-http",
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Roo Code

Добавьте в настройки MCP Roo Code:

{
  "mcpServers": {
    "serp": {
      "type": "streamable-http",
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Continue.dev

Добавьте в .continue/config.yaml:

mcpServers:
  - name: serp
    type: streamable-http
    url: https://serp.mcp.acedata.cloud/mcp
    headers:
      Authorization: "Bearer YOUR_API_TOKEN"

Zed

Добавьте в настройки Zed (~/.config/zed/settings.json):

{
  "language_models": {
    "mcp_servers": {
      "serp": {
        "url": "https://serp.mcp.acedata.cloud/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_API_TOKEN"
        }
      }
    }
  }
}

Тест cURL

# Health check (no auth required)
curl https://serp.mcp.acedata.cloud/health

# MCP initialize
curl -X POST https://serp.mcp.acedata.cloud/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

3. Или запустите локально (альтернатива)

Если вы предпочитаете запускать сервер на своей машине:

# Install from PyPI
pip install mcp-serp
# or
uvx mcp-serp

# Set your API token
export ACEDATACLOUD_API_TOKEN="your_token_here"

# Run (stdio mode for Claude Desktop / local clients)
mcp-serp

# Run (HTTP mode for remote access)
mcp-serp --transport http --port 8000

Claude Desktop (локально)

{
  "mcpServers": {
    "serp": {
      "command": "uvx",
      "args": ["mcp-serp"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_token_here"
      }
    }
  }
}

Docker (самохостинг)

docker pull ghcr.io/acedatacloud/mcp-serp:latest
docker run -p 8000:8000 ghcr.io/acedatacloud/mcp-serp:latest

Клиенты подключаются со своим собственным Bearer-токеном — сервер извлекает токен из заголовка Authorization каждого запроса.

Доступные инструменты

Инструменты поиска

Инструмент

Описание

serp_google_search

Гибкий поиск в Google со всеми опциями

serp_google_images

Поиск изображений

serp_google_news

Поиск новостных статей

serp_google_videos

Поиск видео

serp_google_places

Поиск местных мест/компаний

serp_google_maps

Поиск локаций на картах

Инструменты информации

Инструмент

Описание

serp_list_search_types

Список доступных типов поиска

serp_list_countries

Список кодов стран для локализации

serp_list_languages

Список кодов языков для локализации

serp_list_time_ranges

Список опций фильтрации по времени

serp_get_usage_guide

Получение подробного руководства

Примеры использования

Базовый веб-поиск

User: Search for information about artificial intelligence

Claude: I'll search for information about AI.
[Calls serp_google_search with query="artificial intelligence"]

Поиск новостей с фильтром по времени

User: What's the latest news about technology?

Claude: I'll search for recent tech news.
[Calls serp_google_news with query="technology", time_range="qdr:d"]

Локализованный поиск

User: Find popular restaurants in Tokyo

Claude: I'll search for restaurants in Tokyo.
[Calls serp_google_places with query="popular restaurants Tokyo", country="jp"]

Поиск изображений

User: Find images of the Northern Lights

Claude: I'll search for aurora borealis images.
[Calls serp_google_images with query="Northern Lights aurora borealis"]

Параметры поиска

Типы поиска

Тип

Описание

search

Обычный веб-поиск (по умолчанию)

images

Поиск изображений

news

Новостные статьи

maps

Результаты на картах

places

Местные компании

videos

Результаты с видео

Фильтры временного диапазона

Код

Временной диапазон

qdr:h

За последний час

qdr:d

За последний день

qdr:w

За последнюю неделю

qdr:m

За последний месяц

Часто используемые коды стран

Код

Страна

us

США

uk

Великобритания

cn

Китай

jp

Япония

de

Германия

fr

Франция

Часто используемые коды языков

Код

Язык

en

Английский

zh-cn

Китайский (упрощенный)

ja

Японский

es

Испанский

fr

Французский

de

Немецкий

Структура ответа

Обычные результаты поиска

  • knowledge_graph: Информация об объекте (компания, человек и т.д.)

  • answer_box: Прямые ответы

  • organic: Обычные результаты поиска с заголовком, ссылкой, сниппетом

  • people_also_ask: Похожие вопросы

  • related_searches: Похожие запросы

Результаты поиска изображений

  • images: Результаты с изображениями, URL-адресами и миниатюрами

Результаты поиска новостей

  • news: Новостные статьи с источником и датой

Конфигурация

Переменные окружения

Переменная

Описание

По умолчанию

ACEDATACLOUD_API_TOKEN

API-токен от AceDataCloud

Обязательно

ACEDATACLOUD_API_BASE_URL

Базовый URL API

https://api.acedata.cloud

ACEDATACLOUD_OAUTH_CLIENT_ID

OAuth client ID (режим хостинга)

—

ACEDATACLOUD_PLATFORM_BASE_URL

Базовый URL платформы

https://platform.acedata.cloud

SERP_REQUEST_TIMEOUT

Тайм-аут запроса в секундах

30

LOG_LEVEL

Уровень логирования

INFO

Опции командной строки

mcp-serp --help

Options:
  --version          Show version
  --transport        Transport mode: stdio (default) or http
  --port             Port for HTTP transport (default: 8000)

Разработка

Настройка среды разработки

# Clone repository
git clone https://github.com/AceDataCloud/SerpMCP.git
cd SerpMCP

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows

# Install with dev dependencies
pip install -e ".[dev,test]"

Запуск тестов

# Run unit tests
pytest

# Run with coverage
pytest --cov=core --cov=tools

# Run integration tests (requires API token)
pytest tests/test_integration.py -m integration

Качество кода

# Format code
ruff format .

# Lint code
ruff check .

# Type check
mypy core tools

Сборка и публикация

# Install build dependencies
pip install -e ".[release]"

# Build package
python -m build

# Upload to PyPI
twine upload dist/*

Структура проекта

SerpMCP/
├── core/                   # Core modules
│   ├── __init__.py
│   ├── client.py          # HTTP client for SERP API
│   ├── config.py          # Configuration management
│   ├── exceptions.py      # Custom exceptions
│   └── server.py          # MCP server initialization
├── tools/                  # MCP tool definitions
│   ├── __init__.py
│   ├── search_tools.py    # Search tools
│   └── info_tools.py      # Information tools
├── prompts/                # MCP prompt templates
│   └── __init__.py
├── tests/                  # Test suite
│   ├── conftest.py
│   ├── test_client.py
│   └── test_config.py
├── deploy/                 # Deployment configs
│   └── production/
│       ├── deployment.yaml
│       ├── ingress.yaml
│       └── service.yaml
├── .env.example           # Environment template
├── .gitignore
├── CHANGELOG.md
├── Dockerfile             # Docker image for HTTP mode
├── docker-compose.yaml    # Docker Compose config
├── LICENSE
├── main.py                # Entry point
├── pyproject.toml         # Project configuration
└── README.md

Справочник API

Этот сервер является оберткой для AceDataCloud Google SERP API:

Вклад в проект

Мы приветствуем любой вклад! Пожалуйста:

  1. Сделайте форк репозитория

  2. Создайте ветку для вашей функции (git checkout -b feature/amazing)

  3. Зафиксируйте изменения (git commit -m 'Add amazing feature')

  4. Отправьте изменения в ветку (git push origin feature/amazing)

  5. Откройте Pull Request

Лицензия

Лицензия MIT — подробности см. в файле LICENSE.

Ссылки


Сделано с любовью AceDataCloud

Available Tools

11 tools
serp_get_usage_guideGet Google search usage guideA
Read-onlyIdempotent
Inspect

Get a comprehensive guide for using the Google SERP tools.

Provides detailed information on how to use the SERP search tools
effectively, including parameters, examples, and best practices.

Returns:
    Complete usage guide for SERP tools.

Inputs: no named parameters. Returns: result

serp_google_imagesSearch Google ImagesC
Read-only
Inspect

Search Google Images and get image results.

Performs a Google Image search and returns structured image results.

Inputs: query (required), page, number, country, +2 more. Returns: result

serp_google_mapsSearch Google MapsC
Read-only
Inspect

Search Google Maps for locations.

Performs a Google Maps search and returns structured map results.

Inputs: query (required), page, number, country, +1 more. Returns: result

serp_google_newsSearch Google NewsC
Read-only
Inspect

Search Google News and get news article results.

Performs a Google News search and returns structured news results.

Inputs: query (required), page, number, country, +2 more. Returns: result

serp_google_placesSearch Google PlacesC
Read-only
Inspect

Search Google for local places and businesses.

Performs a Google Places search and returns structured place results.

Inputs: query (required), page, number, country, +1 more. Returns: result

serp_google_videosSearch Google VideosC
Read-only
Inspect

Search Google Videos and get video results.

Performs a Google Video search and returns structured video results.

Inputs: query (required), page, number, country, +1 more. Returns: result

serp_list_countriesList search country codesA
Read-onlyIdempotent
Inspect

List commonly used country codes for Google search.

Shows common country codes that can be used to localize search results.

Returns:
    Table of country codes and their countries.

Inputs: no named parameters. Returns: result

serp_list_languagesList search language codesA
Read-onlyIdempotent
Inspect

List commonly used language codes for Google search.

Shows common language codes that can be used to get results in specific languages.

Returns:
    Table of language codes and their languages.

Inputs: no named parameters. Returns: result

serp_list_search_typesList Google search typesA
Read-onlyIdempotent
Inspect

List all available Google search types.

Shows all available search types and their use cases.
Use this to understand which search type to use for your query.

Returns:
    Table of all search types with descriptions.

Inputs: no named parameters. Returns: result

serp_list_time_rangesList search time filtersA
Read-onlyIdempotent
Inspect

List available time range filters for Google search.

Shows all time range options that can be used to filter results by date.

Returns:
    Table of time range codes and their meanings.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 11 tools

    Disambiguation2/5

    The serp_list_* and serp_get_usage_guide tools are distinct, but serp_google_search accepts a search_type parameter covering images/news/videos/places/maps while separate tools exist for each of those same verticals. This creates multiple overlapping search tools with unclear boundaries, so an agent may struggle to choose between the general and specialized versions.

    Naming Consistency5/5

    All tools use a consistent serp_ prefix and snake_case naming, with predictable groupings: serp_list_* for reference lists, serp_get_* for guides, and serp_google_* for search actions. The pattern is easy to follow and no naming convention is mixed.

    Tool Count4/5

    At 11 tools, the set is within a reasonable range for a Google SERP API wrapper. However, the five specialized search tools duplicate functionality already available through serp_google_search, so the surface is slightly larger than necessary.

    Completeness5/5

    The tool set covers the apparent domain well: it provides a general Google search, all major search verticals (images, news, videos, places, maps), and reference lists for search types, countries, languages, and time ranges. There are no obvious missing operations for a read-only SERP search server.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      An MCP (Model Context Protocol) server that provides Google search capabilities and webpage content analysis tools. This server enables AI models to perform Google searches and analyze webpage content programmatically.
      262
      -
    • A
      license
      A
      quality
      A
      maintenance
      An MCP server that integrates with SerpApi to retrieve search results from multiple search engines including Google, Bing, Yahoo, and others, enabling fast access to both live and archived search data.
      4
      188
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) based search API server that provides standardized access to Google Maps, Google Flights, Google Hotels and other services. This server enables AI assistants to access various search services through a unified interface.
      74
      MIT
    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP (Multi-Agent Conversation Protocol) Server that enables interaction with Google's Custom Search API, allowing agents to perform customized web searches through natural language requests.
      -