Yandex Direct MCP
This server provides comprehensive management of Yandex Direct advertising campaigns via API v5, enabling you to read, analyze, and modify advertising accounts using natural language.
Account & Quota
Retrieve account info (login, currency, type, country)
Check daily API quota (units spent/remaining/limit)
Retrieve account balance via Live v4 API
Campaigns
List, create, update, and perform lifecycle actions (suspend, resume, archive, unarchive, delete)
Configure bidding strategies, daily budgets, and negative keywords
Ad Groups
List, create, update, and delete ad groups
Manage geo-targeting and negative keywords per group
Ads
List, create, and update text ads (title, body, URL, mobile flag)
Perform lifecycle actions: moderate, suspend, resume, archive, unarchive, delete
Keywords
List, add, and perform actions (suspend, resume, delete) on keywords
Set manual search/network bids for individual keywords, ad groups, or campaigns (in account currency)
Bid Modifiers
Get, add, set, and delete bid adjustments (mobile, desktop, demographics, retargeting, regional, video) at campaign or ad group level
Ad Extensions
Manage sitelink sets (up to 8 links), callouts (up to 25 characters each), and virtual business cards (vCards)
Media Library
List and upload images (via URL or base64, JPG/PNG/GIF up to 10 MB)
List videos and creatives (smart banners, HTML5)
Reporting & Statistics
Generate performance reports for campaigns, ad groups, ads, keywords, and search queries with flexible date ranges, filters, and sorting
Geo & Dictionaries
Look up region IDs for geo-targeting by name
Fetch reference data: currencies, time zones, ad categories, metro stations, etc.
Raw API Access
Call any Yandex Direct API v5 service/method directly; write methods require explicit confirmation (
confirmWrite=true)
Safety features: write-protected raw requests, auto-pagination for large datasets, and sandbox mode for testing.
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 Direct MCPlist my active campaigns"
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 Direct MCP
Yandex Direct MCP connects an AI app to your Yandex Direct advertising account. Ask in plain language where your ad budget is going, compare campaigns, ads, and keywords, then prepare or make the changes you need without switching between account sections. Setup starts right in the conversation: no need to create a token or edit configuration in advance.
44 tools. Campaigns, ad groups, ads, keywords, bids, adjustments, extensions, statistics, balance, reference books, and account connection right in the conversation.
Two ways to connect. A remote server by URL requires no manual token retrieval and is read-only; a local one via
npxgives full access to the account.In-chat connection. Yandex opens a sign-in page; after the code from the chat you can start working with ads right away, and access is renewed automatically.
Money in a readable format. Convenient tools show budgets, bids, and balance in the account currency rather than API micro-units.
Real advertising. Local changes are applied to the live account and can affect spending. For testing, Yandex Direct sandbox is available.
Try it with your first message:
Show me the campaigns in my account and last week's spend by ad group.
Connect the server · See scenarios · Open technical documentation
See it working in a minute
You: Connect Yandex Direct.
Assistant: Gives you a link to sign in to Yandex. Open it under the account with access to the desired advertising account, confirm access, and send back the code shown.
You: Sends the code from the Yandex page.
Assistant: Connects Direct and shows the account. No need to restart the app.
You: Show me the campaigns in my account and last week's spend by ad group.
Assistant: Finds the campaigns, builds a report by ad group, and shows spend in the account currency.
Related MCP server: Yandex Direct MCP Server
Table of contents
Quick start
Choose a connection method and add the server to your AI app using the instructions below.
Open a new conversation and ask: "Show me the campaigns in my account and last week's spend by ad group."
Analysis without getting a token yourself — by URL
The remote server https://mcp.askads.ru/mcp connects through an app that supports MCP by URL. Sign in to Yandex in your browser and confirm access: no token needs to be passed in the config. This option is read-only — for statistics, audits, and viewing objects; it does not change ad settings.
In Claude Code you can add it with the command:
claude mcp add --transport http yandex-direct https://mcp.askads.ru/mcpAfter connecting, open /mcp and complete authorization. In other apps that support HTTP MCP, add the same URL through the app interface.
Full access — locally via npx
Creating and modifying objects requires Node.js 20+. npx downloads the server on first launch — no separate package installation needed. No need to obtain a token in advance — connection starts right in the conversation:
Add the server to your AI app — an example for Codex is open below; other apps are collected in collapsible instructions.
Write: "Connect Yandex Direct" — the assistant will walk you through signing in to Yandex and show the account.
For CI and agent setups — a ready-made token and YANDEX_DIRECT_LOGIN, see Connection and configuration.
Through the app interface:
Open Settings → Plugins → MCP servers.
Click Add server.
Add the launch command
npx -y mcp-yandex-direct@latest.
Through the command line:
codex mcp add yandex-direct -- npx -y mcp-yandex-direct@latestCheck the connection:
codex mcp listclaude mcp add --transport stdio --scope user yandex-direct -- npx -y mcp-yandex-direct@latestCheck the connection: claude mcp list.
Open Settings → Developer → Edit Config and add to claude_desktop_config.json:
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": ["-y", "mcp-yandex-direct@latest"]
}
}
}If there is no Developer section, open the file manually: macOS — ~/Library/Application Support/Claude/claude_desktop_config.json, Windows — %APPDATA%\Claude\claude_desktop_config.json. Restart Claude Desktop.
Open ~/.cursor/mcp.json to connect the server in all projects, or .cursor/mcp.json in a specific project. Add:
{
"mcpServers": {
"yandex-direct": {
"command": "npx",
"args": ["-y", "mcp-yandex-direct@latest"]
}
}
}In the command palette, run MCP: Open User Configuration. In the opened mcp.json, add the server:
{
"servers": {
"yandex-direct": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-yandex-direct@latest"]
}
}
}After saving, run MCP: List Servers and start the server from the list.
What you can delegate
Check how the budget is being spent
"Which campaigns spent the most last week?"
"Which ads are getting impressions and clicks but no conversions?"
"Compare spend, CTR, and average CPC across campaigns for the month."
"Show the account balance and the remaining daily API quota."
Find areas for improvement
"Which keywords are spending budget but getting no clicks?"
"Which ad groups and ads are currently paused or failing moderation?"
"Check which bid adjustments are active for mobile devices."
"What sitelinks and refinements does this campaign have?"
Prepare changes
"Suggest new bids for high-CTR keywords and show the changes before applying."
"Check whether the campaign has negative keywords for this topic and prepare a list."
"Put together the parameters for a new text campaign for Moscow: budget, ad groups, keywords, and ads."
Perform an explicit action
"Add these keywords to group 123 and set the bid to 45 ₽."
"Pause ad 456."
"Upload the page with the image to the ad library."
How it works
Advertising is usually built from three levels: campaign → ad group → ad. The ad group contains keywords, serving settings, and bid adjustments. Ads can have sitelinks, refinements, business cards, and images.
The server helps you look at these objects together: link campaign spend with ad group statistics, keywords, and ads. It can create new campaigns and ads of the text type only. Campaigns of other types can be read, renamed, have their budgets changed, be paused, archived, and deleted by ID.
Statistics are not generated instantly: get_statistics launches a report in the Reports service and waits for it to be ready. Large lists are paginated automatically by autoPaginate.
What can change data
The remote server by URL only reads data. The local server via npx can change a live advertising account:
Action | What happens | What to watch out for |
Read statistics and objects | The server retrieves campaigns, ads, keywords, balance, and reports. | These calls do not change data or move money. |
Create | You can create a text campaign, ad group, text ad, keywords, extensions, or upload an image. | New objects will go into the live account unless the sandbox is enabled. |
Update | You can change budgets, bids, names, negative keywords, ad group settings, and bid adjustments. | Changing bids and budgets can affect spending. |
Change status or delete | You can pause, resume, archive, or delete some objects. | Deletion and some actions are irreversible. |
Direct API request |
| Any method other than reading requires |
The tools pass read, write, and potentially irreversible action labels to the AI app. The app may show a confirmation, but its behavior depends on the client. A direct API request will additionally not perform a write without confirmWrite=true; changing ads requires an explicit request.
Connection and configuration
For normal use, no token is needed in advance:
Ask in the chat to connect Yandex Direct.
Open the Yandex OAuth link under the account with access to the desired advertising account.
Confirm access and send the displayed code back in the chat. That's it — you can work with ads: no need to restart the client or edit the configuration.
From then on, the connection lives on its own: access is renewed automatically and does not expire after a year. To check the status, ask "show connection status"; to disconnect, say "disconnect Direct". The granted access can be revoked in Yandex ID.
For CI and automated setups where there is no conversation, configuration via environment variables is available:
Variable | Purpose |
| Ready-made OAuth token; takes priority over in-chat sign-in. |
| Client login when working through an agency account; otherwise the API will show the agency account. |
|
|
| Client ID of your own OAuth app instead of the built-in one. |
| API response language; defaults to |
| Request timeout; defaults to 60,000 ms. |
| Number of retries on transient errors; defaults to 3. |
You can get a ready-made token for YANDEX_DIRECT_TOKEN via the link, signing in under the account with access to the desired account:
Do not publish the token in chats, repositories, or screenshots: it grants access to the advertising account, including actions that may affect the budget.
Data and telemetry
By default, the server sends anonymous technical events: a random installation identifier, the name of the invoked tool, server versions, AI application, Node.js, and operating system. This is needed to understand which parts of the server are used and whether problems occur at startup. The Yandex token, advertising account data, tool arguments, request texts, values, and names of environment variables are not sent.
To disable telemetry for Ask Ads MCP servers, set the environment variable:
ASKADS_TELEMETRY=0Limitations
Daily API quota. Each call consumes Units. The
get_quotatool shows how much has been spent, how much remains, and what is available for today.Report limits. Yandex reports have their own limits on volume and quantity per day, and report readiness in the Reports service requires waiting.
Large lists. If the internal limit is reached during automatic pagination, the server explicitly marks the result as incomplete rather than hiding this fact.
Temporary errors. The server makes up to three retries under rate limits. Network and server errors are automatically retried only for read operations, so as not to duplicate a change.
Production account. Local changes are applied to the real advertising account and may affect spending. For tests, use the sandbox (
YANDEX_DIRECT_SANDBOX=true).No continuous monitoring. The server runs during a call from the AI application. If the application supports scheduled tasks, you can set up a periodic request to check the needed metrics.
Technical documentation
MCP capabilities catalog — pages on user tasks for each tool.
All tools — parameters, responses, and boundaries of each tool.
Development — project structure and working with the source code.
Yandex Direct API — the primary source on the API and its limitations.
npm package — published server versions.
Support
Found a bug or missing a scenario? Create an issue or write to Telegram.
Maintenance
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables managing Facebook ads campaigns, ad sets, ads, creatives, insights, and audience targeting via Meta's Marketing API.
- AlicenseAqualityCmaintenanceIntegrates with Yandex Direct API v5 to manage ads via 20 tools, with dry-run protection preventing accidental spending.21MIT
- 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.
Manage Google, Meta, Amazon, TikTok, LinkedIn & ChatGPT ads. 430 tools for campaigns & analytics.
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/askads/mcp-yandex-direct'
If you have feedback or need assistance with the MCP directory API, please join our Discord server