mcp-vk-ads: Instructions file for Claude Code

CLAUDE.md

mcp-vk-ads CLAUDE.md is an instructions file for Claude Code from askads/mcp-vk-ads. It costs 1,778 tokens per session, scanned A, original, MIT.

Repository instructions for a TypeScript MCP server that connects coding agents to the VK Ads advertising API. The server exposes tools for accounts, campaigns, ad groups, banners, statistics, and direct API requests.

In plain words
What is it for?
Developing, testing, building, or smoke-testing the VK Ads integration, including read-only live checks and API requests without a dedicated tool.
Why use it?
It documents the commands, authentication, request safety, retries, timeouts, pagination, and testing limits needed to work with the advertising API without accidentally repeating unsafe operations.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is askads/mcp-vk-ads's own configuration. It tells Claude Code how to work on mcp-vk-ads itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-vk-ads configures →

Reuse

Borrowing it

Nothing to install: this file belongs to askads/mcp-vk-ads. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/askads/mcp-vk-ads/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/askads/mcp-vk-ads

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 mcp-vk-ads CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/askads/mcp-vk-ads/claude-md/github.svg)](https://agentmods.dev/instructions/askads/mcp-vk-ads/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/askads/mcp-vk-ads/claude-md"><img src="https://agentmods.dev/badge/instructions/askads/mcp-vk-ads/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-vk-ads CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/askads/mcp-vk-ads/claude-md"><img src="https://agentmods.dev/badge/instructions/askads/mcp-vk-ads/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,778 This file is loaded in full into every session.
When invoked 1,778 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.01778 $0.01778
Opus 5.5 $0.00711 $0.00711
Sonnet 5.5 $0.00356 $0.00356
Haiku 4.5 $0.00178 $0.00178

Measured 1mo ago against content hash 2ee175ac063e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp-vk-ads CLAUDE.md scanned grade A with 0 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 107 lines

How it starts

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

CLAUDE.md — mcp-vk-ads

MCP server for the VK Ads (VK Реклама) API (TypeScript, stdio). Tools wrap the REST endpoints; raw_request is the escape hatch for everything without a dedicated tool.

Commands

npm run dev        # run from source (tsx watch)
npm test           # unit tests, no network
npm run typecheck  # types for src + tests
npm run build      # emit dist/
npm run smoke      # live READ-ONLY calls (needs VK_ADS_TOKEN)

More detail in docs/DEVELOPMENT.md. Tool list: docs/TOOLS.md.

Architecture

  • src/client.ts — HTTP client over https://ads.vk.com/api (override with VK_ADS_API_BASE): Bearer auth resolved per request from TokenStore (so a login mid-session takes effect at once) with one silent refresh+replay on 401, AbortController timeout (covers reading the body), SSRF guard (buildUrl refuses a path resolving off the API origin), retry/backoff (honors Retry-After) — 429 for any method, but 5xx and network errors ONLY for idempotent GET (a retried POST could duplicate a create), getAll offset/count pagination, VkAdsError(status, body). No sandbox, no quota header, no async report polling.
  • src/tools/*.ts — one file per area (auth, account, adPlans, adGroups, banners, statistics, raw), each exports register<Name>Tools(server, client).
  • src/oauth.ts / src/auth.ts / src/credentials.ts — the in-chat login. oauth.ts talks to v2/oauth2/token.json (mint + refresh, VK's error codes turned into advice); TokenStore resolves the token per request (env VK_ADS_TOKEN wins, else the stored login) and refreshes it; credentials.ts is the 0600 file under ~/.config/mcp-vk-ads/. finish_login stores the client_secret on purpose — VK refuses a refresh_token grant without it.
  • src/tools/util.ts — shared helpers (see conventions below).
  • src/index.ts — wires every register* into the McpServer.
  • src/telemetry.ts — anonymous usage pings (ids/names/versions only, never data or arguments; fire-and-forget, must never block or throw; opt-out ASKADS_TELEMETRY=0). A server without a token no longer dies, so it pings unconfigured_start instead of startup_failed — keep them apart, or server_start stops meaning "a usable install started". reason is a closed vocabulary (missing_token, invalid_api_base, …) — never a variable's name or value.
  • src/config.ts — env → config. A missing token is not an error: the server starts anyway so the user can connect from the chat (it used to exit before the MCP handshake, leaving a red cross and nothing to read). A malformed value still throws ConfigError (with a reason code), which index.ts carries into the session instead of exiting.

Read the full file on GitHub · 107 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. 1mo ago Changed · +17 lines · +360 tokens per session 2ee175ac063e
  2. 2mo ago First seen · 90 lines · 1,418 tokens per session scan A 8202ed4478b5

Subscribe to this mod's changes

mcp-vk-ads CLAUDE.md is an instructions file published in the GitHub repository askads/mcp-vk-ads (12 stars, last pushed 10d ago), licensed MIT. It adds 1,778 tokens to every session, about $0.0071 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

mcp-vk-ads CLAUDE.md compared with instructions from other repositories

mcp-vk-ads CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-vk-ads CLAUDE.mdaskads/mcp-vk-adsInstructions file1210d agoMITA1,778Claude Code
data-scientist copilot-instructions.mdrealnghon/data-scientistInstructions file24mo agoMITA373GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,086GitHub Copilot