Google Search Console (GSC) MCP
A Google Search Console MCP server that gives an AI agent read access to search performance, striking-distance keywords, sitemaps, and URL index status — plus two write actions for managing sitemaps.
List properties (
gsc_list_sites) — every verified property with your permission level; the required entry point since all other tools need a property string in exactly this form (sc-domain:example.comorhttps://example.com/).Query search performance (
gsc_search_analytics) — clicks, impressions, CTR, and average position over a date range, grouped by query, page, country, device, or date, with search-type filters (web/news/image/video/discover) and dimension filters (contains, regex, etc.).Find striking-distance keywords (
gsc_striking_distance) — queries ranking just off page one (default positions 8–25, min impressions 10; band and threshold configurable), sorted by impressions to surface near-miss optimization targets.List sitemaps (
gsc_list_sitemaps) — submitted sitemaps with submit/download times, pending state, and warning/error counts.Submit a sitemap (
gsc_submit_sitemap) — register or refresh a sitemap and ping Google to crawl it (non-destructive write; needs the fullwebmastersscope).Delete a sitemap (
gsc_delete_sitemap) — deregister a sitemap from Search Console (destructive write; does not delete the file).Inspect a URL (
gsc_inspect_url) — whether Google has it indexed, coverage state, last crawl time, Google's chosen canonical, and a mobile/rich-results summary for debugging "why isn't this page indexed."Safe to introspect — five read-only tools and two annotated writes; the server boots and answers
tools/listwithout credentials, and read tools work with a read-only scope.
Not supported: requesting indexing (no public API), adding/removing properties, and anything real-time (Search Analytics lags ~2–3 days).
Provides tools for interacting with Google Search Console, enabling AI agents to access search performance data (clicks, impressions, CTR, position), identify striking-distance keywords, manage sitemaps, and inspect URL indexing status.
gsc-mcp
Maintenance mode. This project is stable and receives security fixes. New features aren't planned, but issues and pull requests are still welcome.
Google Search Console for AI agents: search performance, striking-distance keywords, sitemaps, and URL inspection. SEO automation you can hand to an assistant.
An MCP server for Google Search Console. It gives an AI assistant the data and the levers behind organic search: how queries and pages perform, which keywords are one nudge away from page one, the state of your sitemaps, and whether a specific URL is indexed — plus the ability to submit or remove sitemaps.
Why this exists. Search Console is where SEO actually happens, but its UI is click-heavy and its data is hard to act on at a glance. The single most useful view — queries ranking in striking distance of page one — is not even a built-in report; you have to filter and eyeball it. This server puts that view, and the rest of the funnel, in front of an agent so the boring parts of SEO (find the near-miss keywords, check index status, keep sitemaps healthy) can be automated.
It was built to run SEO for two sites — a podcast and a personal site — but nothing here is specific to them. Point it at any property you have verified.
Tools
Tool | Access | What it returns | API |
| read | Verified properties + permission level |
|
| read | Clicks/impressions/CTR/position by query, page, country, device, or date |
|
| read | Queries at avg position 8–25 with enough impressions — the optimization list | computed from search analytics |
| read | Submitted sitemaps with status, last download, warning/error counts |
|
| write | Submits/pings a sitemap to Google |
|
| write, destructive | Deregisters a sitemap from Search Console |
|
| read | Index status, last crawl, canonical, mobile/rich-results verdicts |
|
Every tool carries MCP read/write annotations, so a client can tell the two write tools apart from the five read-only ones before calling them. Read tools are readOnlyHint: true; gsc_submit_sitemap is a non-destructive write; gsc_delete_sitemap is destructiveHint: true.
List tools default row_limit / limit low (25) to keep responses small — agents pay tokens per response.
Related MCP server: google-search-console-mcp
Authentication
This server uses an OAuth installed-app credential (a saved refresh token), not a service account or an API key. It reads the credential from:
~/.config/gws/searchconsole_credentials.jsonThe file is google-auth's Credentials.to_json() shape: it contains client_id, client_secret, refresh_token, and scopes. The server refreshes short-lived access tokens against Google's token endpoint directly with fetch — no heavy googleapis dependency.
To create the file yourself if you do not already have it:
In Google Cloud Console, create an OAuth client of type Desktop app and download its
client_secret.json.Enable the Search Console API on that project.
Run an installed-app OAuth flow requesting the scope you need (see below) and save the resulting credentials to
~/.config/gws/searchconsole_credentials.json. Any standardgoogle-auth-oauthlibinstalled-app snippet works — about ten lines, and it opens a browser for a single consent click.
The path is shared on purpose: if you already hold a Search Console credential in that location for other tooling, this server reuses it rather than asking you to mint a second one.
Scopes: read-only vs. full
Read tools, including
gsc_inspect_url, work withhttps://www.googleapis.com/auth/webmasters.readonly.Write tools (
gsc_submit_sitemap,gsc_delete_sitemap) need the fullhttps://www.googleapis.com/auth/webmastersscope.
If your saved credential only has the read-only scope, the read tools work and the write tools return a clear "re-mint with the full scope" error rather than a cryptic 403. Re-running the mint with the full scope upgrades the same file in place; read tools keep working throughout.
Set GSC_CREDENTIALS_PATH to point at a different credential file if you do not use the default location.
Starts without a credential
The server boots and answers tools/list even when no credential is present, so MCP inspectors can introspect it. Tool calls then return a setup pointer (to stderr at startup, and as the tool result). stdout is reserved for the MCP transport and stays clean.
Setup
1. Verify your property in Search Console
Add your site at search.google.com/search-console. A Domain property (verified with a DNS TXT record) covers http/https and all subdomains and is the recommended choice. Note the exact property string — gsc_list_sites will show it as sc-domain:example.com (Domain) or https://example.com/ (URL-prefix).
2. Mint the credential
Create ~/.config/gws/searchconsole_credentials.json as described under Authentication, requesting the full webmasters scope if you want the two sitemap write tools.
3. Configure your MCP client
Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"gsc": {
"command": "npx",
"args": ["-y", "@conorbronsdon/gsc-mcp"]
}
}
}Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"gsc": {
"command": "npx",
"args": ["-y", "@conorbronsdon/gsc-mcp"]
}
}
}No env block is needed when the credential is at the default path. Set GSC_CREDENTIALS_PATH if it lives elsewhere.
4. Verify
Ask your assistant: "List my Search Console properties," then "Show me striking-distance keywords for it over the last 28 days."
Limitations
Read these so you know what the numbers mean and what this can and cannot do.
No request-indexing tool — by design. Search Console's "Request indexing" button has no public API. Google's Indexing API only supports
JobPostingandBroadcastEventpages, not normal content, and using it for normal pages violates its terms. So there is deliberately no "ask Google to index this page" tool here; for normal pages, requesting indexing is a manual click in the Search Console UI.gsc_submit_sitemapis the supported, API-backed way to nudge crawling.Data lags ~2–3 days. Search Analytics is not real-time. End your date ranges a few days before today or the last days come back empty.
searchAnalyticsis capped per call.row_limitaccepts 1-1000 here (the API allows 25,000 with pagination); for very large pulls, page withstart_date/dimension filters rather than asking for everything at once.Striking distance is computed client-side. It pulls up to 1000 query rows and filters to the position band. On a site with thousands of ranking queries, the band view reflects the top 1000 by clicks, not the entire long tail.
URL inspection is rate-limited and slow. Google enforces a low daily quota on the URL Inspection API and each call can take a second or two. Inspect specific URLs you care about; do not loop it over a whole sitemap.
No property add/remove tools. Verifying a property is a stateful, error-prone flow (DNS TXT, meta tag, file upload) that does not fit a single tool call. Add and verify properties in the Search Console UI; this server operates on properties you have already verified.
General API quotas apply. The server surfaces a clear error on HTTP 429. Keep
row_limitand inspection volume modest.
Development
git clone https://github.com/conorbronsdon/gsc-mcp.git
cd gsc-mcp
npm install
npm run build
npm testRun locally:
npm startTests mock fetch and make no network calls.
Use as a library
The package also exports its tools for embedding, so another MCP server can mount the Search Console tools next to its own instead of running a second process. Importing the package starts nothing and reads no credential.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { DEFAULT_CREDENTIAL_PATH, GSCClient, GoogleAuth, registerGscTools } from "@conorbronsdon/gsc-mcp";
const server = new McpServer({ name: "my-server", version: "1.0.0" });
const loaded = GoogleAuth.load(DEFAULT_CREDENTIAL_PATH); // one read: { auth } or { problem }
registerGscTools(server, "auth" in loaded ? new GSCClient(loaded.auth) : null, {
credentialPath: DEFAULT_CREDENTIAL_PATH,
credentialProblem: "problem" in loaded ? loaded.problem : undefined,
});The mounted tools have the same names, schemas, annotations and results as the standalone server. With a null client they still appear in tools/list and return a setup error when called; pass { credentialPath } as the third argument to name a non-default path in that error, and credentialProblem (from the same GoogleAuth.load() result, as above) to say why a file that exists could not be used (not JSON, or missing the refresh token). GoogleAuth.tryLoad() still works when you only need the client.
Contributing
Issues and pull requests are welcome. If a Search Console endpoint is worth wrapping as a tool, open an issue describing what it should return and the endpoint it maps to. Keep the contract honest: read tools stay read-only, write tools carry the right annotations, and responses stay compact.
The rest of the suite
Search Console is one credential family in a wider Google data stack. The siblings, each with its own auth:
Data | Server |
Google Workspace (Gmail, Calendar, Drive, Sheets, Docs, Tasks) | gws-mcp-server — same curated approach: narrow surface, side effects declared on every tool |
YouTube Analytics | yt-analytics-mcp — owner-side watch time, retention, traffic sources, and playlist metrics; read-only |
Google Analytics 4 | googleanalytics/google-analytics-mcp — Google's own, read-only |
BigQuery | googleapis/mcp-toolbox — Google's own |
Nothing here shares a token: this server uses a webmasters OAuth credential, Workspace uses gws auth login, YouTube Analytics uses a yt-analytics.readonly OAuth credential, GA4 uses Application Default Credentials scoped analytics.readonly.
About
Built and maintained by Conor Bronsdon. I host the Chain of Thought podcast, which covers AI infrastructure, developer tools, and how practitioners actually use this stuff. I built this to pull SEO work into the agent workflows that run the show and my site.
Companion tools:
op3-mcp: podcast analytics through OP3 — downloads, geography, apps, per-episode breakdowns.
podcast-benchmark: benchmark your show against peers on public signals.
Transistor MCP: Transistor.fm's official MCP server. Episodes, publishing, and analytics.
substack-mcp: read posts and manage drafts on Substack, safe for agent workflows.
ai-tools-for-creators: a curated list of AI skills and MCP servers for people who ship ideas for a living.
More at chainofthought.show and on X.
Disclaimer
This is an independent personal project, not affiliated with, sponsored by, or endorsed by Google LLC. All views expressed are my own.
License
MIT
Available Tools
7 toolsgsc_delete_sitemapDelete a sitemapADestructiveIdempotent
Remove a sitemap from a property in Search Console. This is a DESTRUCTIVE write action: it deregisters the sitemap (it does not delete the file from your server, but Google stops tracking it). Requires the full webmasters OAuth scope.
Inputs: feedpath (required), site_url (required).
gsc_inspect_urlInspect a URL's index statusARead-onlyIdempotent
Inspect a single URL with the URL Inspection API: whether Google has it indexed, its coverage state, last crawl time, Google's chosen canonical, and a one-line mobile/rich-results summary. Returns a compact projection, not the full raw blob. Use this to debug 'why isn't this page indexed'.
Inputs: site_url (required), inspection_url (required), language_code.
gsc_list_sitemapsList sitemapsARead-onlyIdempotent
List the sitemaps submitted for a property, with each one's submit/download times, pending state, and warning/error counts. Use this to check whether a sitemap was processed and is error-free.
Inputs: site_url (required).
gsc_list_sitesList Search Console propertiesARead-onlyIdempotent
List the Search Console properties (sites) the signed-in Google account can access, with each one's permission level. This is the entry point: every other tool needs a property string in the exact form returned here.
Inputs: no named parameters.
gsc_search_analyticsQuery search performanceARead-onlyIdempotent
Query Search Console search analytics for a property over a date range: clicks, impressions, CTR, and average position, grouped by the dimensions you pass (query, page, country, device, date). Returns compact rows. Use this for 'what are my top queries / pages' and trend questions. GSC data lags ~2-3 days, so end your range a few days before today.
Inputs: end_date (required), site_url (required), start_date (required), type, +3 more.
gsc_striking_distanceStriking-distance keywordsBRead-onlyIdempotent
The SEO goldmine view: queries ranking just off page one (average position 8-25) with enough impressions to be worth optimizing. These are the keywords where a small content tweak can win real clicks. Computed client-side from search analytics; returns queries sorted by impressions.
Inputs: end_date (required), site_url (required), start_date (required), limit, +3 more.
gsc_submit_sitemapSubmit a sitemapAIdempotent
Submit (or re-submit) a sitemap to Google Search Console for a property. This is a WRITE action: it registers the sitemap and pings Google to crawl it. Requires the full webmasters OAuth scope — if the saved credential is read-only, re-run the OAuth flow from the README requesting the full scope. Idempotent: re-submitting the same sitemap URL just refreshes it.
Inputs: feedpath (required), site_url (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool maps to a distinct resource and action: sites, analytics, sitemaps (list/submit/delete), and URL inspection. The only pair with any overlap is gsc_striking_distance, which is a pre-computed filtered view of gsc_search_analytics, but the description makes the distinction explicit so an agent is unlikely to misselect.
All tools share a predictable gsc_ snake_case prefix with verb_noun structure (list_sites, search_analytics, submit_sitemap, delete_sitemap, inspect_url). The lone deviation is gsc_striking_distance, which is a noun phrase with no verb, but it still reads clearly within the family.
Seven tools is well-scoped for the Search Console domain, with every tool earning its place: one entry point, one analytics query, one derived analytics view, full sitemap lifecycle, and URL inspection. Nothing feels padded or missing at the count level.
Core workflows are covered: property discovery, performance queries, sitemap list/submit/delete, and URL index debugging, which is solid lifecycle coverage. Minor gaps remain (no property add/remove management, no get-sitemap detail beyond the list, no bulk/batch URL inspection), but agents can work around these.
Maintenance
Related MCP Connectors
Google Search Console for AI assistants: traffic, rankings, indexing and page checks. Read-only.
Search Console SEO analytics: rankings, clicks, CTR, striking-distance insights, charts, sitemaps.
Read Search Console queries, clicks and positions, and inspect URLs for indexing.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides AI agents with read-only access to Google Search Console data, including search analytics, index coverage, and sitemap status. It enables users to query clicks, impressions, and ranking performance or check URL indexing status through natural language.4115 npm9MIT
- AlicenseAqualityDmaintenanceQuery Google Search Console search analytics, inspect URL indexing status, manage sitemaps, and analyze keyword performance. 13 tools covering search queries, page performance, sitemap management, and index coverage.137MIT
- AlicenseAqualityBmaintenanceEnables AI agents to query and analyze Google Search Console data, including search analytics, URL inspection, sitemaps, and property verification, and to perform actions like submitting sitemaps and adding properties through natural language.1916 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to perform evidence-backed Google Search Console investigations, including traffic change diagnosis, opportunity discovery, cannibalization detection, and indexing audits, all through read-only access.MIT