Google Search Console MCP Server
Summary: This MCP server lets you inspect and, when enabled, manage Google Search Console properties, traffic, indexing, and sitemaps via MCP apps.
Show authentication status, available tools, and saved login state, and restart Google login.
List accessible Search Console websites and show per-site permission/verification details.
Query clicks, impressions, CTR, and position totals plus daily trends.
Run custom Search Analytics reports with dimensions, date ranges, filters, sorting, search type, and pagination up to 25,000 rows.
Compare two date ranges and find keywords driving traffic to a specific page.
Check index status, last crawl, canonical, robots, and rich results for one URL or up to 10 URLs.
List sitemap status/errors/warnings and inspect one sitemap in detail.
Read-only by default; when write tools are enabled, add/remove websites and submit/unsubmit sitemaps.
Provides tools for interacting with Google Search Console data, including listing websites, viewing traffic and keyword performance, comparing date ranges, finding page keywords, running custom reports, checking whether URLs are indexed, and viewing sitemap details. Optional write tools allow adding or removing sitemaps and websites.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Search Console MCP Server Which keywords lost clicks this month?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Search Console MCP Server
Talk to your Google Search Console data in plain English from Claude, Cursor, Codex, Gemini CLI or any other MCP app.
"Which keywords lost clicks this month?" "Are my top 10 pages indexed?" "Compare January with February and tell me what changed."
Jump to: Setup · Tools · Settings · Example prompts · Troubleshooting · Docker & remote
Setup
You need Node.js 20 or newer (node --version to check). Setup takes about 3 minutes and you only do it once.
1. Create a Client ID and Secret
Open Google Cloud Console, then create a project (or pick one).
Open Google Auth Platform and set up the consent screen: enter an app name and your email, and choose External as the audience.
Under Audience → Test users, click + Add users and add the Google account that has access to your Search Console sites. While the app is in Testing, only these accounts can sign in.
Go to Clients → Create client, set Application type to Desktop app, and click Create.
Copy the Client ID and Client secret. The secret can't be shown again after you close the dialog.
This project doesn't ship a login of its own, so your data never goes through anyone else's Google project.
2. Add this to your app's MCP config
{
"mcpServers": {
"search-console": {
"command": "npx",
"args": ["-y", "google-gsc-mcp"],
"env": {
"WSP_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"WSP_CLIENT_SECRET": "your-client-secret"
}
}
}
}App | Config file |
Claude Desktop (macOS) |
|
Claude Desktop (Windows) |
|
Claude Code |
|
Cursor |
|
Gemini CLI, Antigravity, others | Your app's MCP config file |
File: ~/.codex/config.toml
[mcp_servers.search-console]
command = "npx"
args = ["-y", "google-gsc-mcp"]
enabled = true
env = { WSP_CLIENT_ID = "your-client-id.apps.googleusercontent.com", WSP_CLIENT_SECRET = "your-client-secret" }3. Restart and sign in
Fully quit your app and reopen it (on macOS press Cmd+Q; closing the window isn't enough). Then ask: "List my Search Console websites."
The first time, a browser window opens so you can sign in to Google. Pick the account you added as a test user. If Google warns that the app isn't verified, click Advanced → Go to (your app name). After that you stay signed in.
If something goes wrong, ask "Run wsp_show_status_gsc". It shows whether you're signed in and the exact error.
Other ways to sign in
In Credentials, choose Create Credentials → Service Account.
Open the Keys tab → Add Key → Create new key → JSON, and download it to a safe place.
In Search Console, open Settings → Users and permissions → Add user, paste the service account's email and give it Full access.
Use this
envblock instead:
"env": {
"WSP_SERVICE_ACCOUNT_FILE": "/full/path/to/service_account.json",
"WSP_SERVICE_ACCOUNT_ONLY": "true"
}With neither a client nor a service account set, the server falls back to Google's default credentials (gcloud auth application-default login, Cloud Run, GKE, Workload Identity Federation).
Click Download JSON when you create the client, save it somewhere safe, and set WSP_OAUTH_FILE to its full path, e.g. "WSP_OAUTH_FILE": "/Users/you/secrets/client_secrets.json". It is ignored if WSP_CLIENT_ID and WSP_CLIENT_SECRET are set.
Add one MCP entry per account, each with its own WSP_TOKEN_DIR, so the saved logins don't overwrite each other. All entries can share the same Client ID and secret. Add every account as a test user.
"search-console-work": {
"command": "npx",
"args": ["-y", "google-gsc-mcp"],
"env": {
"WSP_CLIENT_ID": "...",
"WSP_CLIENT_SECRET": "...",
"WSP_TOKEN_DIR": "/Users/you/.gsc-tokens/work"
}
}git clone https://github.com/bilalnaseer/google-search-console-mcp.git
cd google-search-console-mcp
npm install
npm run buildThen use "command": "node" and "args": ["/full/path/to/google-search-console-mcp/dist/index.js"] in your config.
Related MCP server: Google Search Console MCP Server
Tools
Most tools need a site_url. Get it from wsp_list_websites_gsc and copy it exactly. It looks like https://example.com/ or sc-domain:example.com.
Tool | What it does |
Getting started | |
| Shows whether you're signed in and lists every tool |
| Lists your Search Console websites and their exact |
| Your permission level and verification details for one website |
| Opens the Google login again, e.g. to switch accounts or fix login errors |
Traffic & keywords | |
| Clicks, impressions, CTR and position: totals plus a daily trend |
| Compares two date ranges and shows what went up or down most |
| The search keywords that bring visitors to one page |
| Custom report with filters, sorting, device, country, search type, up to 25,000 rows |
Indexing | |
| Is this page indexed? Last crawl, canonical, robots and rich results |
| The same check for up to 10 pages at once |
Sitemaps | |
| All your sitemaps with status, errors and warnings |
| Full details for one sitemap |
Write tools (off by default) | |
| Submits or resubmits a sitemap |
| Removes a sitemap (pages already indexed stay indexed) |
| Adds a website to Search Console |
| Removes a website from Search Console |
Turning on write tools
By default the server only reads your data. To let it add or remove websites and sitemaps:
Add
"WSP_ALLOW_WRITES": "true"to yourenvblock.Restart your app.
Ask it to run
wsp_login_again_gsconce so Google grants the extra permission.
Settings
Put these in the env block of your config.
Setting | Default | What it does |
| — | OAuth Client ID |
| — | OAuth Client secret (use together with |
| — | Alternative to the two above: full path to your OAuth |
| — | Full path to your service account key |
|
|
|
|
|
|
|
|
|
| OS config folder | Where your saved login ( |
The server tries logins in this order: saved Google login → service account → Google default credentials.
Example prompts
Goal | Ask |
See your sites | "List my Search Console websites." |
Fix low CTR | "Show my top 20 keywords for mysite.com in the last 30 days. Flag any with CTR under 2% and suggest better titles." |
Spot drops | "Show traffic for mysite.com over the last 28 days and explain any sudden drops or spikes." |
Month vs month | "Compare January with February. Which keywords improved most?" |
Check indexing | "Are these pages indexed? mysite.com/product, mysite.com/services, mysite.com/about" |
Audit one page | "Check mysite.com/landing-page and give me a list of fixes." |
Quick wins | "Find keywords with lots of impressions but position 11–20, mobile and US only." |
Troubleshooting
Start here: ask your app to "run wsp_show_status_gsc". It shows the exact login status and error.
Your app can't find npx. This is common with nvm or fnm. Find the full path:
which npx # macOS / Linux
where npx # WindowsThen use that path as "command", e.g. "/Users/you/.nvm/versions/node/v22.0.0/bin/npx".
File paths must be full paths.
~/works, but a bare file name doesn't.Check
WSP_CLIENT_IDandWSP_CLIENT_SECRETfor typos or extra spaces.If you set
WSP_OAUTH_FILEorWSP_SERVICE_ACCOUNT_FILE, the file must exist. The server stops and names the setting if it can't find it.Seeing
invalid_grantor want another Google account? Runwsp_login_again_gsc.Changed
WSP_ALLOW_WRITES? Runwsp_login_again_gsc.
Your OAuth app is in Testing mode and the Google account you picked isn't a test user. Open Google Auth Platform → Audience → Test users, click + Add users, add that account, then run wsp_login_again_gsc again. Having access to the Cloud project is not enough; the account must be on this list.
You signed in, but that Google account has no Search Console access. Run wsp_login_again_gsc and pick the account that owns or is a user on your sites, and make sure it is also a test user (see above).
Copy
site_urlexactly fromwsp_list_websites_gsc.Domain properties look like
sc-domain:example.com, not a full URL.A service account must be added as a user on that website in Search Console.
The server runs on your computer, so it only works in the Claude Desktop app, not in the browser.
Fully quit the app (Cmd+Q) and reopen it. Also check that your JSON is valid and every path is a full path.
Docker & remote
Skip this unless you want to run the server on another machine or in a container.
Setting | Default | What it does |
|
| Set to |
|
| Address to listen on |
|
| Port to listen on |
WSP_TRANSPORT=sse WSP_HOST=0.0.0.0 WSP_PORT=3001 node dist/index.jsApps connect to http://HOST:3001/sse.
The SSE endpoint has no password. Don't expose it to the internet without a reverse proxy or firewall in front.
Docker:
docker build -t google-search-console-mcp .
docker run \
-e WSP_TRANSPORT=sse \
-e WSP_HOST=0.0.0.0 \
-e WSP_PORT=3001 \
-e WSP_SERVICE_ACCOUNT_FILE=/app/credentials.json \
-e WSP_SERVICE_ACCOUNT_ONLY=true \
-v /path/to/credentials.json:/app/credentials.json \
-p 3001:3001 \
google-search-console-mcpA container can't open a browser, so use a service account, or mount a token.json you already signed in with and point WSP_TOKEN_DIR at its folder.
Development
npm install
npm test # no Google login needed
npm run typecheck
npm run dev # run from sourceBugs and ideas are welcome as GitHub issues or pull requests.
License
MIT, see LICENSE. Maintained by Bilal Naseer.
Available Tools
16 toolswsp_add_sitemap_gscAdd SitemapAIdempotent
Submit or resubmit a sitemap. Requires WSP_ALLOW_WRITES=true.
Inputs: site_url (required), sitemap_url (required).
wsp_add_website_gscAdd WebsiteAIdempotent
Add a property to Search Console. Requires WSP_ALLOW_WRITES=true.
Inputs: site_url (required).
wsp_check_url_gscCheck URLARead-onlyIdempotent
Check a URL's index status, last crawl, canonical, robots and rich results as Google sees it.
Inputs: page_url (required), site_url (required).
wsp_check_urls_gscCheck URLsARead-onlyIdempotent
Inspect up to 10 URLs in one call (run concurrently). Same data as wsp_check_url_gsc, one row per URL.
Inputs: urls (required), site_url (required).
wsp_compare_dates_gscCompare DatesARead-onlyIdempotent
Compare search performance across two date ranges.
Direction: Period 1 is the period you are analyzing and Period 2 is the baseline you compare it against. All deltas are Period 1 relative to Period 2, and the percentage baseline is Period 2. A positive value means Period 1 outperformed Period 2 — more clicks/impressions, higher CTR, or a better (lower) average position. For a current-vs-previous comparison, pass the current period as Period 1 and the previous period as Period 2. Percentages are null when the Period 2 baseline is zero.
Inputs: site_url (required), period1_end (required), period2_end (required), period1_start (required), +3 more.
wsp_find_page_keywords_gscFind Page KeywordsBRead-onlyIdempotent
Queries that drove clicks and impressions to one specific page.
Inputs: page_url (required), site_url (required), days, row_limit.
wsp_list_websites_gscList WebsitesARead-onlyIdempotent
List every Search Console property (domain and URL-prefix) the connected account can access. Returns the exact site_url string every other tool requires.
Inputs: no named parameters.
wsp_login_again_gscLog In AgainADestructiveIdempotent
Delete the saved OAuth token and open a browser login. Use it to switch Google accounts, fix auth errors, or apply a changed WSP_ALLOW_WRITES setting.
Inputs: no named parameters.
wsp_remove_sitemap_gscRemove SitemapADestructiveIdempotent
Unsubmit a sitemap. Already-indexed URLs stay indexed. Requires WSP_ALLOW_WRITES=true.
Inputs: site_url (required), sitemap_url (required).
wsp_remove_website_gscRemove WebsiteADestructiveIdempotent
Remove a property from Search Console. Requires WSP_ALLOW_WRITES=true.
Inputs: site_url (required).
wsp_run_report_gscRun ReportBRead-onlyIdempotent
Flexible search analytics: choose dimensions, date range, search type, filters, sorting and pagination (up to 25,000 rows).
Inputs: site_url (required), filters, sort_by, end_date, +10 more.
wsp_show_sitemap_gscShow SitemapBRead-onlyIdempotent
Full status and per-content-type breakdown for one sitemap.
Inputs: site_url (required), sitemap_url (required).
wsp_show_sitemaps_gscShow SitemapsARead-onlyIdempotent
List submitted sitemaps with status, URL counts, errors and warnings. Pass sitemap_index to list an index's children.
Inputs: site_url (required), sitemap_index.
wsp_show_status_gscShow StatusARead-onlyIdempotent
List every tool this server offers, grouped by category, with the current authentication status. Call it first to learn what is available or to diagnose login problems.
Inputs: no named parameters.
wsp_show_traffic_gscShow TrafficARead-onlyIdempotent
Totals (clicks, impressions, CTR, position) and a daily trend for the last N days.
Inputs: site_url (required), days.
wsp_show_website_gscShow WebsiteARead-onlyIdempotent
Permission level, verification and ownership details for one property.
Inputs: 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 16 tools
Most tools have clearly distinct purposes, and the single-vs-batch pairs (check_url/check_urls, show_sitemap/show_sitemaps) are explicitly differentiated. There is some overlap among analytics tools—show_traffic could be approximated by run_report—but descriptions make the intended use clear.
All tools follow a consistent wsp_verb_noun_gsc pattern in snake_case, with predictable verbs like show, list, add, remove, check, and run. Minor variations like login_again are still readable and fit the convention.
16 tools is slightly above the ideal 3–15 range but reasonable for a server covering properties, sitemaps, URL inspection, analytics, and auth. Each tool maps to a real Search Console operation rather than being redundant filler.
The surface covers the core GSC lifecycle: listing/adding/removing properties, managing sitemaps, inspecting URLs individually and in batch, and running flexible search analytics with comparisons and page-level keyword breakdowns. No obvious operational gaps remain for the stated domain.
Maintenance
Related MCP Connectors
Google Search Console for AI assistants: traffic, rankings, indexing and page checks. Read-only.
Query your SEO data in plain language: rankings, audits, backlinks, competitors and AI visibility.
Ask Google Search Console in plain language. Hosted, free, no Google Cloud project.
Read-only Google Search Console and Google Analytics for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interacting with Google Search Console via natural language, supporting search analytics, URL inspection, sitemap management, and site listing.25-
- AlicenseNot gradedqualityDmaintenanceEnables querying Google Search Console data, including search analytics with advanced filtering, quick wins detection, and rich dimensions, through natural language.9,552 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables querying Google Search Console data such as search analytics and site list via natural language.-
- AlicenseBqualityCmaintenanceEnables keyword mining, Search Analytics queries, sitemap management across multiple properties, and URL index inspection through natural language.12MIT