GSC MCP Server
Provides tools to query search analytics, inspect URLs, manage sitemaps, and compare performance across time periods using the Google Search Console API.
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., "@GSC MCP Server What are the top queries for my site 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.
GSC MCP Server
A Model Context Protocol (MCP) server that connects Claude Desktop (and other MCP clients) to the Google Search Console API — query search analytics, inspect URLs, manage sitemaps, and compare performance across time periods.
Based on MCP-GSC by Amin Foroutan, with enhancements for lazy imports, data state control, multi-filter support, and additional tools.
Features
20 Search Console Tools
Search Analytics:
Tool | Description |
| List all GSC properties accessible by the authenticated account |
| Search analytics with dimensions (query, page, device, country, date) |
| Advanced analytics with sorting, filtering, pagination (up to 25K rows) |
| Performance summary with daily trend data |
| Queries driving traffic to a specific page |
| Compare two time periods side-by-side with percentage changes |
URL Inspection:
Tool | Description |
| Full URL inspection — indexing status, rich results, canonical info |
| Inspect up to 10 URLs in one call |
| Categorized indexing issue report across multiple URLs |
Sitemap Management:
Tool | Description |
| List sitemaps with status and URL counts |
| Detailed sitemap listing with submission dates and warnings |
| Full details for a specific sitemap |
| Submit or resubmit a sitemap |
| Remove a sitemap from GSC |
| All-in-one sitemap management (list, details, submit, delete) |
Property Management:
Tool | Description |
| Add a site to Search Console |
| Remove a site from Search Console |
| Property details including verification and ownership info |
| Switch Google accounts via OAuth re-login |
Built-in Reliability
Dual auth — OAuth (interactive) and service account (headless) with automatic fallback
Lazy imports — defers heavy Google client libraries for fast MCP handshake
Data state control — choose between fresh data (
all, matches GSC dashboard) or confirmed data (final)Multi-filter support — AND logic across dimensions via JSON filter arrays
Related MCP server: google-search-console-mcp-python
Quick Start
Prerequisites
Python 3.11+
A Google Cloud project with the Search Console API enabled
Claude Desktop (or any MCP-compatible client)
Authentication Options
Option A: Service Account (Headless — recommended for servers)
Create a Google Cloud service account
Enable the Search Console API in your project
Download the service account JSON key file
In GSC: go to Settings > Users and permissions and add the service account email as a user
Option B: OAuth (Interactive — recommended for local use)
Create OAuth credentials in Google Cloud Console
Download the client secrets JSON as
client_secrets.jsonPlace it in the
gsc-mcp/directoryOn first run, a browser window opens for Google login
Installation
Published package: luminarylane-gsc-mcp on PyPI
# Run without a global install
uvx --from luminarylane-gsc-mcp luminarylane-gsc-mcpOr install the package with pip install luminarylane-gsc-mcp.
Configuration
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"gsc": {
"command": "uvx",
"args": ["--from", "luminarylane-gsc-mcp", "luminarylane-gsc-mcp"],
"env": {
"GSC_CREDENTIALS_PATH": "/path/to/service_account_credentials.json"
}
}
}
}Environment variables:
Variable | Required | Description |
| No* | Path to service account JSON key file |
| No* | Path to OAuth client secrets JSON |
| No | Set to |
| No |
|
*At least one authentication method must be configured.
For local development only, credentials may be stored in files excluded by .gitignore; never commit them. Prefer the explicit environment-variable paths above.
Usage Examples
Once configured, ask Claude to:
"List my Search Console properties"
"What are the top queries for my site this month?"
"Show me the top pages by clicks for the last 90 days"
"Is this URL indexed? Check https://example.com/my-page"
"Compare search performance: last 28 days vs the 28 days before"
"Check indexing issues for these URLs" (paste a list)
"Submit my sitemap at https://example.com/sitemap.xml"
"Show traffic sources by country and device"
Data Freshness
By default, the server uses dataState: "all" which includes fresh/unconfirmed data and matches the GSC dashboard. Set GSC_DATA_STATE=final for confirmed-only data (lags 2-3 days). You can also override per-call via the data_state parameter in get_advanced_search_analytics.
Troubleshooting
Property not found (404)
The site_url must exactly match what GSC shows. Run list_properties first. Domain properties use the format sc-domain:example.com, not a full URL.
Permission denied (403)
The authenticated account needs access to the property. For service accounts, add the email in GSC Settings > Users and permissions.
Authentication failed
Service account: Check
GSC_CREDENTIALS_PATHpoints to a valid JSON key fileOAuth: Delete
token.jsonand re-run to trigger a fresh login, or use thereauthenticatetool
Contributing
Fork the repo
Create a feature branch (
git checkout -b feat/my-feature)Make changes and test locally
Submit a pull request
License
MIT License — see LICENSE for details.
Acknowledgments
Amin Foroutan for the original MCP-GSC tool
Anthropic for the MCP specification
Google Search Console API for the underlying API
Available Tools
20 toolsadd_siteA
Add a site to your Search Console properties.
Args: site_url: The URL of the site to add (must be exact match e.g. https://example.com, or https://www.example.com, or https://subdomain.example.com/path/, for domain properties use format: sc-domain:example.com)
Inputs: site_url (required). Returns: result
batch_url_inspectionA
Inspect multiple URLs in batch (within API limits).
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. urls: List of URLs to inspect, one per line
Inputs: urls (required), site_url (required). Returns: result
check_indexing_issuesB
Check for specific indexing issues across multiple URLs.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. urls: List of URLs to check, one per line
Inputs: urls (required), site_url (required). Returns: result
compare_search_periodsA
Compare search analytics data between two time periods.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. period1_start: Start date for period 1 (YYYY-MM-DD) period1_end: End date for period 1 (YYYY-MM-DD) period2_start: Start date for period 2 (YYYY-MM-DD) period2_end: End date for period 2 (YYYY-MM-DD) dimensions: Dimensions to group by (default: query) limit: Number of top results to compare (default: 10)
Inputs: site_url (required), period1_end (required), period2_end (required), period1_start (required), +3 more. Returns: result
delete_siteA
Remove a site from your Search Console properties.
Args: site_url: The URL of the site to remove (must be exact match e.g. https://example.com, or https://www.example.com, or https://subdomain.example.com/path/, for domain properties use format: sc-domain:example.com)
Inputs: site_url (required). Returns: result
delete_sitemapA
Delete (unsubmit) a sitemap from Google Search Console.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. sitemap_url: The full URL of the sitemap to delete
Inputs: site_url (required), sitemap_url (required). Returns: result
get_advanced_search_analyticsA
Get advanced search analytics data with sorting, filtering, and pagination.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. start_date: Start date in YYYY-MM-DD format (defaults to 28 days ago) end_date: End date in YYYY-MM-DD format (defaults to today) dimensions: Dimensions to group by, comma-separated (e.g., "query,page,device") search_type: Type of search results (WEB, IMAGE, VIDEO, NEWS, DISCOVER) row_limit: Maximum number of rows to return (max 25000) start_row: Starting row for pagination sort_by: Metric to sort by (clicks, impressions, ctr, position) sort_direction: Sort direction (ascending or descending) filter_dimension: Single filter dimension (query, page, country, device). Use 'filters' instead for multiple filters. filter_operator: Single filter operator (contains, equals, notContains, notEquals) filter_expression: Single filter expression value filters: JSON array of filter objects for AND logic across multiple dimensions. Overrides filter_dimension/filter_operator/filter_expression when provided. Each object must have 'dimension', 'operator', and 'expression' keys. Valid dimensions: query, page, country, device. Valid operators: contains, equals, notContains, notEquals. Example: [{"dimension":"country","operator":"equals","expression":"usa"}, {"dimension":"device","operator":"equals","expression":"MOBILE"}] data_state: Data freshness — "all" (default, matches GSC dashboard) or "final" (confirmed data only, 2-3 day lag)
Inputs: site_url (required), filters, sort_by, end_date, +10 more. Returns: result
get_creator_infoA
Provides information about Amin Foroutan, the creator of the MCP-GSC tool.
Inputs: no named parameters. Returns: result
get_performance_overviewA
Get a performance overview for a specific property.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. days: Number of days to look back (default: 28)
Inputs: site_url (required), days. Returns: result
get_search_analyticsA
Get search analytics data for a specific property.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. days: Number of days to look back (default: 28) dimensions: Dimensions to group by (default: query). Options: query, page, device, country, date You can provide multiple dimensions separated by comma (e.g., "query,page") row_limit: Number of rows to return (default: 20, max: 500). Use 5-20 for quick overviews, 50-200 for deeper analysis, up to 500 for comprehensive reports. For bulk exports beyond 500 rows, use get_advanced_search_analytics which supports pagination.
Inputs: site_url (required), days, row_limit, dimensions. Returns: result
get_search_by_page_queryA
Get search analytics data for a specific page, broken down by query.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. page_url: The specific page URL to analyze days: Number of days to look back (default: 28) row_limit: Number of rows to return (default: 20, max: 500). Use 5-20 for quick overviews, 50-200 for deeper analysis, up to 500 for comprehensive reports. For bulk exports beyond 500 rows, use get_advanced_search_analytics which supports pagination.
Inputs: page_url (required), site_url (required), days, row_limit. Returns: result
get_site_detailsA
Get detailed information about a specific Search Console property.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain.
Inputs: site_url (required). Returns: result
get_sitemap_detailsB
Get detailed information about a specific sitemap.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. sitemap_url: The full URL of the sitemap to inspect
Inputs: site_url (required), sitemap_url (required). Returns: result
get_sitemapsA
List all sitemaps for a specific Search Console property.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain.
Inputs: site_url (required). Returns: result
inspect_url_enhancedB
Enhanced URL inspection to check indexing status and rich results in Google.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. page_url: The specific URL to inspect
Inputs: page_url (required), site_url (required). Returns: result
list_propertiesA
Retrieves and returns the user's Search Console properties.
Inputs: no named parameters. Returns: result
list_sitemaps_enhancedA
List all sitemaps for a specific Search Console property with detailed information.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. sitemap_index: Optional sitemap index URL to list child sitemaps
Inputs: site_url (required), sitemap_index. Returns: result
manage_sitemapsA
All-in-one tool to manage sitemaps (list, get details, submit, delete).
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. action: The action to perform (list, details, submit, delete) sitemap_url: The full URL of the sitemap (required for details, submit, delete) sitemap_index: Optional sitemap index URL for listing child sitemaps (only used with 'list' action)
Inputs: action (required), site_url (required), sitemap_url, sitemap_index. Returns: result
reauthenticateA
Perform a logout and new login sequence. Deletes the current OAuth token file and triggers the browser authentication flow. Useful when you need to switch to a different Google account.
Inputs: no named parameters. Returns: result
submit_sitemapA
Submit a new sitemap or resubmit an existing one to Google.
Args: site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or "sc-domain:example.com"). Domain properties cover all subdomains — use the domain property as site_url and filter by page to analyze a specific subdomain. sitemap_url: The full URL of the sitemap to submit
Inputs: site_url (required), sitemap_url (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Several tools have overlapping purposes, such as get_sitemaps, list_sitemaps_enhanced, and manage_sitemaps (with 'list' action), which all list sitemaps. Similarly, get_search_analytics, get_advanced_search_analytics, and get_performance_overview all retrieve performance data with varying levels of detail. The distinctions are often subtle and may confuse an agent selecting the appropriate tool.
Most tool names follow a verb_noun pattern (e.g., list_properties, add_site, get_search_analytics, submit_sitemap). Minor inconsistencies exist, such as 'batch_url_inspection' being a noun phrase rather than a verb-led name, and 'reauthenticate' being a single verb. Overall, the naming is fairly consistent and predictable.
With 20 tools, the server is on the heavier side, and the redundancy among sitemap and analytics tools inflates the count. The scope covers multiple subdomains (properties, analytics, sitemaps, inspection, auth), so a count near 20 is not wildly excessive, but it could be streamlined to around 12-15 tools without losing functionality.
The tool set provides good coverage of the Google Search Console API: property lifecycle (list, add, delete, details), analytics (basic, advanced, comparison, page-specific), sitemap management (list, details, submit, delete, and a combined tool), and URL inspection (single, batch, indexing issues). Minor gaps exist, such as no explicit tool for testing robots.txt, but the core workflows are well represented.
Maintenance
Related MCP Connectors
Hosted, read-only Google Search Console MCP: performance, comparisons, URL inspection, sitemaps.
Read-only Google Search Console MCP server for AI assistants.
One MCP connector for GA4, Search Console, Google Ads, Ahrefs, a site crawler and Web Vitals.
Audit, rank-track and analyze SEO for sites via an authenticated MCP server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects Google Search Console to MCP clients to query search analytics, manage sitemaps, and perform URL inspections. It enables users to identify SEO opportunities and generate performance reports through natural language interactions.69 npm4MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Google Search Console API that enables querying search analytics, managing sites, inspecting URLs, and supporting domain delegation via service accounts.34 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Search Console via MCP, offering search analytics, performance summaries, URL inspection, sitemap management, and property listing for SEO workflows.262 npm1MIT
- AlicenseBqualityBmaintenanceEnables Google Search Console data queries via MCP, including search analytics, performance comparisons, URL inspection, and sitemap management.121MIT