Yandex Direct MCP, CLI and models with action search
mcp-server-yandex-direct
A Yandex Direct API v5 MCP server, CLI tool and Pydantic models: 79 actions through two tools instead of 79 separate ones
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 79 actions cover creating, changing and archiving campaigns, ads and keywords
- Runs against the live account; no built-in dry-run is described in the README
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/mcp-server-yandex-directDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
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 'YD_TOKEN=<your YD_TOKEN>' yandex-direct -- uvx mcp-server-yandex-direct==0.3.0Or add to the file .mcp.json, in the project
{
"mcpServers": {
"yandex-direct": {
"command": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}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
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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":"uvx","args":["mcp-server-yandex-direct==0.3.0"],"env":{"YD_TOKEN":"<your YD_TOKEN>"}}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"yandex-direct": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}If the file already exists, add the server inside the servers key.
Keys and settings
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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 'YD_TOKEN=<your YD_TOKEN>' -- uvx mcp-server-yandex-direct==0.3.0Or add to the file ~/.codex/config.toml, for all projects
[mcp_servers.yandex-direct]
command = "uvx"
args = ["mcp-server-yandex-direct==0.3.0"]
env = { YD_TOKEN = "<your YD_TOKEN>" }If the file already exists, append the block to the end.
Keys and settings
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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
gemini mcp add -s user -e 'YD_TOKEN=<your YD_TOKEN>' yandex-direct uvx mcp-server-yandex-direct==0.3.0Or add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"yandex-direct": {
"command": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}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
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}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
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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": [
"uvx",
"mcp-server-yandex-direct==0.3.0"
],
"environment": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}If the file already exists, add the server inside the mcp key.
Keys and settings
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}If the file already exists, add the server inside the context_servers key.
Keys and settings
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
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": "uvx",
"args": [
"mcp-server-yandex-direct==0.3.0"
],
"env": {
"YD_TOKEN": "<your YD_TOKEN>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
YD_TOKENsecret, requiredYD_CLIENT_LOGINoptionalYD_LANGoptionalYD_TIMEOUToptionalYD_FILE_TIMEOUToptional
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Get a Yandex Direct OAuth token from the Settings, API section at direct.yandex.ru and add the server: claude mcp add yandex-direct -e YD_TOKEN=your_token -- uvx mcp-server-yandex-direct.
Other ways from the author
claude mcp add yandex-direct -e YD_TOKEN=ваш_токен -- uvx mcp-server-yandex-directNeeds uv; installs nothing upfront.
This is third-party code. Review the repository files before installing.
What it does
The project gives three ways to work with the Direct API v5 on top of one typed Pydantic model library: an MCP server for Claude Code and other clients, a CLI tool for the terminal and scripts, and the model library itself for custom Python programs. Instead of 79 separate tools, one per action, the server uses a search-plus-execute pattern: yd_search finds the right action by natural-language description and returns its parameter schema, and yd_execute runs it by id. The 79 actions are grouped into 16 domains: campaigns, ad groups, ads, keywords, bids, audiences, feeds, creatives, leads, change tracking, account, turbo pages and reports. All data stays on the user's machine, and the token goes nowhere except the Yandex API.
Who it is for. For developers who want an MCP server for an agent, a CLI for scripts and typed API v5 models for their own Python code, all in one package.
Good fit when
- You need both an agent MCP server and a plain CLI for automation without a model
- You need typed Pydantic models of the Direct API for your own Python scripts
- The model gets confused by dozens of tools: searching for an action by description beats holding all 79 in context
Not a fit when
- You want separate named tools per action rather than description-based search
- You do not write Python and have no use for the model library
- You need a built-in dry-run guard: the README does not describe one
Example request
Find the action to suspend campaigns and suspend campaign 12345Limitations
Needs your own OAuth token from the Settings, API section of the Direct dashboard. The search-plus-execute pattern needs the model to find the action first and call it second: two steps instead of one direct tool. The repository's license is not explicitly set at the GitHub API level.
How to disable. Run claude mcp remove yandex-direct in Claude Code or remove the yandex-direct block from your client config.
MCP
- Transport
- stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| YD_TOKEN required, secret | Yandex Direct OAuth token |
Security check
- The 79 actions cover creating, changing and archiving campaigns, ads and keywords
- Runs against the live account; no built-in dry-run is described in the README
README in short
The README describes the search-plus-execute architecture with an example search-and-run dialogue, a table of 16 domains with action counts and links to detailed docs, and three separate install sections: MCP server, CLI tool and model library, each with its own examples. It separately stresses that all data stays local and the token goes nowhere else.
FAQ
How does the model find the right action among 79?
The yd_search tool takes a natural-language task description, e.g. 'suspend campaigns,' and returns matching actions with a parameter schema for yd_execute.
Can it be used without MCP, just from the terminal?
Yes, the package includes a separate CLI utility for the same 79 actions and a Pydantic model library for your own Python code.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything