loading…
Search for a command to run...
loading…
Google Search Console MCP server: query performance data, inspect URLs, check indexing, and generate brandable HTML SEO audit reports with a 30/60/90-day roadma
Google Search Console MCP server: query performance data, inspect URLs, check indexing, and generate brandable HTML SEO audit reports with a 30/60/90-day roadmap. Read-only OAuth scope, installable via uvx mcp-google-search-console.
PyPI version Python versions License: MIT PyPI downloads CI
Read this in: English | Italiano
Open-source Model Context Protocol (MCP) server for Google Search Console. Brings your Search Console performance data, URL inspection, indexing checks, and sitemaps into Claude Code, Claude Desktop, Cursor, Zed, Continue, and any MCP-compatible client, and generates complete brandable HTML SEO audit reports in a single call.
If you work with SEO and use an AI coding assistant, this MCP server removes the copy-paste loop between Search Console and your chat: ask for top queries, check which pages are indexed, inspect a URL, or produce a 30/60/90-day SEO roadmap as an HTML report, all without leaving the assistant.
webmasters.readonly OAuth scope)gsc_audit: one-call generator for a self-contained HTML SEO report with Chart.js graphs, automatic issue detection, concrete examples, actionable strategy and a 30/60/90-day roadmapbranding.json, perfect for agencies delivering white-label auditsuvx: no clone, no virtualenv, runs straight from PyPI| Tool | Description |
|---|---|
gsc_sites |
List all verified sites |
gsc_site_details |
Details of a specific site |
gsc_query |
Performance report with dimensions (query, page, country, device, date) |
gsc_performance_overview |
Aggregated metrics for a period (clicks, impressions, CTR, position) |
gsc_indexing_issues |
Check indexing status for a list of pages |
gsc_inspect_url |
Detailed URL Inspection for a single page |
gsc_sitemaps |
List all sitemaps submitted for a site |
gsc_audit |
Generate a complete HTML audit report for a date range |
uvx (recommended, zero setup)Run directly from PyPI, no clone or venv required:
uvx mcp-google-search-console auth # one-time OAuth authorization
uvx mcp-google-search-console # start the MCP server
pipxpipx install mcp-google-search-console
mcp-google-search-console auth
mcp-google-search-console
git clone https://github.com/acamolese/google-search-console-mcp.git
cd google-search-console-mcp
uv venv && uv pip install -e .
.venv/bin/mcp-google-search-console auth
You have three ways, pick whichever fits your setup. The server reads them in this order:
A — Environment variables (best for headless, CI, Docker, hosted MCP):
export GSC_CLIENT_ID="xxxxxxxxxxxx.apps.googleusercontent.com"
export GSC_CLIENT_SECRET="GOCSPX-xxxxxxxxxxxxxxxx"
export GSC_REFRESH_TOKEN="1//0xxxxxxxxxxxxxxxx"
With these three variables set, the server is fully stateless: no files are read or written.
B — XDG config directory (recommended for local desktop usage):
Save the OAuth client JSON as:
~/.config/mcp-google-search-console/oauth_credentials.json
Then run the interactive authorization flow:
mcp-google-search-console auth
This opens a browser, captures the OAuth consent and saves the refresh token to ~/.config/mcp-google-search-console/token.json. On Linux and macOS the path honors $XDG_CONFIG_HOME if set.
C — Legacy per-project directory (backward compatibility only):
Place files under ./credentials/oauth_credentials.json and ./credentials/token.json in the working directory where the server is launched. This mode is still supported for older setups but not recommended.
All examples below assume you installed with uvx. Adjust the command if you used pipx (mcp-google-search-console) or cloned from source (/path/to/.venv/bin/mcp-google-search-console).
Edit ~/.claude/.mcp.json:
{
"mcpServers": {
"google-search-console": {
"command": "uvx",
"args": ["mcp-google-search-console"]
}
}
}
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"google-search-console": {
"command": "uvx",
"args": ["mcp-google-search-console"]
}
}
}
Edit ~/.cursor/mcp.json (or the project-local .cursor/mcp.json):
{
"mcpServers": {
"google-search-console": {
"command": "uvx",
"args": ["mcp-google-search-console"]
}
}
}
Add to your Zed settings.json under context_servers:
{
"context_servers": {
"google-search-console": {
"command": {
"path": "uvx",
"args": ["mcp-google-search-console"]
}
}
}
}
Any MCP client that supports stdio servers can use the same pattern:
{
"mcpServers": {
"google-search-console": {
"command": "uvx",
"args": ["mcp-google-search-console"]
}
}
}
If you prefer not to persist anything on disk, pass credentials inline:
{
"mcpServers": {
"google-search-console": {
"command": "uvx",
"args": ["mcp-google-search-console"],
"env": {
"GSC_CLIENT_ID": "xxxxxxxxxxxx.apps.googleusercontent.com",
"GSC_CLIENT_SECRET": "GOCSPX-xxxxxxxxxxxxxxxx",
"GSC_REFRESH_TOKEN": "1//0xxxxxxxxxxxxxxxx"
}
}
}
}
Once the MCP server is wired into your client, you can ask things like:
sc-domain:example.com over the last 30 days"example.com for the period 2026-01-01 → 2026-03-31"The gsc_audit tool writes a self-contained HTML file to ~/gsc-reports/ and returns the path. Open it in any browser.
sc-domain:example.com for domain properties or https://example.com/ for URL-prefix properties.gsc_query: query, page, country, device, date (combine with commas).The audit report layout uses a Jinja2 template in src/google_search_console_mcp/templates/report.html.j2 with colors and fonts driven by branding.json.
To customize without touching the package, create your own branding.json in the XDG config directory:
~/.config/mcp-google-search-console/branding.json
Example:
{
"brand_name": "Acme SEO Studio",
"logo": "logo.png",
"font_family": "Poppins",
"font_url": "https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap",
"colors": {
"primary": "#ff6b35",
"primary_dark": "#cc4a1f",
"secondary": "#004e89",
"accent": "#00b894",
"danger": "#e74c3c",
"warning": "#f39c12",
"text": "#004e89",
"text_muted": "#5a6c7d",
"text_light": "#8395a7",
"bg": "#f8f9fc",
"surface": "#ffffff",
"border": "#e1e8ed"
}
}
The logo field accepts either a local file name (resolved against the XDG config dir, then the package dir) or a full URL. Local files are automatically base64-encoded into the HTML so the report stays self-contained.
You can also pass a custom branding file per report via the branding_path parameter of gsc_audit:
"Generate an audit of example.com using the branding at
/path/to/client-branding.json"
MCP (Model Context Protocol) is an open protocol that lets AI assistants like Claude or Cursor talk to external data sources and tools through a standard interface. An MCP server exposes a set of tools (functions) and resources that the assistant can call during a conversation. This project is an MCP server that exposes Google Search Console as tools your assistant can use.
Yes. Anything that can speak MCP over stdio can use this server. Ready-to-paste configuration snippets for each client are in Client configuration.
No. The server only requests the webmasters.readonly scope from Google, which is read-only by design. It cannot submit sitemaps, request indexing, or modify any property settings.
Create a Google Cloud project, enable the Google Search Console API, then create an OAuth 2.0 Client ID of type Desktop app and download the JSON. Full steps are in the Configuration section.
Not currently. The Search Console API requires that the identity has been granted access to the property, and Google's own docs recommend OAuth user credentials for most use cases. If you need service account support, open an issue.
Yes. Drop a branding.json file in ~/.config/mcp-google-search-console/ to override logo, font, and the full color palette. See Customizing the audit report. You can also pass a per-report branding_path parameter when calling gsc_audit, which is ideal for agencies producing white-label audits for multiple clients.
gsc_audit writes a self-contained HTML file to ~/gsc-reports/ and returns the path. The file is fully inlined (CSS, charts, images base64-encoded) so you can share it without worrying about external assets.
sc-domain: and URL-prefix properties?sc-domain:example.com covers the entire domain, including all subdomains and both http/https. https://example.com/ only covers that specific prefix. Use whichever matches how you verified the property in Search Console.
Yes. Set GSC_CLIENT_ID, GSC_CLIENT_SECRET, GSC_REFRESH_TOKEN as environment variables and skip the browser auth flow. The server is fully stateless in this mode and never writes to disk.
oauth_credentials.json, token.json, or .env files with real secrets.webmasters.readonly scope.mcp-google-search-console auth or set GSC_REFRESH_TOKEN.auth entirely and export GSC_CLIENT_ID, GSC_CLIENT_SECRET, GSC_REFRESH_TOKEN as environment variables.f2fe60e)The package was restructured in commit f2fe60e and no longer ships a top-level server.py. If your MCP client was configured to launch the server with python server.py, it will now fail at startup with:
can't open file '.../server.py': [Errno 2] No such file or directory
Update your client config to use the installed entry-point instead:
"google-search-console": {
"command": "uvx",
"args": ["mcp-google-search-console"]
}
Equivalent forms are listed under Client configuration.
MIT © Andrea Camolese. Not affiliated with Google or Anthropic. "Google Search Console" is a trademark of Google LLC.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"acamolese-google-search-console-mcp": {
"command": "npx",
"args": []
}
}
}