gsc-mcp-server
Provides GA4 landing-page reporting with sessions, engagement, and key events per landing page, joined with Search Console clicks.
Provides tools for querying Search Analytics with full pagination and totals, URL Inspection, sitemap management, and rebuilt reports such as index coverage, duplicate URLs, cannibalization, section rollups, period comparisons, and prioritized full-site audits.
Runs PageSpeed Insights audits for URLs and top pages, returning Lighthouse lab results and real-user Core Web Vitals data.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
gsc-mcp-server
Give your AI coding agent all of your Google Search Console data, then let it fix your site.
gsc-mcp-server is a local Model Context Protocol server for Claude Code, Cursor, Claude Desktop, Windsurf, Antigravity, Codex and any other MCP client. It gives the agent:
All your Search Console data, correctly counted. Paginated past the 25k-row limit, including fresh data, with property totals, the share of anonymized queries, and a brand / non-brand split.
The reports Google's API doesn't have, rebuilt. A Page Indexing report built from URL Inspection of every URL, canonical-mismatch and duplicate-URL detection, cannibalization, section rollups, and period comparisons.
The data Search Console doesn't have at all. Core Web Vitals (PageSpeed and CrUX), GA4 conversions, Bing Webmaster stats and backlinks, IndexNow submission, and an on-page and internal-link crawler.
No data loss. A local SQLite history that outlives GSC's 16-month window, plus a daily job that snapshots data and writes a full audit.
Then ask your agent things like "run a full site audit and fix the top issues in this codebase".
Contents
Related MCP server: seoskill
How it works
MCP client (Claude Code, Cursor, ...)
│ stdio
▼
gsc-mcp-server ──► Search Console API (analytics, URL Inspection, sitemaps)
│ ──► PageSpeed Insights · GA4 Data API · Bing Webmaster · IndexNow (optional)
│ ──► your site's sitemap + pages (crawler)
▼
~/.gsc-mcp/gsc.db local SQLite: inspections, quota counter, history, crawl resultsAuth: a Google Cloud service account that you add as a user on your Search Console property. Nothing leaves your machine except calls to these APIs.
Caching: URL Inspection is limited to about 2,000 calls per day. Every result is cached, so audits are resumable: run one again and it only inspects new or stale URLs.
Optional integrations only register their tools when their env vars are set, so the tool list stays clean.
Requirements
Node.js 22.5+ (uses the built-in
node:sqlite, so no native modules)A Google Cloud project and a verified Search Console property
Setup
1. Install and build
git clone https://github.com/SoloDevAbu/gsc-mcp-server.git
cd gsc-mcp-server
pnpm install # or: npm install
pnpm build # or: npm run build2. Create a service account
In Google Cloud Console, create or select a project.
APIs & Services → Library → enable Google Search Console API.
IAM & Admin → Service Accounts → Create service account (no roles needed) → Keys → Add key → JSON. Store the file somewhere safe, outside the repo.
3. Give it access to your property
Search Console → your property → Settings → Users and permissions → Add user → paste the service account's client_email from the JSON → permission Full.
Restricted permission can read data, but submitting or deleting sitemaps needs Full.
4. Configure
cp .env.example .envGOOGLE_APPLICATION_CREDENTIALS="/absolute/path/to/service-account.json"
GSC_DEFAULT_SITE_URL="sc-domain:example.com" # or "https://www.example.com/" for URL-prefix propertiesThe server reads this .env on startup. Values set in your MCP client config take precedence.
5. Check it works
node dist/index.js # prints "GSC MCP Server running on stdio" on stderr; Ctrl+C to quitConnect your MCP client
Claude Code
claude mcp add gsc -- node /absolute/path/to/gsc-mcp-server/dist/index.jsCursor (.cursor/mcp.json), Claude Desktop (claude_desktop_config.json), Windsurf / Antigravity (mcp_config.json):
{
"mcpServers": {
"gsc": {
"command": "node",
"args": ["/absolute/path/to/gsc-mcp-server/dist/index.js"]
}
}
}If you'd rather not use .env, add "env": { "GOOGLE_APPLICATION_CREDENTIALS": "...", "GSC_DEFAULT_SITE_URL": "..." } to that entry. Restart the client after changing keys.
Tools
Search Console
Tool | What it returns |
| Properties the service account can access, with permission level |
| Every row (auto-paginated), fresh data, totals, anonymized-query share, brand split. Dimensions: |
| Top-10 rankings whose CTR is below the expected CTR for their position, ranked by missed clicks |
| Queries at positions 4–20 with their landing page, clicks they'd gain in the top 3, and other queries on the same page |
| Full URL Inspection: coverage, Google vs declared canonical, sitemaps, crawl info, rich-result items and issues, plus warnings |
| List, submit or delete sitemaps |
Rebuilt reports
Tool | What it returns |
| Page Indexing report: inspects every sitemap URL and page with impressions (cached, resumable, quota-aware). URLs by coverage state, not-indexed, canonical mismatches, rich-result issues, sitemap URLs without impressions, pages missing from the sitemap |
| The same report from cache, using no quota |
| One page under several URLs (http/https, www/apex, |
| Period over period: totals delta, gainers/losers, position movers, new and lost queries or pages |
| Queries split across pages, separating URL-variant duplicates from real cannibalization |
| Performance per section or subdomain (or custom regex groups); sections with zero clicks |
| Saves daily |
| Reads stored history by date, week, month, query or page |
| Runs everything and returns one prioritized action list |
Beyond the Search Console API
Tool | Needs |
|
|
| nothing |
|
|
|
|
|
|
No public API offers these: manual actions, security issues, crawl stats (use your server logs), Google's Links report (use bing_backlinks), and an AI Overviews traffic split.
Example prompts
"Run
gsc_audit_index_coverage, then tell me why pages aren't indexed and fix what's in this repo.""Use
gsc_find_low_ctr_opportunitiesand rewrite the titles and meta descriptions for the top 10 pages.""Compare the last 28 days to the previous 28 by page. What dropped and why?"
"Run
gsc_full_site_auditwithincludeCrawl: trueand work through the critical actions."
Configuration
All variables can go in .env or your MCP client's env block.
Variable | Required | Description |
| ✅ | Absolute path to the service account JSON key |
| recommended | Default property, e.g. |
| Brand-query regex. Default: derived from the property domain | |
| Canonical origin, e.g. | |
| Where the SQLite cache lives. Default | |
| Stop inspecting at this many per day. Default | |
| Inspection rate. Default | |
| Expected CTR % for positions 1..N, comma-separated | |
| User-Agent for | |
| PageSpeed Insights API key | |
| Numeric GA4 property ID | |
| Bing Webmaster Tools API | |
| IndexNow |
PageSpeed Insights: Cloud Console → enable PageSpeed Insights API → Credentials → Create API key → restrict it to that API.
GA4: Cloud Console → enable Google Analytics Data API. In GA4, Admin → Property access management → add the service account email as Viewer. The property ID is under Admin → Property details.
Bing: Bing Webmaster Tools → Import from Google Search Console → Settings → API access → generate a key.
IndexNow: generate any 32-character hex key and serve it as plain text at
https://<your-host>/<key>.txt. On Cloudflare you can instead just turn on Caching → Crawler Hints.
Daily collection (no data loss)
dist/daily.js does three things:
Snapshots analytics (web and image) into SQLite.
Re-inspects URLs whose cached result is older than 7 days.
Writes the full audit to
~/.gsc-mcp/reports/YYYY-MM-DD.json, adding a crawl on Mondays.
It logs to ~/.gsc-mcp/daily.log.
Windows
schtasks /Create /TN "GSC daily" /SC DAILY /ST 09:00 /TR "node C:\path\to\gsc-mcp-server\dist\daily.js" /FmacOS / Linux (crontab -e)
0 9 * * * /usr/bin/env node /path/to/gsc-mcp-server/dist/daily.jsFor a permanent, unlimited copy straight from Google, also turn on Search Console → Settings → Bulk data export to BigQuery. Back up ~/.gsc-mcp (or point GSC_DATA_DIR at a synced folder).
Quotas and limits
URL Inspection: about 2,000 calls per day and 600 per minute per property. Audits stop at
GSC_INSPECTION_DAILY_LIMITand continue on the next run. One URL takes about 1 s at concurrency 8.Search Analytics: 25k rows per request, paginated automatically. Google hides rare queries; responses report that share as
anonymizedImpressionShare.Data freshness:
dataState: "all"(the default) includes the latest, still-provisional days. Use"final"for finalized data only.Crawler: keep concurrency low (default 2). CDNs like Cloudflare rate-limit fast crawlers; those pages are reported separately as
rateLimitedByCdn.
Troubleshooting
Symptom | Fix |
| Add the service account email to the property (Setup step 3). The error lists the properties it can access. |
| Change the service account to Full in GSC → Users and permissions |
| Add the service account as Viewer in GA4 and enable the Analytics Data API |
| Set |
A tool isn't listed | Its env var isn't set, or the client wasn't restarted |
Audit stops partway | You hit the daily inspection quota. Run it again tomorrow; nothing is lost. |
Development
pnpm dev # run from source with tsx (watch)
pnpm typecheck
pnpm buildLayout: src/index.ts (server), src/tools.ts (tool registration), src/schemas.ts (zod inputs), src/gsc-client.ts (auth and raw API), src/lib/* (analytics, inspection, coverage, opportunities, history, store, sitemap, URL helpers), src/lib/external/* (PageSpeed, GA4, Bing, IndexNow, crawler), src/daily.ts (scheduled job).
Issues and PRs are welcome.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search Console, Google Analytics and keyword data for your AI agent.
SEO data your AI can cite: Search Console, GA4, keywords, backlinks, SERPs and AI visibility.
AI SEO agent on your Google Search Console data: audits, quick wins, content, WordPress publishing.
Google Search Console in your AI: overview, opportunities, index gaps, page checks, long history.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceSyncs Google Search Console performance data into a local ClickHouse database and exposes prepared SEO analysis tools to AI agents. Enables diagnosing traffic drops, finding striking-distance keywords, detecting cannibalization, auditing indexing, and generating weekly SEO reports through natural language.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to run SEO audits and reporting over a user's own Search Console, Google Analytics, Bing, and keyword/competitor provider data, including page/index status, traffic comparisons, backlinks, and local crawl/internal-link analysis.3,243 npm649Apache 2.0
- AlicenseAqualityBmaintenanceIt enables compatible AI agents to audit public web pages, crawl bounded same-host site samples, collect and compare AI answers, and read a user's own Google Search Console data locally.9164 npm2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents such as Cursor, Claude, and Windsurf to run local SEO audits, inspect routes, apply safe code fixes, and access Google Search Console, Bing, and Core Web Vitals data through 13 standard tools.1MIT