Skip to main content
Glama
shufl9dka

yandex-searchapi-mcp

by shufl9dka

MCP-сервер Yandex Search.API

MCP-сервер для Yandex Search API через REST с 7 инструментами:

  • web_search

  • image_search

  • generative_search

  • wordstat_get_top

  • wordstat_get_dynamics

  • wordstat_get_regions_distribution

  • wordstat_get_regions_tree

Сервер считывает учетные данные из конфигурации окружения MCP-клиента:

  • FOLDER_ID

  • API_KEY

Для локальной разработки .env загружается автоматически.

Возможности

  • Использует только REST-эндпоинты (/v2/web/search, /v2/image/search, /v2/gen/search, REST-пути Wordstat)

  • Минимальные входные данные инструментов по умолчанию для экономии контекста модели

  • searchType доступен для всех соответствующих инструментов и по умолчанию равен SEARCH_TYPE_COM

  • Веб-поиск всегда принудительно использует responseFormat: FORMAT_XML

  • Инструменты для веб-поиска и поиска изображений декодируют rawData из Base64 и парсят XML в структурированные группы

  • Обработка ошибок с четким статусом API и деталями

Related MCP server: Yandex Search MCP Server

Установка

npm install yandex-searchapi-mcp

Пример конфигурации MCP-клиента

{
  "mcpServers": {
    "yandex-searchapi": {
      "command": "npx",
      "args": ["-y", "yandex-searchapi-mcp"],
      "env": {
        "FOLDER_ID": "your-folder-id",
        "API_KEY": "your-api-key"
      }
    }
  }
}

Инструменты

Используйте этот инструмент, когда вам нужны классические результаты веб-поиска (ссылки + сниппеты), а не сгенерированный ответ.

Входные данные:

  • query (обязательно)

  • searchType (опционально, по умолчанию SEARCH_TYPE_COM)

  • page (опционально)

  • docsOnPage (опционально)

  • familyMode (опционально)

  • fixTypoMode (опционально)

Возвращает:

  • groups[] с documents[], где каждый документ содержит:

    • url

    • title

    • language

    • passages

  • requestId

  • found

Примечание: для веб-поиска этот ввод сопоставляется с groupSpec.groupsOnPage в вышестоящем API.

Используйте этот инструмент, когда вам нужны результаты поиска изображений и метаданные изображений (ссылки на миниатюры/оригиналы и размеры).

Входные данные:

  • query (обязательно)

  • searchType (опционально, по умолчанию SEARCH_TYPE_COM)

  • page (опционально)

  • site (опционально)

  • docsOnPage (опционально)

  • imageSpec (опционально: format, size, orientation, color)

Возвращает:

  • groups[] с documents[], где каждый документ содержит:

    • url

    • extras.image-properties (если присутствует)

  • requestId

  • found

Используйте этот инструмент, когда вам нужен готовый обоснованный ответ, синтезированный из результатов поиска.

Входные данные:

  • query (обязательно)

  • searchType (опционально, по умолчанию SEARCH_TYPE_COM)

  • fixMisspell (опционально)

  • getPartialResults (опционально)

  • scope (опционально): { type: "site" | "host" | "url", values: string[] }

Возвращает только основные генеративные поля (без объектов-оберток):

  • message

  • sources

  • searchQueries

  • fixedMisspellQuery

  • isAnswerRejected

  • isBulletAnswer

  • hints

  • problematicAnswer

wordstat_get_top

Используйте этот инструмент, чтобы понять, какие связанные запросы пользователи ищут вокруг ключевого слова.

Входные данные:

  • phrase (обязательно)

  • numPhrases (опционально, по умолчанию 20)

  • regions (опционально)

  • devices (опционально)

Возвращает:

  • totalCount

  • results

  • associations

wordstat_get_dynamics

Используйте этот инструмент для отслеживания трендов спроса на ключевое слово с течением времени.

Входные данные:

  • phrase (обязательно)

  • period (опционально, по умолчанию PERIOD_WEEKLY)

  • fromDate (опционально, по умолчанию now-30d, ISO datetime)

  • toDate (опционально, по умолчанию now, ISO datetime)

  • regions (опционально)

  • devices (опционально)

Возвращает:

  • results

wordstat_get_regions_distribution

Используйте этот инструмент, чтобы увидеть, в каких регионах/городах ключевое слово относительно более популярно.

Входные данные:

  • phrase (обязательно)

  • region (опционально, по умолчанию REGION_ALL)

  • devices (опционально)

Возвращает:

  • results

wordstat_get_regions_tree

Используйте этот инструмент для получения действительных ID и названий регионов для региональных фильтров Wordstat.

Входные данные:

  • нет

Возвращает:

  • regions

Разработка

npm install
npm run build
npm run dev

Available Tools

7 tools
wordstat_get_dynamicsB

Get how search frequency changes over time for a keyword (daily, weekly, or monthly).

ParametersJSON Schema
NameRequiredDescriptionDefault
phraseYesKeyword/phrase to analyze in Wordstat.
periodNoAggregation period. Default is PERIOD_WEEKLY.
fromDateNoStart datetime in ISO-8601 format. If omitted, a safe default is used.
toDateNoEnd datetime in ISO-8601 format. If omitted, a safe default is used.
regionsNoOptional list of region IDs to filter statistics.
devicesNoOptional device filter: all/desktop/phone/tablet.

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits such as whether the operation is read-only, authentication requirements, rate limits, or potential side effects. For a tool that retrieves data, minimal transparency is given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no unnecessary words. It is front-loaded with the core action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is present, and the description does not explain the return format (e.g., time series data, value type). Given the tool's function (trend analysis), more contextual detail about the response would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds limited value over the schema. It mentions 'daily, weekly, or monthly' which is already captured by the period enum. Baseline 3 is appropriate as no additional semantic aid is provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get', the resource 'search frequency changes over time for a keyword', and specifies time granularity options (daily, weekly, monthly). This distinguishes it from sibling tools like wordstat_get_top or wordstat_get_regions_distribution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives (e.g., other wordstat tools). The context is implied but not stated, leaving the agent to infer usage from the name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

wordstat_get_regions_distributionB

Get regional distribution for a keyword: where users search this phrase more often.

ParametersJSON Schema
NameRequiredDescriptionDefault
phraseYesKeyword/phrase to analyze in Wordstat.
regionNoDistribution granularity. Default is REGION_ALL.
devicesNoOptional device filter: all/desktop/phone/tablet.

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations available, the description carries full responsibility for disclosing behavioral traits. It does not mention whether the operation is read-only, what the output format is, or if any side effects exist. The 11-word description adds minimal detail beyond the tool's name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that gets straight to the point. No extraneous words or filler. Every word earns its place in defining the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks explanation of the return value (no output schema provided) and does not clarify how the distribution is represented (e.g., percentages, counts). For a tool with three parameters and no output schema, more context is needed for complete understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, meaning all three parameters have descriptions in the input schema. The tool description adds no additional semantic information beyond what the schema already provides. Per guidelines, baseline is 3 when coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('regional distribution') and explains the purpose ('where users search this phrase more often'). It clearly distinguishes from sibling tools like wordstat_get_dynamics (time trends) and wordstat_get_top (top queries) by focusing on geographic distribution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as wordstat_get_regions_tree or wordstat_get_dynamics. The description does not mention prerequisites, exclusions, or typical use cases, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

wordstat_get_regions_treeA

Get the full tree of Wordstat region IDs and names. Useful for choosing region filters.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that it returns a 'full tree' of region IDs and names, but does not mention whether the data is static, how large the tree is, or if it requires any authentication. The description is minimal but acceptable for a simple read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is two sentences, front-loaded with the main action and resource, followed by a use case. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters, no output schema, and no annotations, the description is largely complete. However, it could benefit from briefly explaining the tree structure (e.g., nested or flat) or any limitations on region coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and schema coverage is 100%. The description adds value by explaining the output contains a 'full tree' with 'IDs and names', which gives context beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Get the full tree of Wordstat region IDs and names', which specifies the action and resource. It distinguishes from siblings like wordstat_get_dynamics or wordstat_get_top by emphasizing it returns a hierarchical tree of regions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Useful for choosing region filters' gives a clear use case. However, it does not explicitly state when not to use this tool or mention alternatives like searching for a specific region.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

wordstat_get_topB

Get popular and related search queries for a keyword using Yandex Wordstat.

ParametersJSON Schema
NameRequiredDescriptionDefault
phraseYesKeyword/phrase to analyze in Wordstat.
numPhrasesNoHow many top phrases to return. Default is 20.
regionsNoOptional list of region IDs to filter statistics.
devicesNoOptional device filter: all/desktop/phone/tablet.

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only says 'get popular and related search queries', but does not disclose whether it is a read-only operation, any authentication requirements, rate limits, or other behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one short sentence, front-loaded with the key purpose. Every word is necessary and no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description fails to explain the return format, pagination, or what 'popular and related' means. For a tool with 4 parameters, this is insufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters are already documented in the schema. The description adds no extra meaning beyond what the schema provides. Baseline of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get', the resource 'popular and related search queries for a keyword', and the system 'Yandex Wordstat'. It distinguishes from sibling tools like wordstat_get_dynamics or web_search by specifying it returns top queries for a keyword.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings or alternatives. There is no mention of prerequisites, use cases, or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updatesv0.1.1
    • First observedgenerative_search
    • First observedimage_search
    • First observedweb_search
    • First observedwordstat_get_dynamics
    • First observedwordstat_get_regions_distribution
    • First observedwordstat_get_regions_tree
    • First observedwordstat_get_top

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: web search, image search, generative answer, and four distinct Wordstat analytics functions. No overlap or confusion between tools.

Naming Consistency5/5

All tool names follow snake_case with a consistent verb_noun pattern. The three search tools use 'search' as noun, and the four Wordstat tools use 'wordstat_get_<feature>'.

Tool Count5/5

7 tools is an ideal scope for a Yandex Search API server, covering core search types and keyword research without being overwhelming or insufficient.

Completeness4/5

The tool set covers web search, image search, generative search, and comprehensive Wordstat analytics. Minor gaps like video or news search exist but are not essential for the server's stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables keyword research and search trend analysis for the Russian market through Yandex Wordstat API. Provides access to popular search queries, search volume dynamics over time, and regional distribution data.
    -
  • F
    license
    Not graded
    quality
    F
    maintenance
    Enables AI assistants to perform real-time web searches and retrieve AI-generated answers using the Yandex Search API. It provides tools for accessing up-to-date internet information with support for both raw search results and summarized content via the Yazeka model.
    48
    -
  • A
    license
    A
    quality
    A
    maintenance
    Enables querying Yandex Wordstat search statistics, including frequency, related queries, seasonality, and regional distribution, through natural language in AI clients.
    5
    70 npm
    6
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI agents to run RU-first web searches through the Yandex index and extract web pages into clean reader-mode Markdown, bypassing anti-bot blocks.
    3
    55 npm
    MIT