yandex-direct-mcp-plugin CLAUDE.md

yandex-direct-mcp-plugin CLAUDE.md is an instructions file for Claude Code from axisrow/yandex-direct-mcp-plugin. It costs 2,587 tokens per session, scanned B, original, MIT.

A set of instructions for a Claude Code plugin that manages Yandex.Direct advertising campaigns, which are online ad campaigns on Yandex. It uses a Python command-line tool and the Yandex.Direct API through an MCP server.

In plain words
What is it for?
Use it when developing or maintaining this plugin, especially for working with campaign operations, service tools, authentication profiles, and the documented implementation rules.
Why use it?
It keeps campaign operations behind one command-line boundary and documents the project's architecture, commands, authentication, and available tools.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/axisrow/yandex-direct-mcp-plugin/claude-md
Clone the repo
git clone --depth 1 https://github.com/axisrow/yandex-direct-mcp-plugin

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for yandex-direct-mcp-plugin CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/axisrow/yandex-direct-mcp-plugin/claude-md.svg)](https://agentmods.dev/instructions/axisrow/yandex-direct-mcp-plugin/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/axisrow/yandex-direct-mcp-plugin/claude-md"><img src="https://agentmods.dev/badge/instructions/axisrow/yandex-direct-mcp-plugin/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,587 This file is loaded in full into every session.
When invoked 2,587 The same file — it is already loaded in full.
Security scan B 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02587 $0.02587
Opus 5 $0.01293 $0.01293
Sonnet 5 $0.00517 $0.00517
Haiku 4.5 $0.00259 $0.00259

Measured 2d ago against content hash 447b294a500e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

yandex-direct-mcp-plugin CLAUDE.md scanned grade B with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Auth (simplest first): set `YANDEX_DIRECT_TOKEN` in `~/.claude/settings.json` env, or run `auth_login`/`auth_setup` (saved to `~/.direct-cli/auth.json`). `direct-cli` resolves explicit env creds before the active profi

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **MCP never calls Yandex.Direct directly** — always through `direct`, even to work around a missing/broken CLI feature. No `urllib`, raw HTTP, or `tapi-yandex-direct` imports. File upstream issues in `axisrow/direct-cl

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

Three modes: **cassettes** (default `pytest`, recorded in `tests/recordings/`, no network), **mocks** (`-m mocks`, patch `subprocess.run` for unreproducible edges), **integration** (`-m integration`, live token). Cassett
CLAUDE.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

Claude Code plugin for managing Yandex.Direct advertising campaigns. Wraps the direct Python CLI via an MCP server (FastMCP, stdio); auth delegated to direct auth profiles. Status: Implemented.

Architecture

MCP (server/main.py) → direct CLI → tapi-yandex-direct → Yandex.Direct API
  • MCP never calls Yandex.Direct directly — always through direct, even to work around a missing/broken CLI feature. No urllib, raw HTTP, or tapi-yandex-direct imports. File upstream issues in axisrow/direct-cli and wait for the release.
  • direct is the only execution/transport boundary. WSDL/Reports spec wins when CLI convenience names drift.
  • Machine-readable parity source: server/contract.py (PUBLIC_CONTRACT, TRANSPORT_BLOCKED_OPERATIONS, RENAMED_TOOL_MIGRATION).
  • server/cli/runner.pyDirectCliRunner subprocess wrapper. server/tools/*.py — 149 default tools across 42 modules, one module per service; the contract reserves 23 additional tools for opt-in bundles loaded by server/optional_tools.py as their implementation modules land. server/tools/helpers.py — shared validation (parse_ids, check_batch_limit).

Commands

Task Command
Install pip install -e ".[dev]" (add ,docs for Sphinx)
All tests (cassettes, no token) pytest
Single test pytest tests/test_campaigns.py::test_campaigns_list -v
Mock edge-case tests pytest -m mocks
Integration tests (needs .env + a direct auth profile) pytest -m integration
Record cassettes pytest --record
Sanitize / audit cassettes python -m tests.sanitize · python -m tests.audit
Lint / format ruff check . · ruff format .
Type check mypy .
Run server locally python3 server/main.py
Build docs cd docs && make html

Environment

  • Python ≥ 3.11, no Node.js. Deps: mcp, direct-cli. Build config: pyproject.toml (PEP 621).
  • Auth (simplest first): set YANDEX_DIRECT_TOKEN in ~/.claude/settings.json env, or run auth_login/auth_setup (saved to ~/.direct-cli/auth.json). direct-cli resolves explicit env creds before the active profile.
  • Creds: YANDEX_DIRECT_TOKEN, YANDEX_DIRECT_LOGIN, YANDEX_DIRECT_CLI_PATH. Finance/master tokens are env-only: YANDEX_DIRECT_FINANCE_TOKEN, YANDEX_DIRECT_MASTER_TOKEN.
  • Optional registration (server/optional_tools.py, default = none): YANDEX_DIRECT_OPTIONAL_TOOLS accepts browser, trackingparams, a comma-separated combination, or all. The import gate runs before tool-surface filtering, so profiles/groups can subtract tools after their bundle is loaded; surface allow-lists do not load bundles by themselves.
  • Browser read deployment: YANDEX_DIRECT_BROWSER_PROFILE_DIR and YANDEX_DIRECT_BROWSER_CHROME_PROFILE select the Chrome profile; YANDEX_DIRECT_BROWSER_HEADFUL=1 shows the browser. These are server env settings, not MCP tool parameters.
  • Tool-surface selection (server/config.py, default = all 149 registered tools): YANDEX_DIRECT_TOOL_PROFILE (full|core|analytics|campaign-editor), YANDEX_DIRECT_ENABLED_GROUPS/_DISABLED_GROUPS (service / action / product-area / financial), YANDEX_DIRECT_ENABLED_TOOLS/_DISABLED_TOOLS.

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +18 lines · +258 tokens per session 447b294a500e
  2. 6d ago First seen · 124 lines · 2,329 tokens per session scan B bc631eb071b4

Subscribe to this mod's changes

yandex-direct-mcp-plugin CLAUDE.md is an instructions file published in the GitHub repository axisrow/yandex-direct-mcp-plugin (12 stars, last pushed 4d ago), licensed MIT. It adds 2,587 tokens to every session, about $0.0129 per session on Opus 5. A static security scan graded it B with 3 findings (reads agent configuration directories, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens