Skip the install. Get this working in under 2 minutes.
Start a free trial on cloud.anythingmcp.com, add the Yandex Direct in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.
Summary
Let your AI analyse your Yandex Direct advertising, read-only: campaigns, ad groups, ads, keywords and bids, sitelinks and callouts, agency clients, dictionaries, change tracking and statistics reports by day, campaign, ad or search query.
Try asking
Example prompts for Yandex Direct
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Yandex Direct, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Yandex Direct + Gemini
Let your AI analyse your Yandex Direct advertising, read-only: campaigns, ad groups, ads, keywords and bids, sitelinks and callouts, agency clients, dictionaries, change tracking and statistics reports by day, campaign, ad or search query.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
YANDEX_DIRECT_TOKEN
Step 1 — Get credentials
Setting up takes about 10 minutes, plus the time Yandex needs to approve API access (from an hour to a few business days). You need a Yandex Direct account with at least one campaign, and an app of your own registered at oauth.yandex.ru.
- Register an app at oauth.yandex.ru: platform web services, with the Yandex Direct API permission (
direct:api). Note its ClientID. - In the Yandex Direct web interface open Tools → API, submit an API access request for that ClientID and accept the API user agreement. Until Yandex approves the request, calls fail with error 58.
- Signed in with the Direct account, open
https://oauth.yandex.ru/authorize?response_type=token&client_id=<ClientID>with your ClientID and copy theaccess_token(it starts with y0_) intoYANDEX_DIRECT_TOKEN, without Bearer or OAuth in front. The token is valid for about a year and is extended while it is used. - Agencies only: set
YANDEX_DIRECT_CLIENT_LOGINto the Yandex login of the advertiser to read;yandex_direct_list_agency_clientslists those logins. Leave it empty for your own account. - Install the connector and run
yandex_direct_get_client: it shows the account, its login and its currency.
What it reads: campaigns with type, status, state, dates, funds and all-time clicks and impressions, plus the bidding strategy; ad groups with regions and negative keywords; ads with title, text and link; keywords and autotargeting with bids and productivity; keyword bids with the bids and traffic needed for each search position; sitelinks, callouts, shared negative keyword sets and retargeting lists; agency clients; dictionaries such as currencies and regions; which campaigns changed since a given moment; and statistics reports by day, campaign, ad or search query.
Reports: yandex_direct_get_report returns tab-separated text, with the column names in the first line and money as decimals. Small reports come back at once. Larger ones are built offline: the AI asks again with the same parameters after the wait Yandex gives. At most 5 offline reports can be queued, and search query reports are offline only and cover the last 180 days.
Money and paging: bids, budgets and funds come as integers in micros (2500000 = 2.50 in the account currency). Lists return up to 500 objects by default and at most 10,000, and ad groups, ads and keywords are read for up to 10 campaigns per call.
Read-only by design: every tool reads. Nothing creates, changes, pauses or pays for anything, so there is nothing to confirm and nothing switched off at install.
Limits: every call spends API points from the advertiser's daily allowance, and a failed call costs 20 points. The AI prefers one call with several ids over many single calls and asks only for the fields it needs. Error 152 means today's points are used up; 506 means too many requests at the same time.
Common errors: 53 means the token is invalid or expired: get a new one as in step 3. 58 means the app's API access is not approved yet. 54, 3000 or 3001 mean no API access or no rights, for example for a client login the token may not read. 513 means the login is not connected to Direct. 8000 and 4000 to 4006 mean a wrong parameter, 8800 that an object was not found, and 9300 too many ids in one call.
The connector does not create or edit campaigns, ads, keywords or bids, handle moderation, budgets or payments, or use the Sandbox or Wordstat.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Gemini
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of
YOUR_MCP_API_KEY. - Save the file and restart
gemini. - Run
/mcpinside Gemini CLI (orgemini mcp listin your shell):anythingmcpshould show as connected. - Start prompting: Gemini CLI can now call the
Yandex Directtools.
Available tools
| Tool | What it does |
|---|---|
yandex_direct_get_client | Read the advertiser account the token acts for (or the Client-Login one): ClientId, Login, ClientInfo (name), Currency, CountryId, Type… |
yandex_direct_list_campaigns | List campaigns: Id, Name, Type (TEXT_CAMPAIGN, UNIFIED_CAMPAIGN, SMART_CAMPAIGN, MOBILE_APP_CAMPAIGN, CPM_BANNER_CAMPAIGN ...), Status… |
yandex_direct_list_ad_groups | List ad groups of up to 10 campaigns (or by id): Id, Name, CampaignId, Type, Status, ServingStatus, RegionIds, NegativeKeywords… |
yandex_direct_list_ads | List ads of up to 10 campaigns, up to 1000 ad groups, or by id: Id, CampaignId, AdGroupId, Type, Status, State, StatusClarification, and… |
yandex_direct_list_keywords | List keywords and autotargeting of up to 10 campaigns, up to 1000 ad groups, or by id: Id, Keyword, State, Status, ServingStatus… |
yandex_direct_list_keyword_bids | Read keyword bids with the auction picture: for each keyword the search and network bid and, on search, the bids and traffic volume needed… |
yandex_direct_list_sitelinks | Read sitelink sets by id (SitelinkSetId from yandex_direct_list_ads): each sitelink's Title, Href and Description |
yandex_direct_list_ad_extensions | List ad extensions (callouts) of the account: Id, Type, Status, Associated and the callout text |
yandex_direct_list_negative_keyword_sets | Read shared negative keyword sets by id (NegativeKeywordSharedSetIds of campaigns and ad groups): Id, Name, NegativeKeywords, Associated |
yandex_direct_list_retargeting_lists | List retargeting and audience lists: Id, Name, Type, Description, Rules (Metrica goals and segments), IsAvailable, Scope |
yandex_direct_list_agency_clients | For agency accounts: list the agency's advertisers with Login, ClientId, ClientInfo, Currency and Archived |
yandex_direct_get_dictionaries | Read reference dictionaries: Currencies (with bid limits), GeoRegions (region ids used in RegionIds), TimeZones, Constants, AdCategories… |
yandex_direct_check_campaign_changes | Which campaigns changed since a moment: for each changed campaign, whether the campaign itself (SELF), its groups, ads or keywords… |
yandex_direct_get_report | Run a statistics report (Reports service) and return it as tab-separated text: a column header row, one row per line, money as decimals in… |
Example prompts
- "How did my campaigns do last week? Show impressions, clicks, CTR, cost and conversions per campaign."
- "Which search queries spent the most in the last 30 days without a single conversion?"
- "List the keywords of the Winter tyres campaign with their bids, and what it would take to reach the top positions."
- "Which of my ads are rejected or not being shown right now, and why?"
- "We are an agency: list our clients and show yesterday's spend for the client romashka-shop."
FAQ
Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.
Next steps
Was this guide helpful?