search-console-mcp: Instructions file for Claude Code

CLAUDE.md

search-console-mcp CLAUDE.md is an instructions file for Claude Code from OrellBuehler/search-console-mcp. It costs 1,861 tokens per session, scanned A, original, MIT.

Repository instructions for `search-console-mcp`, a local server that gives AI agents access to Google Search Console through its official API. Google Search Console reports how a site appears in Google Search and whether its pages are indexed.

In plain words
What is it for?
Use them when building, testing, linting, formatting, or reviewing this MCP server. They also help when working on search performance data, URL index checks, sitemaps, or Search Console properties.
Why use it?
They explain the project’s structure, commands, conventions, and environment settings so code changes and checks follow the repository’s rules. They also clarify which Google APIs the project does not use.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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 search-console-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/orellbuehler/search-console-mcp/claude-md.svg)](https://agentmods.dev/instructions/orellbuehler/search-console-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/orellbuehler/search-console-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/orellbuehler/search-console-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,861 This file is loaded in full into every session.
When invoked 1,861 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.01861 $0.01861
Opus 5 $0.00931 $0.00931
Sonnet 5 $0.00372 $0.00372
Haiku 4.5 $0.00186 $0.00186

Measured 7d ago against content hash 3e4822b2912c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

search-console-mcp 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 7d 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 · 118 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

A STDIO MCP server that exposes the official Google Search Console API (webmasters v3 + searchconsole v1) as tools for AI agents, centered on search performance (clicks, impressions, CTR, position by query/page/country/device/date), index health (URL inspection) and sitemap and property management. Published to npm as @orellbuehler/search-console-mcp and run via npx; the compiled dist/index.js is the bin entry. See README.md for the tool catalog and env-var reference.

Note the Indexing API (requesting URL (re)indexing) is a different, unrelated API restricted to job postings and livestreams — it is not used here. Neither is Google Analytics.

Commands

npm run build         # tsc -p tsconfig.build.json -> dist/
npm test              # vitest run (all tests)
npm run test:watch    # vitest watch
npm run lint          # eslint src
npm run typecheck     # tsc --noEmit
npm run format        # prettier --write .
npm run format:check  # prettier --check . (what CI runs)

Run a single test file or pattern:

npx vitest run src/__tests__/analytics.test.ts
npx vitest run -t "top_queries"

CI (.github/workflows/ci.yml) runs format:check, lint, typecheck, and test + build on Node 20 and 22 — all must pass. Run them locally before committing.

Architecture

Request flow: index.ts reads config, builds the server via server.ts:createServer(client, inspectionClient, siteUrl, allowDestructive), and connects it over stdio. Each tool calls one of the two REST clients.

  • src/index.ts — entry point. Stdio transport only (single-account).
  • src/config.ts — reads env at import time and exits the process if neither GOOGLE_SERVICE_ACCOUNT_KEY nor GOOGLE_SERVICE_ACCOUNT_KEY_PATH is set. Exports config (including siteUrl from GOOGLE_SEARCH_CONSOLE_SITE_URL and allowDestructive from GOOGLE_SEARCH_CONSOLE_ALLOW_DESTRUCTIVE), client (webmasters v3: analytics, sitemaps, sites) and inspectionClient (searchconsole v1: URL inspection).
  • src/gsc/auth.tscreateTokenProvider(auth): signs an RS256 service-account JWT with jose and exchanges it at https://oauth2.googleapis.com/token for an OAuth access token, cached until expiry with a 60 s buffer. Single scope (webmasters); one provider serves both clients. The key JSON is loaded lazily on first use (inline or from a file path). No googleapis / google-auth-library dependency.
  • src/gsc/client.tsGoogleSearchConsoleClient, a thin fetch wrapper. One class, two instances built from WEBMASTERS_BASE_URL and SEARCHCONSOLE_BASE_URL. get/post/put/del; post and put take an optional body (submit_sitemap and add_site are body-less PUTs) and tolerate empty response bodies. Throws on non-2xx with the response body in the message.
  • src/gsc/format.tsok/err (MCP content envelopes; ok passes strings through unquoted), resolveSite (per-tool site_url overriding GOOGLE_SEARCH_CONSOLE_SITE_URL, throwing a helpful error if neither is set) and defaultDateRange (28 days ending 3 days ago, UTC — Search Console data lags ~2–3 days).
  • src/tools/*.ts — each exports a register*Tools(server, client, defaultSiteUrl?) function that server.ts calls: analytics (searchAnalytics/query + top_queries/top_pages wrappers), sitemaps and sites (both take a fourth allowDestructive argument) on the webmasters client, inspection on the searchconsole client.
  • src/tools/shared.ts — Zod shapes reused across tool modules: siteArg, startDateArg, endDateArg, countryArg, deviceArg. Reuse these instead of redeclaring them.

Read the full file on GitHub · 118 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. 7d ago First seen · 118 lines · 1,861 tokens per session scan A 3e4822b2912c

Subscribe to this mod's changes

search-console-mcp CLAUDE.md is an instructions file published in the GitHub repository OrellBuehler/search-console-mcp (0 stars, last pushed 4d ago), licensed MIT. It adds 1,861 tokens to every session, about $0.0093 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

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

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

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