mcp-gsc
CLAUDE.md1.8k starsChanged 8 months agoMITView on GitHub
Context for AI coding assistants (Claude, Cursor, Copilot, etc.) working in this repo. MCP server that connects Google Search Console to AI assistants. Single file: gsc_server.py (~1,670 lines). Built with FastMCP — no custom framework. Two modes, tried in order: Set GSC_SKIP_OAUTH=true to force service account mode and skip OAuth entirely. No credentials needed — all Google API calls are mocked with unittest.mock.
Trending
Quiet since September.thin dataabout the whole repository
Who's talking about AminForou/mcp-gsc
- rybbit-io/rybbit“docs(blog): Google Search Console MCP: Setup Guide and 5 Options Compared”GitHub · Sep 28, 2026
- rybbit-io/rybbit“docs(blog): Best Analytics MCP Servers in 2026: GA4, PostHog, Mixpanel”GitHub · Sep 28, 2026
- JSONbored/awesome-claude“content(mcp): add Google Search Console MCP Server”GitHub · Jun 6, 2026
- modelcontextprotocol/servers“Add MCP-GSC to Community Servers”GitHub · Mar 18, 2025
- modelcontextprotocol/servers“Add Google Search Console MCP server”GitHub · Mar 14, 2025
The biggest 5 of 5 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository4 other files it gives its agents.
- cannibalization-checkSkill
- content-opportunitiesSkill
- indexing-auditSkill
- seo-weekly-reportSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
OAuth (default): Place client_secrets.json in the repo root.
- Very specific: line 41
Add an @mcp.tool() decorated async function anywhere in gsc_server.py
- Very specific: line 42
Use get_gsc_service() for auth — it handles OAuth and service account automatically
- Very specific: line 66
No credentials needed — all Google API calls are mocked with unittest.mock.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md
Context for AI coding assistants (Claude, Cursor, Copilot, etc.) working in this repo.
What this is
MCP server that connects Google Search Console to AI assistants.
Single file: gsc_server.py (~1,670 lines). Built with FastMCP — no custom framework.
Running locally
uv sync
uv run python gsc_server.pyAuth
Two modes, tried in order:
- OAuth (default): Place
client_secrets.jsonin the repo root. On first run, a browser window opens for Google login. Token saved totoken.json(gitignored), auto-refreshes when expired. - Service account: Set
GSC_CREDENTIALS_PATHto the path of your service account JSON key file.
Set GSC_SKIP_OAUTH=true to force service account mode and skip OAuth entirely.
Key environment variables
| Variable | Default | Description |
MCP_TRANSPORT | stdio | Set to sse for remote/Docker/network use |
MCP_HOST | 127.0.0.1 | Host to bind when MCP_TRANSPORT=sse |
MCP_PORT | 3001 | Port to bind when MCP_TRANSPORT=sse |
GSC_DATA_STATE | all | all = matches GSC dashboard; final = confirmed data only (2–3 day lag) |
GSC_ALLOW_DESTRUCTIVE | false | Set true to enable add_site, delete_site, delete_sitemap |
GSC_CREDENTIALS_PATH | — | Path to service account JSON key file |
GSC_OAUTH_CLIENT_SECRETS_FILE | client_secrets.json | Path to OAuth client secrets file |
GSC_SKIP_OAUTH | false | Set true to skip OAuth and use service account only |
Adding a new tool
- Add an
@mcp.tool()decorated async function anywhere ingsc_server.py - Use
get_gsc_service()for auth — it handles OAuth and service account automatically - Return
json.dumps(result)not formatted text strings (LLMs work better with structured data) - Handle
HttpErrorand return a plain string error message on failure
@mcp.tool()
async def my_new_tool(site_url: str) -> str:
"""One-line description shown to the AI as the tool's purpose."""
try:
service = get_gsc_service()
result = service.someApi().someMethod(siteUrl=site_url).execute()
return json.dumps(result)
except Exception as e:
if "404" in str(e):
return _site_not_found_error(site_url)
return f"Error: {str(e)}"Running tests
pytest test_gsc_server.py -vNo credentials needed — all Google API calls are mocked with unittest.mock.
Docker
docker build -t mcp-gsc .
docker run -e MCP_TRANSPORT=sse -e MCP_PORT=3001 \
-v /path/to/client_secrets.json:/app/client_secrets.json \
-p 3001:3001 mcp-gscDoes 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.

