mcp-yandex-webmaster: Instructions file for Claude Code

CLAUDE.md

mcp-yandex-webmaster CLAUDE.md is an instructions file for Claude Code from askads/mcp-yandex-webmaster. It costs 2,746 tokens per session, scanned A, original, MIT.

A set of instructions for working on the Yandex Webmaster connector project. It documents the commands, project structure, coding rules, authentication, and how to add tools.

In plain words
What is it for?
Use it when developing, testing, building, or extending the mcp-yandex-webmaster server.
Why use it?
It gives an agent the project context needed to change the code without breaking its existing conventions or API behavior. It also explains how tests and builds are run.

Instructions file for Claude Code

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

This is askads/mcp-yandex-webmaster's own configuration. It tells Claude Code how to work on mcp-yandex-webmaster 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-yandex-webmaster configures →

Reuse

Borrowing it

Nothing to install: this file belongs to askads/mcp-yandex-webmaster. 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-yandex-webmaster/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/askads/mcp-yandex-webmaster

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-yandex-webmaster CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/askads/mcp-yandex-webmaster/claude-md.svg)](https://agentmods.dev/instructions/askads/mcp-yandex-webmaster/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/askads/mcp-yandex-webmaster/claude-md"><img src="https://agentmods.dev/badge/instructions/askads/mcp-yandex-webmaster/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,746 This file is loaded in full into every session.
When invoked 2,746 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.02746 $0.02746
Opus 5 $0.01373 $0.01373
Sonnet 5 $0.00549 $0.00549
Haiku 4.5 $0.00275 $0.00275

Measured 8d ago against content hash b5d8882411f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

mcp-yandex-webmaster 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 8d 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 · 152 lines

How it starts

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

CLAUDE.md — mcp-yandex-webmaster

MCP server for the Yandex Webmaster API v4 (TypeScript, stdio). Mostly read tools (sites, summary, diagnostics, search queries, indexing, sitemaps, links) plus four non-destructive writes (add_site, add_sitemap, recrawl_url, start_verification); raw_request is the escape hatch (GET/POST/DELETE). The server talks to https://api.webmaster.yandex.net/v4; auth is a Yandex OAuth token sent as Authorization: OAuth <token> — either YANDEX_OAUTH_TOKEN or a token minted by the in-chat login (start_login/finish_login). Almost every path lives under /user/{user-id}/... — the client resolves the user id via GET /v4/user once and caches it (or takes YANDEX_USER_ID).

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 call (needs YANDEX_OAUTH_TOKEN)

Architecture

  • src/config.ts — env → config. A missing YANDEX_OAUTH_TOKEN is NOT an error: the field stays undefined (an empty string reads as absent) and the server starts degraded — the token is resolved per request (env → stored login), so the user can connect from the chat. ConfigError (with a reason code) is reserved for malformed values — today a non-numeric YANDEX_USER_ID — and is caught by loadConfigOrDegraded in index.ts. Optional YANDEX_USER_ID, YANDEX_WEBMASTER_HOST_ID, YANDEX_WEBMASTER_API_BASE, YANDEX_WEBMASTER_TIMEOUT_MS, YANDEX_WEBMASTER_MAX_RETRIES.
  • src/oauth.ts — the OAuth flow: PKCE pair (S256), authorize URL against https://oauth.yandex.ru/verification_code, code exchange and refresh. No client_secret — this is a public client, and a secret inside an npm package would protect nothing. The pending verifier lives in one module-level slot (one stdio server = one user); a second start_login replaces it. The client id is the dedicated Webmaster app, overridable via YANDEX_WEBMASTER_OAUTH_CLIENT_ID; scope is pinned to webmaster:hostinfo webmaster:verify.
  • src/credentials.ts~/.config/mcp-yandex-webmaster/credentials.json, mode 0600. An unparsable file reads as "not connected", never as an empty token.
  • src/auth.tsTokenStore: resolves the token per request (env wins over stored), refreshes on expiry, and raises AuthRequiredError whose message is the product — it is the only text the user ever sees about a missing token, and it names both fixes (start_login in the chat, or YANDEX_OAUTH_TOKEN + restart). Replaced the old CredentialsError.
  • src/client.ts — one typed method per endpoint. Owns the wire vocabulary (TOTAL_SHOWS, MOBILE_AND_TABLET, DNS, ... via map* helpers), the user-id promise cache (userId(), failure not cached — that is what lets the auto-detection run lazily on the first call after a mid-session login), the host path builder (hostPath() applies the config default and URL-encodes the id, failing fast without a fetch when both are missing) and query-string building (arrays become repeated params, undefined is dropped). request() resolves the token via the TokenStore on every attempt, before fetch — a missing token throws AuthRequiredError there and is rethrown before the retry/backoff branch, which also stops the user-id auto-detection — resolves the path against the base and rejects any path that escapes to a foreign origin (SSRF guard), retries 429 (except QUOTA_EXCEEDED) but 5xx/network only for GET (a 502 after a committed write must not duplicate it), honors Retry-After, re-mints a stored token once on 401 and replays, enforces an AbortController timeout that also covers reading the body, and throws WebmasterError(status, body).
  • src/types.ts — config + normalized unions; WebmasterError parses the API's {error_code, error_message, ...} body and appends follow-up hints for HOST_NOT_VERIFIED / HOST_NOT_LOADED / HOST_NOT_INDEXED (and available_user_id for INVALID_USER_ID).
  • src/tools/auth.ts — the in-chat login (auth_status, start_login, finish_login, logout); hosts.ts — sites, summary, verification, diagnostics; queries.ts — popular queries + history; indexing.ts — crawl history, recrawl, important pages, sitemaps; links.ts — external links; raw.tsraw_request (substitutes a {user-id} placeholder). util.tsok/fail, the READ_ONLY/WRITE/WRITE_UPDATE/DESTRUCTIVE annotation constants and shared zod schema factories (hostId, isoDate).
  • src/index.ts — wires every register* into the McpServer. loadConfigOrDegraded() catches ConfigError, pings startup_failed (fire-and-forget) and degrades the config to "no credentials"; connected = tokens.hasToken() is resolved once, only to pick the instructions text — an unconfigured start prepends UNCONFIGURED_PREFIX (naming start_login and the env alternative) — plus Проблема конфигурации: <message> when a ConfigError was caught — to the initialize instructions, and oninitialized sends server_start for a configured install or unconfigured_start (with the reason) otherwise.
  • 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). server_start means "a usable install started"; unconfigured_start is a degraded start and startup_failed a malformed config caught at load — both carry a reason from a closed vocabulary (missing_token, invalid_user_id) — never a variable's name or value.

Read the full file on GitHub · 152 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. 8d ago First seen · 152 lines · 2,746 tokens per session scan A b5d8882411f2

Subscribe to this mod's changes

mcp-yandex-webmaster CLAUDE.md is an instructions file published in the GitHub repository askads/mcp-yandex-webmaster (0 stars, last pushed 17d ago), licensed MIT. It adds 2,746 tokens to every session, about $0.0137 per session on Opus 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

Other instructions, from other repositories

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

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,153 tokens

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

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

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

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