Yandex Direct MCP with two access modes
Яндекс Директ MCP
A Yandex Direct MCP with two connection modes: a read-only remote URL and a full-access local npx server
High risk
We rate an entry high when the tool writes to external systems, handles money, production databases or secrets, or runs arbitrary commands. The CLI installs it only with your consent.
Why this level
- The local mode changes ad settings in a live account and can affect spend
- The OAuth token auto-refreshes and grants long-lived account access
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/yandeks-direkt-mcpDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Assembled automatically, review before installing.
This entry is high risk, so there is no one-click install. Review the code and add the config by hand.
Run in a terminal
claude mcp add --transport stdio --env YANDEX_DIRECT_SANDBOX=true --env YANDEX_DIRECT_LANG=ru --env YANDEX_DIRECT_TIMEOUT_MS=60000 --env YANDEX_DIRECT_MAX_RETRIES=3 yandex-direct -- npx -y mcp-yandex-direct@latestOr add to the file .mcp.json, in the project
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.cursor/mcp.json, for all projects
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
code --add-mcp '{"name":"yandex-direct","type":"stdio","command":"npx","args":["-y","mcp-yandex-direct@latest"],"env":{"YANDEX_DIRECT_SANDBOX":"true","YANDEX_DIRECT_LANG":"ru","YANDEX_DIRECT_TIMEOUT_MS":"60000","YANDEX_DIRECT_MAX_RETRIES":"3"}}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"yandex-direct": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the servers key.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
codex mcp add yandex-direct --env YANDEX_DIRECT_SANDBOX=true --env YANDEX_DIRECT_LANG=ru --env YANDEX_DIRECT_TIMEOUT_MS=60000 --env YANDEX_DIRECT_MAX_RETRIES=3 -- npx -y mcp-yandex-direct@latestOr add to the file ~/.codex/config.toml, for all projects
[mcp_servers.yandex-direct]
command = "npx"
args = ["-y", "mcp-yandex-direct@latest"]
env = { YANDEX_DIRECT_SANDBOX = "true", YANDEX_DIRECT_LANG = "ru", YANDEX_DIRECT_TIMEOUT_MS = "60000", YANDEX_DIRECT_MAX_RETRIES = "3" }If the file already exists, append the block to the end.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/devin/mcp_config.json, for all projects
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Formerly Windsurf.
Add to the file cline_mcp_settings.json, for all projects
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .roo/mcp.json, in the project
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
A fork of Roo Code, same .roo folders.
Add to the file opencode.json, in the project
{
"mcp": {
"yandex-direct": {
"type": "local",
"command": [
"npx",
"-y",
"mcp-yandex-direct@latest"
],
"environment": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the mcp key.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/zed/settings.json, for all projects
{
"context_servers": {
"yandex-direct": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the context_servers key.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .codeassistant/mcp.json, in the project
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-direct@latest"
],
"env": {
"YANDEX_DIRECT_SANDBOX": "true",
"YANDEX_DIRECT_LANG": "ru",
"YANDEX_DIRECT_TIMEOUT_MS": "60000",
"YANDEX_DIRECT_MAX_RETRIES": "3"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
YANDEX_DIRECT_TOKENsecret, optional- Готовый OAuth-токен; имеет приоритет над входом из чата
YANDEX_DIRECT_LOGINoptional- Логин клиента при работе через агентский аккаунт; иначе API покажет аккаунт агентства
YANDEX_DIRECT_OAUTH_CLIENT_IDsecret, optional- Client ID собственного OAuth-приложения вместо встроенного
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
For quick read-only access with no token: claude mcp add --transport http yandex-direct https://mcp.askads.ru/mcp, then /mcp and sign in via Yandex. For full access: claude mcp add --transport stdio --scope user yandex-direct -- npx -y mcp-yandex-direct@latest and connect in chat.
Other ways from the author
claude mcp add --transport http yandex-direct https://mcp.askads.ru/mcpRemote read-only mode, authorize via /mcp and Yandex sign-in.
This is third-party code. Review the repository files before installing.
What it does
The server gives 44 tools: campaigns, groups, ads, keywords, bids, adjustments, extensions, statistics, balance and dictionaries. There are two connection modes. The remote server at mcp.askads.ru/mcp works via browser OAuth with no manual token, but is read-only: statistics, audits and account objects with no changes. The local npx server gives full write access; its connection also starts in chat via a one-time Yandex code, and the token refreshes automatically. Budgets, bids and balance are shown in the account currency, not API micro-units.
Who it is for. For people who want quick Yandex Direct analytics with no token, and the option to move to full campaign management when needed.
Good fit when
- You want quick read-only access to statistics and account structure with no token upfront
- You need full write access: pausing, bids, negative keywords from the local server
- You need to compare campaigns, ads and keywords and see where budget goes
Not a fit when
- You need the remote server but with write access: the URL version is deliberately read-only
- You have no Node.js 20+ and cannot run npx locally
- You need a sandbox: the README does not describe a separate sandbox mode
Example request
Show my account's campaigns and last week's spend broken down by ad groupLimitations
Local changes apply to the live account and can affect spend; the README does not describe a separate sandbox flag. CI and agent setups need a ready token and YANDEX_DIRECT_LOGIN. The remote mode is read-only and will not work if you need writes without installing npx.
How to disable. Run claude mcp remove yandex-direct in Claude Code or remove the yandex-direct block from your client config.
MCP
- Transport
- http, stdio
- Authentication
- OAuth
| Environment variables | |
|---|---|
| YANDEX_DIRECT_TOKEN secret | A ready token for CI and agent setups of the local mode |
| YANDEX_DIRECT_LOGIN | Client login for agency tokens |
Security check
- The local mode changes ad settings in a live account and can affect spend
- The OAuth token auto-refreshes and grants long-lived account access
README in short
The README compares the two connection modes in a table and gives ready instructions for Codex, Claude Code and other clients. Separate 'How it works' and 'What can change data' sections explain the read-only versus full-access difference, and a telemetry section describes anonymous usage stats disabled via an environment variable.
FAQ
What is the difference between remote and local mode?
The remote URL mode needs no install and is read-only; the local npx mode gives full write access and needs Node.js 20+.
Do I need a token in advance?
No in either mode: the remote one signs in via the browser immediately, and the local one walks through a one-time Yandex code right in chat.
Related
A skill that strips AI writing tells from text using Wikipedia's list, without adding invented facts
Marketing Skills for AI agents
Marketing Skills for AI Agents
About fifty skills for CRO, copywriting, SEO, analytics, ads and launches, built for coding agents
SendPulse MCP server
SendPulse MCP
SendPulse's official remote MCP server: statistics, campaigns and user data through an agent chat
Yandex Direct MCP generated from a machine-readable schema
yandex-direct-mcp
An MCP server and CLI covering all 113 Yandex Direct API v5 methods generated from WSDL, exposing 9 read tools by default and writes only on demand