Yandex Direct MCP

io.github.stufently由 GitHub 帳號 stufently 發布v2.2.1更新於 Oct 24, 2026

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

已驗證STDIO僅桌面資料與分析商業與電商

概覽

AI 產生的概覽

針對 Yandex Direct API v5 的本機 MCP 伺服器,讓助理讀取並修改廣告活動、廣告群組、廣告、關鍵字、出價、擴充功能和報表。

可以做什麼
  • 查詢、新增、更新、刪除、封存、暫停與恢復廣告活動及廣告群組
  • 管理廣告,包含送出審核
  • 管理關鍵字,設定關鍵字出價、自動出價與出價調整
  • 管理網站連結與虛擬名片
  • 建立報表,取得字典與客戶清單
適用情境
適合讓助理直接操作 Yandex Direct 廣告帳戶:檢視或調整廣告活動結構、修改關鍵字與出價、取得成效報表。在信任流程之前,建議先指向沙箱環境而非正式帳戶。
執行需求
以本機 Node.js 程序從原始碼執行(複製儲存庫、安裝相依套件、執行套件進入點檔案);npm 套件雖已發布,但 README 建議從原始碼執行。需要 YANDEX_DIRECT_TOKEN 中的 OAuth 權杖;代理帳戶需 YANDEX_DIRECT_CLIENT_LOGIN,YANDEX_DIRECT_SANDBOX 可將呼叫導向沙箱。需要連線至 Yandex Direct API 的網路。
安裝前請注意
它會變更線上廣告資料:廣告活動、廣告、關鍵字與出價可被新增、更新、刪除或封存,出價以百萬分之一為單位,差 1,000,000 倍是真實風險。十四個不可逆工具要求字面值 confirm: true,但新增、封存、暫停與送審不受保護,也沒有試跑模式。誤操作會花掉真實預算。OAuth 權杖可存取帳戶,須妥善保密;在信任流程前請使用沙箱。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Yandex Direct MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

yandex-direct-mcp

MCP server for Yandex Direct API v5 — campaigns, ad groups, ads, keywords, bids, bid modifiers, sitelinks, vCards, and reports. 43 tools.

Write access, no dry-run. Unlike the other servers in this monorepo, this one changes live advertising data: it can create, update, delete and archive campaigns and ads, and set bids (in micro-units — a factor-of-1,000,000 mistake is a real risk). There is no confirmation step and no dry-run mode. Point it at the sandbox (YANDEX_DIRECT_SANDBOX=true) until you trust the workflow.

Installation

This package is published as @stufently/yandex-direct-mcp; unscoped yandex-*-mcp names on the public registry belong to an unrelated publisher (see the note in the root README). Nothing is on the scope yet, so run it from source:

bash
git clone https://github.com/stufently/yandex-mcp.gitcd yandex-mcp && bun installnode packages/yandex-direct-mcp/src/index.mjs

Configuration

VariableRequiredDescription
YANDEX_DIRECT_TOKENyesOAuth token for Direct API v5
YANDEX_DIRECT_CLIENT_LOGINagencies onlyClient login to act on behalf of
YANDEX_DIRECT_SANDBOXnotrue routes calls to the Direct sandbox
json
{  "mcpServers": {    "yandex-direct": {      "command": "node",      "args": ["/path/to/yandex-mcp/packages/yandex-direct-mcp/src/index.mjs"],      "env": { "YANDEX_DIRECT_TOKEN": "your-token" }    }  }}

Tools

AreaTools
Campaignsget_campaigns, add_campaigns, update_campaigns, delete_campaigns, archive_campaigns, unarchive_campaigns, suspend_campaigns, resume_campaigns
Ad groupsget_adgroups, add_adgroups, update_adgroups, delete_adgroups, archive_adgroups, unarchive_adgroups
Adsget_ads, add_ads, update_ads, delete_ads, archive_ads, unarchive_ads, moderate_ads
Keywordsget_keywords, add_keywords, update_keywords, delete_keywords, suspend_keywords, resume_keywords
Bidsget_keyword_bids, set_keyword_bids, set_auto_keyword_bids, get_bid_modifiers, add_bid_modifiers, set_bid_modifiers, delete_bid_modifiers
Extensionsget_sitelinks, add_sitelinks, delete_sitelinks, get_vcards, add_vcards, delete_vcards
Othercreate_report, get_dictionaries, get_clients

Irreversible tools need confirm: true

Fourteen tools cannot be undone through this API, and this is the one server where a mistaken call spends real money. They refuse unless the call carries confirm: true:

FamilyToolsWhy it cannot be undone
Deletesdelete_campaigns, delete_adgroups, delete_ads, delete_keywords, delete_bid_modifiers, delete_sitelinks, delete_vcardsThe entity and the statistics attached to it are gone; add_* creates a new entity with a new ID, not the old one back
Updatesupdate_campaigns, update_adgroups, update_ads, update_keywordsFields are overwritten in place and Direct exposes no revision history, so the previous ad text, budget or strategy cannot be read back
Bidsset_keyword_bids, set_auto_keyword_bids, set_bid_modifiersSame overwrite, with a price tag: these are the numbers that decide what the account pays per click
json
{ "ids": [12345], "confirm": true }

Called without it, the tool returns an error result and sends nothing to the Direct API — no entity touched, no bid moved, no API units spent:

Refused: `delete_campaigns` requires explicit confirmation.
Target — IDs: 12345. Deleting campaigns is irreversible: they and their accumulated statisticsare gone for good, and Yandex Direct offers no way to restore them.
Nothing was sent to the Yandex Direct API — no campaign, ad, keyword or bid was touched, and noAPI units were spent.
To go ahead, call `delete_campaigns` again with the same ids and `confirm: true`.To see the current state first, call `get_campaigns`.

confirm is optional in the JSON schema on purpose: a missing confirmation has to come back as that explanation, not as a schema validation error a model cannot act on. Only a literal true counts — "true", 1 and "yes" are refused, because a guess at the protocol is not a decision to spend money. All fourteen carry destructiveHint: true in their MCP annotations, so clients that surface tool risk can show it before the call.

add_*, archive_*/unarchive_*, suspend_*/resume_* and moderate_ads are deliberately left unguarded. Each has an inverse in this same server (or, for moderate_ads, leaves the entity itself untouched), so they are changes rather than losses. Guarding every write would train callers to pass confirm: true by reflex — which is exactly what would defeat it on the fourteen calls that matter.

Bids are expressed in micros (×10⁶). Set YANDEX_DIRECT_SANDBOX=true while experimenting.

Known limitations

  • The API path is hard-coded to /json/v5, so the unified performance campaigns endpoint (v501) is unreachable.
  • The Units response header (points consumed / remaining) is not surfaced, so a client cannot see how much of its quota a call cost.

License

MIT

來源:packages/yandex-direct-mcp/README.md,提交 bdd6c64

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v2.2.1最新Oct 16, 2026
  2. v2.2.0Oct 15, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分