google-search-console-mcp-cli
AGENTS.md1 starsChanged 38 days agoMITView on GitHub
For an agent editing this server. Installation and usage live in the README. Tests never touch the network and never need a token. A test that needs credentials is a test nobody runs, CI least of all. tests/helpers.ts has the faked fetch every test goes through. Writes are on by default. Only delete_site and delete_sitemap require confirm. Adding confirm to submit_sitemap would teach a model to pass it reflexively, which is worse than not having it. Gating hides, rather than…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- google-search-consoleSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Writes are on by default: Only delete_site and delete_sitemap require confirm.
- Very specific: line 44
Property strings are normalized in
api/client.ts, once: Do not add per-tool normalization. - Very specific: line 47
Every default window ends three days back: Search Console finalises data on a lag and a window ending today reads as a broken connector.
- Very specific: line 86
Do not write to stdout from the stdio transport.
- Very specific: line 90
Do not add a mobileFriendlyTest tool.
- Distinctive: line 93
Do not let a failed audit-log write fail the action it was recording.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working on this repo
For an agent editing this server. Installation and usage live in the README.
Run it
npm install
npm run build
npm test # vitest, no network, no credentials
npm run typecheck
node dist/index.js doctorTests never touch the network and never need a token. A test that needs
credentials is a test nobody runs, CI least of all. tests/helpers.ts has the
faked fetch every test goes through.
Layout
src/index.ts | starts the app; turns 0.2's --host and PORT into the settings Slipway reads |
src/app.ts | the app Slipway serves: settings, doctor, login, logout, accounts |
src/instructions.ts | the instructions string |
src/config.ts | the settings every tool reads |
src/auth.ts | the three credential routes, the loopback login, refresh |
src/safety.ts | what a tool can change, and injection framing |
src/api/client.ts | the HTTP layer, error mapping, property normalization |
src/tools/ | one module per group, grouped by what they reach |
src/format/rows.ts | shaping API output for a model |
Decisions already made
Writes are on by default. Only delete_site and delete_sitemap require
confirm. Adding confirm to submit_sitemap would teach a model to pass it
reflexively, which is worse than not having it.
Gating hides, rather than refuses. Slipway leaves writes off the list
under GSC_READ_ONLY, and the two deletes under GSC_ALLOW_DESTRUCTIVE=0. An
error saying "writes are disabled" is an invitation to try a different tool; an
absent tool is not.
Property strings are normalized in api/client.ts, once. Do not add
per-tool normalization.
Every default window ends three days back. Search Console finalises data on
a lag and a window ending today reads as a broken connector. DATA_LAG_DAYS in
format/rows.ts is the single place that number lives.
Average position is weighted by impressions in totals(). A plain mean lets
a three-impression query move the number as much as a thirty-thousand-impression
one.
Adding a tool
Register it through the tool() helper in src/tools/shared.ts.
src/tools/kit.ts turns each spec into a Slipway tool: it resolves the token
for the account a call names, and Slipway applies read-only, confirmation,
annotations and the audit log from the kind. A confirmed tool needs a
consequence in CONSEQUENCES there, in the words its refusal should say.
Pick the kind honestly. read for anything that changes nothing,
destructive only for what cannot be undone.
The description is the interface. A model reads it and cannot see the code, so say what the tool reaches, what it costs, and what will surprise the caller. Platform constraints belong in the description, not only in the README: quota limits and the property-string trap prevent a whole class of failed calls when they are stated where the model reads them.
Before claiming it works
npm test is not enough. Run a real client handshake:
npm run build
node dist/index.js doctorand connect it from an actual MCP client. A tool can build, typecheck and pass unit tests while failing to register.
Do not
Do not write to stdout from the stdio transport. stdout is the JSON-RPC channel
and a stray console.log corrupts it, which surfaces as the client seeing no
tools at all and no error anywhere.
Do not add a mobileFriendlyTest tool. It is still in Google's discovery
document but the service was retired, so it returns errors.
Do not let a failed audit-log write fail the action it was recording. It is a record, not a control.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

