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_properties |
List all GSC properties accessible by the authenticated account |
get_search_analytics |
Search analytics with dimensions (query, page, device, country, date) |
get_advanced_search_analytics |
Advanced analytics with sorting, filtering, pagination (up to 25K rows) |
get_performance_overview |
Performance summary with daily trend data |
get_search_by_page_query |
Queries driving traffic to a specific page |
compare_search_periods |
Compare two time periods side-by-side with percentage changes |
URL Inspection:
| Tool | Description |
|---|---|
inspect_url_enhanced |
Full URL inspection — indexing status, rich results, canonical info |
batch_url_inspection |
Inspect up to 10 URLs in one call |
check_indexing_issues |
Categorized indexing issue report across multiple URLs |
Sitemap Management:
| Tool | Description |
|---|---|
get_sitemaps |
List sitemaps with status and URL counts |
list_sitemaps_enhanced |
Detailed sitemap listing with submission dates and warnings |
get_sitemap_details |
Full details for a specific sitemap |
submit_sitemap |
Submit or resubmit a sitemap |
delete_sitemap |
Remove a sitemap from GSC |
manage_sitemaps |
All-in-one sitemap management (list, details, submit, delete) |
Property Management:
| Tool | Description |
|---|---|
add_site |
Add a site to Search Console |
delete_site |
Remove a site from Search Console |
get_site_details |
Property details including verification and ownership info |
reauthenticate |
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
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.json - Place it in the
gsc-mcp/directory - On first run, a browser window opens for Google login
Installation
# Run without a global install
uvx --from luminarylane-gsc-mcp luminarylane-gsc-mcp
Or 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 |
|---|---|---|
GSC_CREDENTIALS_PATH |
No* | Path to service account JSON key file |
GSC_OAUTH_CLIENT_SECRETS_FILE |
No* | Path to OAuth client secrets JSON |
GSC_SKIP_OAUTH |
No | Set to true to skip OAuth and use service account only |
GSC_DATA_STATE |
No | all (default, matches GSC dashboard) or final (confirmed data, 2-3 day lag) |
*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 file - OAuth: 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file luminarylane_gsc_mcp-1.0.2.tar.gz.
File metadata
- Download URL: luminarylane_gsc_mcp-1.0.2.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39cbe6501a47df9b71472a5a89e3d6ab98a9ee2b9c0a75e527f6cbb3f131ba0c
|
|
| MD5 |
ce004eeeb0e87a330c6e866f62330d07
|
|
| BLAKE2b-256 |
5153e280f93b347444f186260e64ff7e21f8592fd75af0a5c1f1b134d853d899
|
Provenance
The following attestation bundles were made for luminarylane_gsc_mcp-1.0.2.tar.gz:
Publisher:
publish.yml on luminarylane/gsc-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
luminarylane_gsc_mcp-1.0.2.tar.gz -
Subject digest:
39cbe6501a47df9b71472a5a89e3d6ab98a9ee2b9c0a75e527f6cbb3f131ba0c - Sigstore transparency entry: 2345007736
- Sigstore integration time:
-
Permalink:
luminarylane/gsc-mcp@671a50a114ca3eb79efc94b2f9cb1a36328ffb5d -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/luminarylane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@671a50a114ca3eb79efc94b2f9cb1a36328ffb5d -
Trigger Event:
push
-
Statement type:
File details
Details for the file luminarylane_gsc_mcp-1.0.2-py3-none-any.whl.
File metadata
- Download URL: luminarylane_gsc_mcp-1.0.2-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8c45ec6072bd561031d0e27433c044c9d5eea9cd2b63845527b2d97db6c8d3c
|
|
| MD5 |
f424d8c2a81f91539e7876ae0cfcd1aa
|
|
| BLAKE2b-256 |
40bdf0b0183b82d884d046f9c59ca151dbb21387d2f4c7594da777ef2db3cfdc
|
Provenance
The following attestation bundles were made for luminarylane_gsc_mcp-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on luminarylane/gsc-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
luminarylane_gsc_mcp-1.0.2-py3-none-any.whl -
Subject digest:
b8c45ec6072bd561031d0e27433c044c9d5eea9cd2b63845527b2d97db6c8d3c - Sigstore transparency entry: 2345007750
- Sigstore integration time:
-
Permalink:
luminarylane/gsc-mcp@671a50a114ca3eb79efc94b2f9cb1a36328ffb5d -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/luminarylane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@671a50a114ca3eb79efc94b2f9cb1a36328ffb5d -
Trigger Event:
push
-
Statement type: