Yandex Direct MCP

v2.3.0
io.github.stufently/yandex-direct-mcp Checked 15 hours ago Published 22 days ago

MCP server for Yandex Direct API v5 — campaigns, ads, keywords, reports

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_campaigns

Get campaigns. Common FieldNames: Id, Name, Status, State, Type, StartDate, EndDate, DailyBudget, Statistics, ClientInfo, TimeTargeting, NegativeKeywords, BlockedIps, StatusPayment, StatusClarification, SourceId, Currency, Funds, RepresentedBy. Use when the user wants to see Direct campaigns, their states, types, or budgets before changing anything. Do not use it to edit a campaign; call update_campaigns. Do not use it to pause one; call suspend_campaigns.

ParameterTypeDescription
field_names *arrayFields to return (FieldNames). See tool description for common values.
IdsarrayFilter by campaign IDs
StatesarrayFilter by states: CONVERTED, ENDED, OFF, ON, SUSPENDED, ARCHIVED
StatusesarrayFilter by statuses: ACCEPTED, DRAFT, MODERATION, REJECTED
TypesarrayFilter by types: TEXT_CAMPAIGN, DYNAMIC_TEXT_CAMPAIGN, MOBILE_APP_CAMPAIGN, CPM_BANNER_CAMPAIGN, SMART_CAMPAIGN, UNIFIED_CAMPAIGN
limitnumberPage limit (default 100, max 10000)
offsetnumberPage offset (default 0)

add_campaigns

Add new campaigns. Pass a JSON array of campaign objects. Each must include Name and a campaign-type-specific settings object (e.g. TextCampaign, DynamicTextCampaign). Use when the user asks to create new campaigns. Do not use it to change an existing campaign; call update_campaigns, which overwrites values and requires confirm. Do not use it to list campaigns; call get_campaigns.

ParameterTypeDescription
items_json *stringJSON array of campaign objects, e.g. [{"Name":"My Campaign","StartDate":"2024-01-01","TextCampaign":{"BiddingStrategy":{"Search":{"BiddingStrategyType":"WB_MAXIMUM_CLICKS","WbMaximumClicks":{"WeeklySp…

update_campaigns

Update existing campaigns. Pass a JSON array of campaign objects with Id and fields to update. IRREVERSIBLE: the previous values of the updated campaigns are overwritten and cannot be read back from the API afterwards. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to overwrite campaign fields and accepts that the previous values are lost. Do not use it to pause delivery; call suspend_campaigns. Do not use it to inspect campaigns; call get_campaigns.

ParameterTypeDescription
items_json *stringJSON array of campaign objects with Id, e.g. [{"Id":12345,"Name":"Updated Name"}]
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

delete_campaigns

Delete campaigns by IDs. IRREVERSIBLE: campaigns and the statistics attached to them are lost permanently — re-adding creates new entities with new IDs, not the old ones back. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to delete campaigns and accepts that they cannot be restored. Do not use it to pause them; call suspend_campaigns. Do not use it to archive them; call archive_campaigns, which can be undone with unarchive_campaigns.

ParameterTypeDescription
ids *arrayArray of entity IDs to delete
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

archive_campaigns

Archive campaigns by IDs. Use when the user wants campaigns archived and still restorable. Do not use it to delete them forever; call delete_campaigns. Do not use it to bring archived campaigns back; call unarchive_campaigns.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

unarchive_campaigns

Unarchive campaigns by IDs. Use when the user wants archived campaigns returned to a workable state. Do not use it to archive them; call archive_campaigns. Do not use it to delete them; call delete_campaigns.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

suspend_campaigns

Suspend (pause) campaigns by IDs. Use when the user wants to pause campaign delivery without deleting anything. Do not use it to resume delivery; call resume_campaigns. Do not use it to delete campaigns; call delete_campaigns.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

resume_campaigns

Resume campaigns by IDs. Use when the user wants suspended campaigns to deliver again. Do not use it to pause them; call suspend_campaigns. Do not use it to change bids; call set_keyword_bids only after the user accepts the spend.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

get_adgroups

Get ad groups. Common FieldNames: Id, Name, CampaignId, Status, Type, RegionIds, NegativeKeywords, TrackingParams, ServingStatuses, Subtype. Use when the user wants to list ad groups and their regions or statuses. Do not use it to change an ad group; call update_adgroups. Do not use it for the ads inside a group; call get_ads.

ParameterTypeDescription
field_names *arrayFields to return (FieldNames). See tool description for common values.
CampaignIdsarrayFilter by campaign IDs
IdsarrayFilter by ad group IDs
limitnumberPage limit (default 100, max 10000)
offsetnumberPage offset (default 0)

add_adgroups

Add new ad groups. Each must include Name, CampaignId, RegionIds, and optionally type-specific settings. Use when the user asks to create ad groups inside a campaign. Do not use it to edit an existing group; call update_adgroups. Do not use it to list groups; call get_adgroups.

ParameterTypeDescription
items_json *stringJSON array of ad group objects, e.g. [{"Name":"My Group","CampaignId":12345,"RegionIds":[225]}]

update_adgroups

Update existing ad groups. Pass a JSON array with Id and fields to update. IRREVERSIBLE: the previous values of the updated ad groups are overwritten and cannot be read back from the API afterwards. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to overwrite ad group fields. Do not use it to archive a group; call archive_adgroups. Do not use it to read groups; call get_adgroups.

ParameterTypeDescription
items_json *stringJSON array of ad group objects with Id, e.g. [{"Id":67890,"Name":"Updated Group"}]
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

delete_adgroups

Delete ad groups by IDs. IRREVERSIBLE: ad groups and the statistics attached to them are lost permanently — re-adding creates new entities with new IDs, not the old ones back. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to delete ad groups and their stats. Do not use it to archive them; call archive_adgroups. Do not use it to delete only the ads; call delete_ads.

ParameterTypeDescription
ids *arrayArray of entity IDs to delete
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

archive_adgroups

Archive ad groups by IDs. Use when the user wants ad groups archived and still restorable. Do not use it to delete them; call delete_adgroups. Do not use it to restore them; call unarchive_adgroups.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

unarchive_adgroups

Unarchive ad groups by IDs. Use when the user wants archived ad groups restored. Do not use it to archive them; call archive_adgroups. Do not use it to delete them; call delete_adgroups.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

get_ads

Get ads. Common FieldNames: Id, AdGroupId, CampaignId, Status, State, Type, StatusClarification, TextAd, DynamicTextAd, MobileAppAd, CpmBannerAdBuilderAd, SmartAdBuilderAd. Use TextAd field to get ad texts. Use when the user wants to read ads, their texts, and moderation status. Do not use it to change an ad; call update_ads. Do not use it to send ads to moderation; call moderate_ads.

ParameterTypeDescription
field_names *arrayFields to return (FieldNames). See tool description for common values.
AdGroupIdsarrayFilter by ad group IDs
CampaignIdsarrayFilter by campaign IDs
IdsarrayFilter by ad IDs
StatesarrayFilter by states: OFF, ON, SUSPENDED, OFF_BY_MONITORING, ARCHIVED
StatusesarrayFilter by statuses: ACCEPTED, DRAFT, MODERATION, PREACCEPTED, REJECTED
limitnumberPage limit (default 100, max 10000)
offsetnumberPage offset (default 0)

add_ads

Add new ads. Each must include AdGroupId and an ad-type-specific object (TextAd, DynamicTextAd, etc.). Use when the user asks to create ads in an ad group. Do not use it to rewrite an existing ad; call update_ads. Do not use it to list ads; call get_ads.

ParameterTypeDescription
items_json *stringJSON array of ad objects, e.g. [{"AdGroupId":67890,"TextAd":{"Title":"My Ad","Title2":"Subtitle","Text":"Ad body text","Href":"https://example.com","Mobile":"NO"}}]

update_ads

Update existing ads. Pass a JSON array with Id and fields to update. IRREVERSIBLE: the previous values of the updated ads are overwritten and cannot be read back from the API afterwards. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to overwrite ad text or links. Do not use it to send ads to moderation; call moderate_ads. Do not use it to read ads; call get_ads.

ParameterTypeDescription
items_json *stringJSON array of ad objects with Id, e.g. [{"Id":11111,"TextAd":{"Title":"Updated Title"}}]
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

delete_ads

Delete ads by IDs. IRREVERSIBLE: ads and the statistics attached to them are lost permanently — re-adding creates new entities with new IDs, not the old ones back. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to delete ads. Do not use it to archive them; call archive_ads. Do not use it to delete the whole ad group; call delete_adgroups.

ParameterTypeDescription
ids *arrayArray of entity IDs to delete
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

archive_ads

Archive ads by IDs. Use when the user wants ads archived and still restorable. Do not use it to delete them; call delete_ads. Do not use it to restore them; call unarchive_ads.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

unarchive_ads

Unarchive ads by IDs. Use when the user wants archived ads restored. Do not use it to archive them; call archive_ads. Do not use it to delete them; call delete_ads.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

moderate_ads

Send ads for moderation by IDs. Use when the user wants existing ads submitted for moderation. Do not use it to rewrite the ad; call update_ads. Do not use it to read the current moderation status; call get_ads.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

get_keywords

Get keywords. Common FieldNames: Id, Keyword, AdGroupId, CampaignId, Status, State, Bid, ContextBid, StrategyPriority, UserParam1, UserParam2, Productivity, StatisticsSearch, StatisticsNetwork. Use when the user wants keyword texts, states, and which ad group they belong to. Do not use it for the money bid on a keyword; call get_keyword_bids. Do not use it to add keywords; call add_keywords.

ParameterTypeDescription
field_names *arrayFields to return (FieldNames). See tool description for common values.
AdGroupIdsarrayFilter by ad group IDs
CampaignIdsarrayFilter by campaign IDs
IdsarrayFilter by keyword IDs
limitnumberPage limit (default 100, max 10000)
offsetnumberPage offset (default 0)

add_keywords

Add new keywords. Each must include Keyword text and AdGroupId. Use when the user asks to add keyword phrases to an ad group. Do not use it to change an existing phrase; call update_keywords. Do not use it to set the bid; call set_keyword_bids only when the user accepts the spend.

ParameterTypeDescription
items_json *stringJSON array of keyword objects, e.g. [{"Keyword":"buy flowers","AdGroupId":67890}]

update_keywords

Update existing keywords. Pass a JSON array with Id and fields to update. IRREVERSIBLE: the previous values of the updated keywords are overwritten and cannot be read back from the API afterwards. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to overwrite keyword fields. Do not use it to pause a keyword; call suspend_keywords. Do not use it to read keywords; call get_keywords.

ParameterTypeDescription
items_json *stringJSON array of keyword objects with Id, e.g. [{"Id":22222,"Keyword":"updated keyword text"}]
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

delete_keywords

Delete keywords by IDs. IRREVERSIBLE: keywords and the statistics attached to them are lost permanently — re-adding creates new entities with new IDs, not the old ones back. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to delete keywords. Do not use it to pause them; call suspend_keywords. Do not use it to change bids; call set_keyword_bids.

ParameterTypeDescription
ids *arrayArray of entity IDs to delete
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

suspend_keywords

Suspend keywords by IDs. Use when the user wants to stop keywords from matching without deleting them. Do not use it to turn them back on; call resume_keywords. Do not use it to delete them; call delete_keywords.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

resume_keywords

Resume keywords by IDs. Use when the user wants suspended keywords to match again. Do not use it to pause them; call suspend_keywords. Do not use it to change what they cost; call set_keyword_bids.

ParameterTypeDescription
ids *arrayArray of entity IDs to act on

get_keyword_bids

Get keyword bids. Common FieldNames: KeywordId, AdGroupId, CampaignId, Bid, ContextBid, CurrentSearchPrice, MinSearchPrice, StrategyPriority. Use when the user wants the current search or network bid for keywords. Do not use it to change a bid; call set_keyword_bids, which spends money and requires confirm. Do not use it for bid modifiers; call get_bid_modifiers.

ParameterTypeDescription
field_names *arrayFields to return (FieldNames). See tool description for common values.
AdGroupIdsarrayFilter by ad group IDs
CampaignIdsarrayFilter by campaign IDs
KeywordIdsarrayFilter by keyword IDs
limitnumberPage limit (default 100, max 10000)
offsetnumberPage offset (default 0)

set_keyword_bids

Set keyword bids. Pass a JSON array of bid objects with KeywordId, SearchBid (in micros), and/or NetworkBid (in micros). SPENDS MONEY and is IRREVERSIBLE: bids decide the cost per click, the previous bid is overwritten and cannot be read back from the API. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to set keyword bids and accepts that the account will spend money. Do not use it to read the current bid; call get_keyword_bids. Do not use it for automatic strategy settings; call set_auto_keyword_bids.

ParameterTypeDescription
bids_json *stringJSON array of bid objects, e.g. [{"KeywordId":12345,"SearchBid":30000000,"NetworkBid":10000000}]
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

set_auto_keyword_bids

Set automatic keyword bids (strategy-level). Pass a JSON array of auto-bid objects. Common fields: CampaignId, AdGroupId, KeywordId, Bid, ContextBid, and strategy parameters. SPENDS MONEY and is IRREVERSIBLE: these settings drive automatic bidding, the previous settings are overwritten and cannot be read back from the API. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to change automatic bidding settings and accepts the spend. Do not use it for a manual search bid; call set_keyword_bids. Do not use it to read bids; call get_k…

ParameterTypeDescription
bids_json *stringJSON array of auto-bid setting objects, e.g. [{"CampaignId":123,"AdGroupId":456,"MaxBid":50000000}]
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

get_bid_modifiers

Get bid modifiers. Common FieldNames: Id, CampaignId, AdGroupId, Type, Level, MobileAdjustment, DesktopAdjustment, DemographicsAdjustment, RetargetingAdjustment, RegionalAdjustment, VideoAdjustment, SmartAdAdjustment, IncomeGradeAdjustment. Use when the user wants the current bid adjustments for device, demographics, or region. Do not use it to change an adjustment; call set_bid_modifiers. Do not use it to add one; call add_bid_modifiers.

ParameterTypeDescription
field_names *arrayFields to return (FieldNames). See tool description for common values.
AdGroupIdsarrayFilter by ad group IDs
CampaignIdsarrayFilter by campaign IDs
IdsarrayFilter by bid modifier IDs
LevelsarrayFilter by levels: CAMPAIGN, AD_GROUP
TypesarrayFilter by types: MOBILE_ADJUSTMENT, DESKTOP_ADJUSTMENT, DEMOGRAPHICS_ADJUSTMENT, RETARGETING_ADJUSTMENT, REGIONAL_ADJUSTMENT, VIDEO_ADJUSTMENT, SMART_AD_ADJUSTMENT, INCOME_GRADE_ADJUSTMENT
limitnumberPage limit (default 100, max 10000)
offsetnumberPage offset (default 0)

add_bid_modifiers

Add bid modifiers. Each must include CampaignId or AdGroupId and an adjustment object. Use when the user asks to add a new bid adjustment. Do not use it to change an existing adjustment; call set_bid_modifiers, which spends money and requires confirm. Do not use it to list them; call get_bid_modifiers.

ParameterTypeDescription
items_json *stringJSON array of bid modifier objects, e.g. [{"CampaignId":12345,"MobileAdjustment":{"BidModifier":50}}]

set_bid_modifiers

Update bid modifier values. Pass a JSON array of objects with Id and the new adjustment value. SPENDS MONEY and is IRREVERSIBLE: modifiers multiply the bid actually paid, the previous values are overwritten and cannot be read back from the API. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to change bid adjustment values and accepts the spend. Do not use it to add a new adjustment; call add_bid_modifiers. Do not use it to read them; call get_bid_modifiers.

ParameterTypeDescription
modifiers_json *stringJSON array of bid modifier update objects, e.g. [{"Id":11111,"BidModifier":120}]
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

delete_bid_modifiers

Delete bid modifiers by IDs. IRREVERSIBLE: bid modifiers and the statistics attached to them are lost permanently — re-adding creates new entities with new IDs, not the old ones back. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to delete bid adjustments. Do not use it to change their values; call set_bid_modifiers. Do not use it to read them; call get_bid_modifiers.

ParameterTypeDescription
ids *arrayArray of entity IDs to delete
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

get_vcards

Get VCards (business cards). Common FieldNames: Id, CampaignId, CompanyName, WorkTime, Phone, Street, Building, City, Country, Ogrn, InstantMessenger, ExtraMessage, ContactEmail, ContactPerson. Use when the user wants to read business cards attached to campaigns. Do not use it to create one; call add_vcards. Do not use it to delete one; call delete_vcards.

ParameterTypeDescription
field_names *arrayFields to return (FieldNames). See tool description for common values.
IdsarrayFilter by VCard IDs
limitnumberPage limit (default 100, max 10000)
offsetnumberPage offset (default 0)

add_vcards

Add VCards. Each must include CampaignId, Country, City, CompanyName, WorkTime, and Phone. Use when the user asks to add business cards. Do not use it to delete them; call delete_vcards. Do not use it to list them; call get_vcards.

ParameterTypeDescription
items_json *stringJSON array of VCard objects, e.g. [{"CampaignId":12345,"Country":"Россия","City":"Москва","CompanyName":"My Company","WorkTime":"0;6;9;0;18;0","Phone":{"CountryCode":"+7","CityCode":"495",…

delete_vcards

Delete VCards by IDs. IRREVERSIBLE: VCards and the statistics attached to them are lost permanently — re-adding creates new entities with new IDs, not the old ones back. Requires `confirm: true` — without it the tool refuses and calls nothing. Use when the user has explicitly asked to delete business cards. Do not use it to create them; call add_vcards. Do not use it to read them; call get_vcards.

ParameterTypeDescription
ids *arrayArray of entity IDs to delete
confirmbooleanMust be exactly true to actually apply this change. Omit it (or pass false) and the tool refuses without calling the Direct API.

create_report

Create a Yandex Direct report. Supported ReportType: ACCOUNT_PERFORMANCE_REPORT, AD_PERFORMANCE_REPORT, ADGROUP_PERFORMANCE_REPORT, CAMPAIGN_PERFORMANCE_REPORT, CRITERIA_PERFORMANCE_REPORT, CUSTOM_REPORT, REACH_AND_FREQUENCY_PERFORMANCE_REPORT, SEARCH_QUERY_PERFORMANCE_REPORT. DateRangeType: TODAY, YESTERDAY, THIS_MONTH, LAST_MONTH, THIS_QUARTER, LAST_QUARTER, THIS_YEAR, LAST_YEAR, ALL_TIME, CUSTOM_DATE, LAST_3_DAYS, LAST_5_DAYS, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, LAST_90_DAYS, LAST_365_DAYS, AUTO. Result is returned as JSON array parsed from TSV (max 500 rows). Use when the user wants i…

ParameterTypeDescription
date_range_type *stringDate range type. Use CUSTOM_DATE with date_from/date_to.
field_names *arrayColumns to include. Common: Date, CampaignName, CampaignId, AdGroupName, AdGroupId, AdId, Impressions, Clicks, Cost, Ctr, AvgCpc, AvgImpressionPosition, AvgClickPosition, BounceRate, AvgPageviews, Con…
report_type *stringReport type
date_fromstringStart date YYYY-MM-DD (required when date_range_type=CUSTOM_DATE)
date_tostringEnd date YYYY-MM-DD (required when date_range_type=CUSTOM_DATE)
filter_jsonstringOptional filter as JSON array, e.g. [{"Field":"CampaignId","Operator":"EQUALS","Values":["12345"]}]. Operators: EQUALS, NOT_EQUALS, IN, NOT_IN, LESS_THAN, GREATER_THAN, STARTS_WITH_IGNORE_CASE, DOES_N…
include_vatbooleanInclude VAT in money values (default: true)

get_dictionaries

Get Yandex Direct dictionaries (reference data). Available dictionaries: Currencies, MetroStations, GeoRegions, TimeZones, Constants, Categories, OperationSystemVersions, InterestCategories, Interests, AudienceInterests. Use when the user needs reference ids such as regions, currencies, or time zones before building a campaign. Do not use it for account performance; call create_report. Do not use it for the client profile; call get_clients.

ParameterTypeDescription
dictionary_names *arrayArray of dictionary names to retrieve

get_clients

Get client info (for agency accounts). Common FieldNames: Login, ClientId, ClientInfo, AccountQuality, Archived, CountryId, CreatedAt, Currency, Grants, Notification, OverdraftSumAvailable, Phone, Representatives, Restrictions, Settings, Type. Use when the user is an agency and needs the client logins this token can act for. Do not use it to switch the client; set YANDEX_DIRECT_CLIENT_LOGIN. Do not use it to list campaigns; call get_campaigns.

ParameterTypeDescription
field_names *arrayFields to return, e.g. ["Login","ClientId","ClientInfo","Currency"]