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
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
- Full CRUD over campaigns, groups and ads in production mode
- Bulk-adds and updates keywords and bids
Install
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.
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 campaignsLimitations
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.
MCP
- Transport
- stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| YANDEX_DIRECT_TOKEN required, secret | Yandex Direct OAuth token |
| YANDEX_DIRECT_SANDBOX | true switches the server to sandbox |
Security check
- Full CRUD over campaigns, groups and ads in production mode
- Bulk-adds and updates keywords and bids
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.
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.
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