yandex-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yandex-mcpShow my Yandex Metrika traffic and conversions for the last week."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yandex-mcp
An MCP server that exposes the Yandex Webmaster, Yandex Direct and Yandex Metrika APIs as tools for AI assistants (Claude Desktop, Claude Code, Cursor, etc.).
It lets an assistant work with your Yandex SEO, advertising and analytics data in natural language — inspect search queries, manage indexing and sitemaps, request recrawls, run diagnostics, manage Direct campaigns with write-safety guards, and pull traffic/conversion/ad statistics — without you logging into the Yandex web UI.
125 tools total: 52 for Webmaster, 46 for Direct, 25 for Metrika, 2 for project management.
6 MCP prompts — ready-made workflows (campaign audit, weekly report, campaign launch, budget scaling, SEO audit, learning check) built on the autostrategies playbook, which is also exposed as the
yandex://playbookMCP resource.Single server, multi-project: several Yandex accounts/tokens in one stdio process.
TypeScript / Node ≥ 22, built on
@modelcontextprotocol/sdkandzod.
How it works
src/index.ts boots one McpServer and registers every tool group from src/webmaster/ and src/direct/. All requests go through src/client.ts, a per-project HTTP client that:
attaches the
Authorization: OAuth <token>header (Bearerfor Direct),routes Webmaster calls to
api.webmaster.yandex.netand Direct calls toapi.direct.yandex.com/json/v5(or the Direct Sandbox whendirect.sandboxis enabled),resolves and caches the Webmaster
user_idand injectshost_idinto paths,retries on network errors /
429with exponential backoff and handles204 No Content,surfaces Direct in-body
{"error": {...}}responses and tracks theUnitsquota header.
Related MCP server: Yandex Wordstat MCP
Prerequisites
Node.js ≥ 22.
A Yandex OAuth token with access to the Webmaster and/or Metrika APIs.
Getting an OAuth token
Register an application in the Yandex OAuth console and grant it the Webmaster (
webmaster:hostinfo,webmaster:verify) and/or Metrika (metrika:read/metrika:write) scopes.Obtain a token for your account via the OAuth flow.
Notes:
Direct requires its own application scope and an approved access request (заявка) submitted from the Direct account after registering the app — existing Webmaster/Metrika tokens will not work for Direct without re-issuing. Until access is approved, use the Direct Sandbox (
direct.sandbox: truein the project config).Webmaster OAuth tokens expire after 6 months and must be re-issued.
Setup
npm install
cp .env.example .env # then put your token in .env
npm run build.env:
YANDEX_OAUTH_TOKEN=your_oauth_token_hereRun
npm start # runs dist/index.js (requires build)
npm run dev # tsx watch mode against src/index.tsThe server speaks MCP over stdio, so it's normally launched by an MCP client rather than by hand.
Multi-project configuration
The server can serve several projects, each with its own Yandex login/token.
Copy projects.example.json to projects.json (gitignored) and fill it in, or
point YANDEX_PROJECTS_CONFIG at another path. If no config file exists but
YANDEX_OAUTH_TOKEN is set, a single project default is used.
Switch the active project with yandex_set_active_project, inspect with
yandex_projects_list, or pass project to any Direct or Metrika tool.
Metrika tools also honor the project's default_counter.
Per-project Direct settings: sandbox (route to the Direct Sandbox),
client_login (agency accounts), and limits — maximum allowed budget/bid
change in percent, enforced by the write tools.
Connecting to an MCP client
The token is read from the YANDEX_OAUTH_TOKEN environment variable.
Claude Desktop / Cursor
Add to the MCP servers config (claude_desktop_config.json or equivalent):
{
"mcpServers": {
"yandex": {
"command": "node",
"args": ["/absolute/path/to/yandex/dist/index.js"],
"env": {
"YANDEX_OAUTH_TOKEN": "your_oauth_token_here"
}
}
}
}Claude Code
claude mcp add yandex --env YANDEX_OAUTH_TOKEN=your_token -- node /absolute/path/to/yandex/dist/index.jsTools
Webmaster (52)
Group | Tools |
User |
|
Hosts |
|
Verification |
|
Summary |
|
Search queries |
|
Indexing |
|
URLs in search |
|
Important URLs |
|
Sitemaps |
|
Recrawl |
|
Diagnostics |
|
Links |
|
Pro export |
|
Feeds |
|
All names are prefixed yandex_webmaster_.
Direct (43)
Group | Tools |
Read |
|
Write (guarded) |
|
Research |
|
Reports |
|
All names are prefixed yandex_direct_. Write tools preview a diff unless
confirm: true, and enforce per-project budget/bid change limits (override with
force: true). Set direct.sandbox: true in the project to route calls to the
Direct Sandbox. Write results include a per-item summary — Direct reports
partial failures inside a successful HTTP response, so check partial_failure.
Project management (2)
yandex_projects_list, yandex_set_active_project — see
Multi-project configuration.
Metrika (22)
Group | Tools |
Management |
|
Goals (guarded write) |
|
Offline conversions |
|
Expenses import |
|
CRM import |
|
Logs API (raw data) |
|
Reporting (Stat) |
|
All names are prefixed yandex_metrika_. The stat tools accept direct_client_logins for advertising reports (ym:ad: metrics — Direct costs joined with on-site behavior) and extra_params for any other query parameter.
The reporting tools mirror the Metrika Reporting API. Metrics and dimensions use the ym:s: (visits) / ym:pv: (pageviews) namespaces — e.g. metrics: "ym:s:visits,ym:s:users,ym:s:bounceRate", dimensions: "ym:s:date,ym:s:lastTrafficSource". Dates accept YYYY-MM-DD or relative keywords (today, yesterday, 7daysAgo). Counter-scoped tools default to the project's default_counter when counter_id/ids is omitted.
Project layout
src/
index.ts # entry point: boots the MCP server, registers all tools
client.ts # per-project HTTP client (auth schemes, base URLs, retries, Direct transport)
projects.ts # project registry: per-project tokens, Direct config, limits
server-tools.ts # project management tools (list / set active)
webmaster/ # 14 modules, 51 Webmaster tools
metrika/ # management + Reporting API — 10 Metrika tools
direct/ # read, guarded write, reports — 14 Direct toolsScripts
Command | Description |
| Compile TypeScript to |
| Run from source with |
| Run the unit test suite ( |
| Run the built server |
| Remove |
License
MIT © Minas Sarkisyan
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server for managing Yandex Direct advertising, Yandex Metrica analytics, Wordstat keyword research, and Yandex Webmaster SEO tools, with self-configuring OAuth; provides 153 tools for complete ad and search workflows from AI assistants.100191MIT
- AlicenseAqualityAmaintenanceEnables querying Yandex Wordstat search statistics, including frequency, related queries, seasonality, and regional distribution, through natural language in AI clients.51204MIT
- AlicenseNot gradedqualityBmaintenanceEnables interaction with Yandex advertising and analytics APIs (Direct, Metrika, Audience, Webmaster, AdMetrica) through MCP tools, resources, and prompts for campaign management and data retrieval.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to manage Yandex Direct advertising campaigns, ads, keywords, and reports via natural language using the Yandex Direct API v5.21MIT
Related MCP Connectors
MCP for Yandex Direct: manage ad campaigns & analytics from Claude or ChatGPT
Read-only Yandex Metrika MCP. Query visits, sources, geo, devices and more in plain language.
SEO research, audits, backlinks, GSC, and content workflow tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/webkoth/yandex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server