gsc-mcp-server
Provides direct access to Google Search Console data including search performance, URL indexation, sitemaps, and built-in SEO analysis tools such as trending queries, cannibalization detection, traffic drop diagnostics, and automated query/page grouping.
Click on "Install 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-servershow my top 10 queries by clicks last 28 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
An MCP server that gives Claude direct access to your Google Search Console data — search performance, URL indexation, sitemaps, and built-in SEO analysis tools including trending queries, cannibalization detection, traffic drop diagnostics, and automated query/page grouping.
Prerequisites
Node.js >= 18.0.0
A C++ compiler (required by the
better-sqlite3dependency):
Platform | Install |
macOS |
|
Windows | Visual Studio Build Tools — select "Desktop development with C++" |
Linux (Debian/Ubuntu) |
|
Linux (Fedora/RHEL) |
|
Quick Start
git clone https://github.com/serpfire/gsc-mcp-server.git
cd gsc-mcp-server
npm install1. Create Google OAuth credentials
Go to Google Cloud Console
Create an OAuth 2.0 Client ID (type: Desktop app)
Enable the Google Search Console API in your project
2. Authenticate
GSC_OAUTH_CLIENT_ID=your-client-id \
GSC_OAUTH_CLIENT_SECRET=your-client-secret \
npm run setupThis opens your browser to sign in with Google. Tokens are stored at ~/.gsc-mcp/tokens.json and auto-refresh. Run setup again anytime to switch accounts.
3. Add to Claude Code
claude mcp add --transport stdio gsc -s user \
-e GSC_OAUTH_CLIENT_ID=your-client-id \
-e GSC_OAUTH_CLIENT_SECRET=your-client-secret \
-- node /absolute/path/to/gsc-mcp-server/src/index.jsOr manually add to ~/.claude.json:
{
"mcpServers": {
"gsc": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/gsc-mcp-server/src/index.js"],
"env": {
"GSC_OAUTH_CLIENT_ID": "your-client-id",
"GSC_OAUTH_CLIENT_SECRET": "your-client-secret"
}
}
}
}Service Account Alternative
For automation or server-to-server use:
{
"env": {
"GSC_AUTH_MODE": "service_account",
"GSC_SERVICE_ACCOUNT_KEY_PATH": "/path/to/key.json"
}
}Tools
Core GSC Tools
Tool | Description |
| List all verified GSC properties |
| Get details for a specific site |
| Query clicks, impressions, CTR, position with dimensions/filters/pagination |
| Check URL index/crawl status (2,000/day limit) |
| List sitemaps for a site |
| Get sitemap details |
| Submit a new sitemap |
| Remove a sitemap from GSC |
| Re-authenticate with a different Google account (OAuth only) |
Data Sync
Tool | Description |
| Fetch all performance data into local SQLite cache. Incremental by default. Required before analysis tools. |
Analysis Tools
Tool | Description |
| Find queries ranking 2-20 with high impressions but low CTR, scored by untapped potential |
| Detect queries ranking on 2+ URLs using HHI scoring with action recommendations |
| Find queries with biggest growth/decline (period-over-period or year-over-year) |
| Find pages with biggest growth/decline with impact scoring |
| Diagnose traffic drops across 5 views: site-level, GBP vs organic, groups, segments, brand vs non-brand |
| Aggregated metrics broken down by named groups with share percentages |
Group Management
Tool | Description |
| Create a group with OR/AND/NOT regex rules for URL segments or query groups |
| List all groups, optionally filtered by dimension |
| Get group details including rules |
| Update group description and/or rules |
| Delete a group and its rules |
| Test a group against cached data — match count, rate, samples |
Auto-Discovery
Tool | Description |
| Auto-cluster queries using word overlap, n-gram similarity, and page co-occurrence |
| Convert a discovered cluster into a named group |
| Auto-create URL segment groups from page URL patterns |
| Auto-create query groups: brand, topic n-grams, intent modifiers |
Resources
URI | Description |
| All verified sites (auto-discovery) |
Prompts
Name | Description |
| Guided full SEO review (queries, pages, devices, trends) |
| Systematic URL indexation report |
Example Queries
"List my Search Console sites"
"Show top 20 queries for sc-domain:example.com last 7 days"
"Compare mobile vs desktop for https://example.com/"
"Check if https://example.com/new-page is indexed"
"Show sitemaps for sc-domain:example.com"
"Sync data for sc-domain:example.com and find low-hanging fruit"
"Detect keyword cannibalization on sc-domain:example.com"
"Show trending queries for sc-domain:example.com last 28 days"
"Auto-create query groups for sc-domain:example.com"
Architecture
src/
├── index.js # Entry: auth -> client -> db -> server -> stdio
├── server.js # McpServer factory
├── auth/
│ ├── index.js # Auth factory (auto-detects mode from env)
│ ├── service-account.js # Service account key file auth
│ ├── oauth.js # Browser flow + token persistence + auto-recovery
│ ├── token-store.js # ~/.gsc-mcp/tokens.json
│ └── setup.js # Standalone setup script
├── gsc/ # Pure GSC API wrappers (no MCP knowledge)
│ ├── client.js
│ ├── sites.js
│ ├── search-analytics.js
│ ├── sitemaps.js
│ └── url-inspection.js
├── db/
│ ├── connection.js # SQLite setup with WAL mode
│ └── schema.js # Migrations
├── analysis/ # SEO analysis engine (uses local SQLite)
│ ├── sync.js # GSC API -> SQLite incremental sync
│ ├── low-hanging-fruit.js # Opportunity scoring
│ ├── cannibalization.js # HHI-based detection
│ ├── trending.js # PoP / YoY trending queries & pages
│ ├── traffic-drop.js # Multi-view drop diagnostics
│ ├── group-performance.js # Group-level aggregation
│ ├── auto-segment.js # Automatic URL segmentation
│ ├── auto-group.js # Automatic query grouping
│ ├── shared.js # Shared SQL helpers
│ ├── groups/
│ │ ├── manager.js # CRUD for groups + rules
│ │ ├── compiler.js # OR/AND/NOT rule compilation
│ │ └── matcher.js # Regex matching engine
│ └── semantic/
│ ├── discover.js # Cluster discovery orchestrator
│ ├── clustering.js # Connected components algorithm
│ ├── similarity.js # Multi-signal similarity scoring
│ └── labeler.js # Cluster naming
├── tools/
│ ├── definitions.js # Core GSC tools (declarative)
│ ├── analysis-definitions.js # Analysis tools (declarative)
│ ├── middleware.js # Rate limiting + error handling wrapper
│ ├── auth.js # switch_account tool
│ └── index.js # Registration loop
├── resources.js # sites://list resource
├── prompts.js # SEO analysis + index check prompts
└── utils/
├── logger.js # stderr-only (stdout = MCP protocol)
├── errors.js # Google API error -> MCP error
├── constants.js # Scopes, rate limits, defaults
├── rate-limiter.js # Sliding window
└── open-url.js # Cross-platform browser openerTwo-layer separation: gsc/ knows nothing about MCP. tools/ knows nothing about Google's API. analysis/ operates on local SQLite data. Each layer is independently testable.
Environment Variables
Variable | Required | Default | Description |
| No | Auto-detected |
|
| OAuth | — | OAuth client ID |
| OAuth | — | OAuth client secret |
| No | — | Skip browser flow with a pre-existing token |
| Service acct | — | Path to JSON key file |
| No |
| Override scopes (comma-separated) |
| No |
|
|
| No |
| Custom token storage path |
| No |
| Custom SQLite database path |
Debugging
Launch the MCP Inspector for interactive testing:
npm run inspectWindows note: The inspect script uses bash. Run it from Git Bash, WSL, or replace with:
npx @modelcontextprotocol/inspector node src/index.js
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/serpfire/gsc-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server