Python MCP for Yandex Direct and Wordstat
Yandex.Direct MCP
A Python MCP server with 48 Yandex Direct tools and Wordstat frequency lookup, switchable between sandbox and production
- 1 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- Full CRUD over campaigns, groups and ads in production mode
- Bulk-adds and updates keywords and bids
Install
- Works in
- Services
Manual install
git clone https://github.com/demokrat90/yandex-direct-mcp.git && cd yandex-direct-mcp && python -m venv .venv && pip install -r requirements.txtInstall on Linux/macOS; Windows uses a different venv activation command.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Full CRUD over campaigns, groups and ads in production mode
- Bulk-adds and updates keywords and bids
This is third-party code. Review the repository files before installing.
What it does
The server gives 48 tools over the Yandex.Direct API v5: full CRUD and status control for campaigns, groups and ads, bulk keyword add and update, bids and auto-targeting, campaign-level negative-keyword sets, sitelinks and callouts, campaign statistics, a search-query report and custom reports, plus keyword frequency via the Wordstat API v4. One flag, YANDEX_DIRECT_SANDBOX, switches the environment between sandbox and production, and a separate get_yandex_token.py script walks through browser OAuth and saves the token to .env. It supports switching between several accounts at runtime.
Who it is for. For people running several Yandex Direct accounts on a Python stack who want one server for both campaign management and Wordstat frequency lookup.
Good fit when
- You need full CRUD over campaigns, groups and ads from one server
- You need Wordstat keyword frequency alongside campaign management
- You want to switch between sandbox and production with one flag during development
Not a fit when
- You want a ready npm package with no git clone or Python venv
- You have no approved production Direct API access: you can only fully try it in sandbox
- You need a dry-run guard on every write call: the README does not describe one
Example request
Check the frequency of the phrase 'buy a sofa' via Wordstat and show current bids for it across my campaignsMCP
- Transport
- stdio
- Authentication
- API key
Environment variables
YANDEX_DIRECT_TOKENrequired, secret- Yandex Direct OAuth token
YANDEX_DIRECT_SANDBOX- true switches the server to sandbox
Limitations
Needs Python 3.10+ and approved Direct API access for production mode. API access needs a separate application; the sandbox works immediately and does not spend points. Community project, not a Yandex product.
How to disable. Remove the yandex-direct block from your MCP client config and stop the server process.
FAQ
How do I get a token?
The python scripts/get_yandex_token.py script opens a browser and, after you confirm access, saves the token straight into .env.
Can I test the connection without live data?
Yes, python scripts/test_yandex_connection.py with no flag runs against sandbox, and with --prod it checks the production API.
Discussion
No questions or reviews yet.
Related
All Yandex Direct toolsYandex Direct MCP: hardened fork
yandex-direct-mcp
A fork of a popular Yandex Direct MCP server that defaults to read-only, with explicit flags for writes and finance
Yandex Direct MCP server in Ruby
yandex-direct-mcp
A dependency-free, pure Ruby MCP server with 30 tools for Yandex Direct campaigns, ad groups, ads, keywords and reports
Yandex Direct MCP server (npm)
@theyahia/yandex-direct-mcp
A TypeScript MCP server with an npm package: 20 tools for Yandex Direct campaigns, bids and negative keywords, with money always in rubles
Five MCP servers for Yandex APIs: Wordstat, Search, Webmaster, Metrika and Direct, plus a Claude Code plugin with skills
Direct, Metrika, Wordstat and Webmaster MCP server
Yandex MCP Server
An MCP server with 141 tools: full Direct campaign management, Metrika counters and goals, Wordstat and Webmaster
An MCP server for Yandex Direct, Metrika, Wordstat and Webmaster: campaigns, ads, bids, reports and keyword research from chat
README in short
The README gives a step-by-step install via git clone and a venv, a separate browser OAuth token script, config templates for Claude Desktop, Cursor and Claude Code, and a list of eight capability groups from campaign CRUD to Wordstat and multi-account support. A full API and format reference is in docs/yandex-direct-api.md.