gsc-mcp
Read-only local MCP server for Google Search Console reporting and URL inspection.
List all Search Console properties accessible to the configured service account.
Query Search Analytics for clicks, impressions, CTR, and position grouped by query, page, country, device, search appearance, or date, with filters, sorting, pagination, date ranges, and search types.
Compare two equal-length periods to get property-wide deltas and top winners/losers, with optional minimum-impressions noise filtering.
Inspect a specific URL's indexing status, crawl/coverage details, canonicals, robots.txt state, sitemaps, mobile usability, and rich results.
All tools are read-only and cannot modify Search Console settings, URLs, sitemaps, or properties.
Provides read-only tools to list Search Console properties, query search analytics with dimensions, filters, sorting, and pagination, compare periods, and inspect URLs for indexing, canonical, robots, sitemap, mobile usability, and rich-result details.
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 show top search queries for my site over the 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.

gsc-mcp
Minimal, strictly read-only local Model Context Protocol (MCP) server for Google Search Console, written in TypeScript (~1,200 lines across four files).
Why a pinned local build instead of npx ...@latest?
Connecting Google Search Console to a coding agent requires a Google Cloud service-account key. Passing that key into an unpinned package via npx -y ...@latest downloads and executes whatever was pushed to the registry most recently—inside the same process that holds your credentials—on every session start.
To anyone else reading this on GitHub, this repository is third-party code too—so do not run it blindly either. For read-only Search Console reporting, the entire API surface is three endpoints (sites.list, searchanalytics.query, urlInspection.index.inspect). Keeping the server deliberately small (four files in src/, three runtime dependencies, ignore-scripts=true) means you can read the full source in a few minutes—especially src/gsc-client.ts, where the key is loaded and the OAuth scope is pinned—before building a fixed commit locally, forking it, or using it as a blueprint to write your own. Once built, nothing updates behind your back.
Related MCP server: google-search-console-mcp-server
Security Model (Defense in Depth)
Hardcoded read-only OAuth scope:
src/gsc-client.tspinshttps://www.googleapis.com/auth/webmasters.readonly. Sitemaps cannot be deleted, URLs cannot be removed, and settings cannot be modified—even under prompt injection.Property-level least privilege: The service account only sees Search Console properties where you explicitly add its email address with Restricted (
siteRestrictedUser) permission.Local key isolation: Credentials live outside every Git repository at
~/.config/gsc/service-account.json(chmod 600; startup warns onstderrif group/world-readable). Install scripts are disabled via.npmrc(ignore-scripts=true), and@googleapis/searchconsoleis used instead of the monolithicgoogleapispackage.
Provided MCP Tools
All tools carry MCP readOnlyHint: true and destructiveHint: false annotations:
Tool | Purpose |
| Lists all Search Console properties granted to the service account ( |
| Queries |
| Compares two equal-length periods (e.g., last 28 or 90 days vs. preceding period) and returns property-wide deltas plus top winners and losers ( |
| Runs the URL Inspection API for a specific URL: indexing verdict, coverage state, |
Setup in 5 Minutes
1. Create a read-only Google Cloud service account
Using the Google Cloud CLI (gcloud):
export GCP_PROJECT="your-project-id" # must be globally unique in Google Cloud
export SA_NAME="gsc-reader"
export SA_EMAIL="${SA_NAME}@${GCP_PROJECT}.iam.gserviceaccount.com"
# Create a dedicated project (or skip if using an existing project)
gcloud projects create "$GCP_PROJECT" --name="GSC Read-Only MCP"
gcloud config set project "$GCP_PROJECT"
# Enable the Google Search Console API
gcloud services enable searchconsole.googleapis.com
# Create the service account (no IAM project roles needed)
gcloud iam service-accounts create "$SA_NAME" \
--display-name="Search Console Read-Only MCP"
# Export the key outside your repositories and lock down permissions
mkdir -p ~/.config/gsc
chmod 700 ~/.config/gsc
gcloud iam service-accounts keys create ~/.config/gsc/service-account.json \
--iam-account="$SA_EMAIL"
chmod 600 ~/.config/gsc/service-account.json2. Grant property access in Google Search Console
Repeat this 30-second step for each property you want to query:
Open Google Search Console and select your property (e.g.,
example.com).Go to Settings -> Users and permissions -> Add user.
Enter your service-account email (
gsc-reader@your-project-id.iam.gserviceaccount.com) with permission Restricted.
The property becomes immediately visible to gsc_list_sites.
3. Inspect, verify, and build locally
Requires Node.js 22+ (Node 24 LTS recommended). Read through src/ first (start with src/gsc-client.ts), then install and build a pinned commit:
git clone https://github.com/uwejettkant/gsc-mcp.git
cd gsc-mcp
git log -n 1 # Verify the commit you are building (or git checkout <commit-sha>)
npm ci
npm audit
npm run check4. Register in your coding agent
Claude Code
claude mcp add gsc-mcp --scope user -- node /absolute/path/to/gsc-mcp/dist/index.jsGoogle Antigravity / Claude Desktop / Cursor (mcp_config.json)
{
"mcpServers": {
"gsc-mcp": {
"command": "node",
"args": ["/absolute/path/to/gsc-mcp/dist/index.js"]
}
}
}If you store the key somewhere other than ~/.config/gsc/service-account.json, pass GSC_CREDENTIALS_PATH via "env":
{
"mcpServers": {
"gsc-mcp": {
"command": "node",
"args": ["/absolute/path/to/gsc-mcp/dist/index.js"],
"env": {
"GSC_CREDENTIALS_PATH": "~/.config/gsc/custom-key.json"
}
}
}
}Development & Verification
npm run check # Typecheck (src + tests), Vitest suite, and TypeScript build
npm audit # Verify zero known vulnerabilities in locked dependencies
npm test # Run unit and in-memory MCP protocol tests
npm run typecheck # Strict TypeScript check without emitting files
npm run build # Compile TypeScript into dist/License
MIT © Uwe Jettkant
Available Tools
4 toolsgsc_compare_periodsCompare Two Search Analytics PeriodsBRead-onlyIdempotent
Compares two date ranges (e.g., last 28 or 90 days vs. the previous period) to identify true property-wide totals as well as top dimension winners and losers.
Inputs: siteUrl (required), days, limit, sortBy, +9 more.
gsc_inspect_urlInspect URL Indexing StatusARead-onlyIdempotent
Checks Google Search Console URL Inspection indexing status, crawl state, canonicals, and robots.txt state for a specific URL.
Inputs: siteUrl (required), inspectionUrl (required), languageCode.
gsc_list_sitesList Search Console PropertiesARead-onlyIdempotent
Lists all Google Search Console properties accessible to the configured read-only service account.
Inputs: no named parameters.
gsc_search_analyticsQuery Search AnalyticsCRead-onlyIdempotent
Queries Google Search Console performance data (clicks, impressions, CTR, position) by dimensions such as query, page, country, device, searchAppearance, or date.
Inputs: siteUrl (required), sortBy, endDate, filters, +7 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct focus: property listing, performance queries, period comparison, and URL inspection. The only mild overlap is between gsc_search_analytics and gsc_compare_periods, since both use performance data, but their descriptions clarify aggregation versus comparison workflows.
All tool names follow a consistent gsc_ prefix with snake_case verb/noun structure. The pattern is predictable and readable throughout the set.
Four tools is well-scoped for a focused Google Search Console analytics server. Each tool covers a distinct core capability without unnecessary surface area.
The surface covers the main read-only workflows: listing properties, querying analytics, comparing periods, and inspecting URLs. Minor gaps include sitemap listing and batch URL inspection, but agents can work around these with repeated calls.
Maintenance
Related MCP Connectors
Read-only Search Console analytics, URL inspection, indexing diagnostics, and sitemaps.
Read Search Console queries, clicks and positions, and inspect URLs for indexing.
Hosted, read-only Google Search Console MCP: performance, comparisons, URL inspection, sitemaps.
Read-only Google Search Console MCP server for AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Google Search Console data, including search analytics, sitemap status, and URL inspection, for MCP clients like Claude.10 npmMIT
- AlicenseAqualityBmaintenanceEnables MCP clients to query Google Search Console search performance, inspect indexing, analyze sitemaps, and run SEO analyses such as cannibalisation detection, query clustering, and wins/losses, all with read-only access.20Apache 2.0
- AlicenseAqualityCmaintenanceEnables read-only access to Google Search Console data, including property discovery, search analytics queries, and URL inspection, through a security-focused interface.33,564 PyPI3MIT

io.scalably/gsc-mcpofficial
AlicenseAqualityCmaintenanceEnables read-only access to Google Search Console data, including properties, Search Analytics with filters and auto-pagination, sitemaps, and URL inspection with batch support and throttling.539 PyPI1MIT