mcp-server-gsc
Provides tools for querying Google Search Console search analytics (clicks, impressions, CTR, position), inspecting URL indexing status, and managing sitemaps.
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., "@mcp-server-gsc show me search analytics for example.com over the last 30 days"
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 — Search Analytics, URL Indexing & Sitemap Management for AI Assistants (SEO / LLMO)
mcp-server-gsc is an MCP (Model Context Protocol) server for Google Search Console that connects your search performance data to Claude or any MCP client. It lets AI assistants query search analytics (clicks, impressions, CTR, position), inspect URL indexing and crawl status, and manage sitemaps — so you can analyze and optimize your website's SEO and LLMO directly from a conversation.
Tools
Tool | What It Does | What You Need to Provide |
| Lists all tools and shows auth status — call this first if unsure | Nothing |
| Shows all your GSC properties | Nothing |
| Details about a specific site | Site URL |
| Top queries and pages with clicks, impressions, CTR, position | Site URL, time period |
| Summary of site performance (totals, daily trend, top 5) | Site URL, time period |
| Compare performance between two time periods | Site URL, two date ranges |
| Search terms driving traffic to a specific page | Site URL, page URL |
| Analytics with filters by country, device, query, page | Site URL |
| Detailed crawl/index status for a URL | Site URL, page URL |
| Inspect up to 10 URLs at once | Site URL, list of URLs |
| Check multiple URLs (up to 20) for indexing problems | Site URL, list of URLs |
| Lists all sitemaps for a site | Site URL |
| Detailed sitemap info including errors and warnings | Site URL |
| Submit, delete, or get status of a sitemap | Site URL, action |
| Re-run the OAuth browser login (switch accounts) | Nothing |
Related MCP server: search-console-mcp
Setup
1. Build
npm install
npm run build2. Google Cloud credentials
You need a Google Cloud project with the Search Console API enabled (console.cloud.google.com → APIs & Services → Library → "Google Search Console API" → Enable).
Then pick one of the two auth methods:
Option A — OAuth (recommended: sign in with your own Google account)
APIs & Services → Credentials → Create Credentials → OAuth client ID → Application type Desktop app.
If prompted, configure the OAuth consent screen first (External is fine; add your own Google account as a test user).
Download the client JSON, or copy the client ID and secret.
Configure via environment variables — either:
GSC_OAUTH_CLIENT_ID=xxxx.apps.googleusercontent.com
GSC_OAUTH_CLIENT_SECRET=GOCSPX-...or point to the downloaded JSON:
GSC_OAUTH_CREDENTIALS=/path/to/client_secret_xxxx.jsonOn the first tool call (or via the reauthenticate tool) a browser window opens for Google sign-in. Tokens are stored in ~/.config/mcp-server-gsc/tokens.json and refreshed automatically.
Option B — Service account (headless, no browser)
APIs & Services → Credentials → Create Credentials → Service account, then create a JSON key.
In Search Console → Settings → Users and permissions, add the service account email as a user on each property.
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.jsonIf GOOGLE_APPLICATION_CREDENTIALS is set, it takes precedence and no browser login is used.
3. Register with your MCP client
Claude Code:
claude mcp add gsc \
-e GSC_OAUTH_CLIENT_ID=xxxx.apps.googleusercontent.com \
-e GSC_OAUTH_CLIENT_SECRET=GOCSPX-... \
-- node /path/to/mcp-server-gsc/dist/index.jsClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"gsc": {
"command": "node",
"args": ["/path/to/mcp-server-gsc/dist/index.js"],
"env": {
"GSC_OAUTH_CLIENT_ID": "xxxx.apps.googleusercontent.com",
"GSC_OAUTH_CLIENT_SECRET": "GOCSPX-..."
}
}
}
}Recommended companion tools for SEO / LLMO
This server is best used for SEO / LLMO in combination with:
KeywordGraph MCP server — lets you compare your Search Console data against real-time search intent data, perform topical cluster analysis, and build knowledge graphs of your queries and content. Connect directly via
https://mcp.keywordgraph.com, e.g.:claude mcp add --transport http keywordgraph https://mcp.keywordgraph.comSEO skill — adds advanced SEO / LLMO analysis workflows on top of both servers.
Together they enable the full loop: pull your actual performance data from this server, contrast it with what people are searching for right now, find the topical gaps, and optimize your content accordingly — for best results use all three together.
Usage notes
Site URL format matters: domain properties are
sc-domain:example.com; URL-prefix properties arehttps://example.com/(exactly as shown in Search Console). Uselist_propertiesto see yours.Data lag: Search Console analytics data lags by roughly 2 days. When you use the
daysshortcut instead of explicit dates, the window automatically ends 2 days ago.Time periods: analytics tools accept either explicit
startDate/endDate(YYYY-MM-DD) or a trailingdayscount (default 28).Switching accounts: call the
reauthenticatetool — it discards stored tokens and reopens the browser login.Token storage location can be overridden with
GSC_CONFIG_DIR.
Development
npm run watch # recompile on changeSource layout:
src/index.ts— MCP server and tool definitionssrc/auth.ts— OAuth loopback flow, token persistence, service-account supportsrc/gsc.ts— Search Console API helpers (queries, totals, URL-inspection diagnosis)
Available Tools
15 toolsbatch_url_inspectionB
Inspect up to 10 URLs at once, returning crawl/index status for each.
Inputs: urls (required), siteUrl (required).
check_indexing_issuesA
Check multiple URLs for indexing problems (not indexed, blocked by robots.txt, noindex, fetch errors, canonical mismatches) and return a summary plus per-URL diagnosis.
Inputs: urls (required), siteUrl (required).
compare_search_periodsB
Compare search performance between two time periods: overall totals with absolute and percentage changes, plus an optional per-dimension breakdown of the biggest movers.
Inputs: siteUrl (required), period1EndDate (required), period2EndDate (required), period1StartDate (required), +3 more.
get_advanced_search_analyticsC
Search analytics with full control: filter by country, device, query text, or page URL; choose search type (web, image, video, news, discover), aggregation, data state, and pagination.
Inputs: siteUrl (required), days, device, country, +12 more.
get_capabilitiesA
List every tool this Google Search Console server offers and report authentication status. Call this first if unsure what is available.
Inputs: no named parameters.
get_performance_overviewB
Summary of site search performance for a period: overall totals, daily trend, and top 5 queries and pages.
Inputs: siteUrl (required), days, endDate, startDate.
get_search_analyticsB
Get top search queries and pages with clicks, impressions, CTR and average position for a time period. Without explicit dimensions it returns both top queries and top pages.
Inputs: siteUrl (required), days, endDate, rowLimit, +2 more.
get_search_by_page_queryB
Get the search queries driving traffic to one specific page, with clicks, impressions, CTR and position.
Inputs: pageUrl (required), siteUrl (required), days, endDate, +2 more.
get_site_detailsA
Get details about a specific Search Console property (verification status and permission level).
Inputs: siteUrl (required).
get_sitemapsA
List all sitemaps submitted for a property (path, last submitted/downloaded, pending status, error and warning counts).
Inputs: siteUrl (required).
inspect_url_enhancedA
Detailed crawl and index status for one URL: verdict, coverage state, robots.txt state, canonicals, last crawl time, rich results and mobile usability.
Inputs: pageUrl (required), siteUrl (required), languageCode.
list_propertiesA
List all Google Search Console properties the authenticated account can access, with permission levels.
Inputs: no named parameters.
list_sitemaps_enhancedA
Detailed sitemap information including errors, warnings, type, and per-content-type submitted/indexed counts. Optionally list the children of a sitemap index.
Inputs: siteUrl (required), sitemapIndex.
manage_sitemapsA
Submit a sitemap, delete (unsubmit) a sitemap, or fetch the status of one specific sitemap.
Inputs: action (required), siteUrl (required), feedpath (required).
reauthenticateA
Discard stored Google credentials and re-run the OAuth browser login. Use this to switch Google accounts or fix authentication errors. Opens a browser window and waits up to 5 minutes.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools are distinct (e.g., get_search_analytics vs. get_search_by_page_query vs. get_advanced_search_analytics), but some overlap exists: get_performance_overview and get_search_analytics both return top queries/pages, and get_sitemaps vs. list_sitemaps_enhanced vs. manage_sitemaps have similar names and overlapping data. Descriptions help clarify but not perfectly.
The naming generally follows a verb_noun pattern (get_capabilities, list_properties, check_indexing_issues, compare_search_periods). However, there are minor deviations like get_search_by_page_query (which is not as clean as get_search_analytics), list_sitemaps_enhanced vs. get_sitemaps (list vs. get inconsistency), and manage_sitemaps (generic verb). Overall, it's mostly consistent.
15 tools for a Google Search Console server is well-scoped. It covers authentication, properties, search analytics, indexing, URL inspection, and sitemaps. Each tool serves a distinct functional area, and 15 is within the ideal range for a comprehensive domain.
The tool surface covers core GSC workflows: property management, search analytics, URL inspection, and sitemap management. However, there is no tool for managing user permissions or creating properties (though get_site_details implies existence). Also, no tool for accessing Search Console's structured data validation or security issues, but those are niche. The missing pieces are minor and agents can work around them.
Related MCP Connectors
Google Search Console for AI assistants: traffic, rankings, indexing and page checks. Read-only.
Google Search Console in your AI: overview, opportunities, index gaps, page checks, long history.
Read-only Google Search Console and Google Analytics for AI agents.
Google Search Console, Bing, Yandex and IndexNow for AI assistants, with live SEO analyses.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects AI assistants to Google Search Console data for SEO analysis, including search analytics, URL inspection, sitemaps, indexing, and opportunity detection.17MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access Google Search Console search performance and index health data, including clicks, impressions, rankings, URL inspection, and sitemap management.16 npmMIT
- AlicenseAqualityDmaintenanceEnables AI assistants to analyze Google Search Console SEO data through natural language, including search analytics, URL inspection, sitemap management, and property management.21MIT
- 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.1935 npm1MIT