跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Yandex Direct,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 以只读方式分析你的 Yandex Direct 广告:广告系列、广告组、广告、关键词和出价、附加链接和宣传信息、代理商客户、字典、变更跟踪,以及按日、广告系列、广告或搜索词划分的统计报告。
试试这样问
Yandex Direct 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Yandex Direct、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Yandex Direct
让你的 AI 以只读方式分析你的 Yandex Direct 广告:广告系列、广告组、广告、关键词和出价、附加链接和宣传信息、代理商客户、字典、变更跟踪,以及按日、广告系列、广告或搜索词划分的统计报告。
设置
设置大约需要 10 分钟,另外还要等待 Yandex 批准 API 访问(从一小时到几个工作日不等)。你需要一个至少有一个广告系列的 Yandex Direct 账号,以及一个在 oauth.yandex.ru 上注册的自有应用。
- 在 oauth.yandex.ru 注册一个应用:平台选择网页服务,权限选择 Yandex Direct API(
direct:api)。记下它的 ClientID。 - 在 Yandex Direct 网页界面中打开 Tools → API,为该 ClientID 提交 API 访问申请,并接受 API 用户协议。在 Yandex 批准申请之前,调用会以错误 58 失败。
- 用 Direct 账号登录后,打开填入你的 ClientID 的
https://oauth.yandex.ru/authorize?response_type=token&client_id=<ClientID>,把access_token(以 y0_ 开头)复制到YANDEX_DIRECT_TOKEN,前面不要加 Bearer 或 OAuth。令牌有效期约一年,持续使用时会自动延长。 - 仅限代理商:把
YANDEX_DIRECT_CLIENT_LOGIN设为要读取的广告主的 Yandex 登录名;yandex_direct_list_agency_clients会列出这些登录名。如果是你自己的账号,请留空。 - 安装连接器并运行
yandex_direct_get_client:它会显示账号、登录名和币种。
可读取的内容:广告系列的类型、状态、投放状态、日期、资金、累计点击和展示次数以及出价策略;广告组及其地区和否定关键词;广告的标题、正文和链接;关键词和自动定向及其出价和效果指数;关键词出价,包括搜索中每个位置所需的出价和流量;附加链接、宣传信息、共享否定关键词集和再营销列表;代理商客户;货币、地区等字典;自某一时刻以来发生变化的广告系列;以及按日、广告系列、广告或搜索词划分的统计报告。
报告:yandex_direct_get_report 返回以制表符分隔的文本,第一行是列名,金额为小数。小报告会立即返回。较大的报告在离线模式下生成:AI 会在 Yandex 给出的等待时间之后用相同参数再次请求。离线报告最多可排队 5 个,搜索词报告只能离线生成,且只覆盖最近 180 天。
金额和分页:出价、预算和资金以微单位整数返回(2500000 = 账号币种的 2.50)。列表默认最多返回 500 个对象,上限为 10,000 个;广告组、广告和关键词每次调用最多读取 10 个广告系列。
刻意设计为只读:所有工具都只读取。不会创建、修改、暂停或支付任何内容,因此没有需要确认的操作,安装时也没有被关闭的工具。
限制:每次调用都会消耗广告主每日额度中的 API 点数,失败的调用消耗 20 点。AI 会优先用一次调用带多个 ID,而不是多次单独调用,并且只请求需要的字段。错误 152 表示今天的点数已用完;506 表示同时进行的请求过多。
常见错误:53 表示令牌无效或已过期:请按第 3 步重新获取。58 表示应用的 API 访问尚未获批。54、3000 或 3001 表示没有 API 访问权限或没有权限,例如令牌无权读取某个客户登录名。513 表示该登录名未连接到 Direct。8000 以及 4000 到 4006 表示参数错误,8800 表示找不到对象,9300 表示单次调用中的 ID 过多。
该连接器不会创建或编辑广告系列、广告、关键词或出价,不处理审核、预算或付款,也不使用 Sandbox 或 Wordstat。
前提条件: YANDEX_DIRECT_TOKEN
本地安装连接器
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
打开 http://localhost:3000/connectors/store,选择 Yandex Direct 并填入前提条件中列出的环境变量。
可用工具
| 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… |
示例提示
- “我的广告系列上周表现如何?按广告系列列出展示、点击、CTR、花费和转化。”
- “过去 30 天里,哪些搜索词花费最多却没有带来一次转化?”
- “列出‘冬季轮胎’广告系列的关键词及其出价,并告诉我要进入靠前位置需要出多少价。”
- “我的哪些广告目前被拒登或没有在展示?原因是什么?”
- “我们是代理商:列出我们的客户,并显示客户 romashka-shop 昨天的花费。”
下一步
这份指南对你有帮助吗?