Skip to main content
Glama
russjeffery

google-search-console-mcp

by russjeffery

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SETUP_UINoSet to '0' to stop serving the setup page. Default is '1' (served).1
SETUP_PATHNoPath for the setup page. Default is '/setup'./setup
MCP_ENDPOINTNoPath to serve the MCP endpoint on. Default is '/mcp'./mcp
GSC_READ_ONLYNoSet to '1' to disable sitemap submit and delete tools (read-only mode). Default is '0'.0
ALLOWED_ORIGINSNoComma-separated list of browser origins allowed to make requests. Unset means no browser origins are allowed; '*' allows any origin.
GSC_CREDENTIALSNoYour Google Search Console credential blob (base64url-encoded JSON with client ID, client secret, and refresh token). Treat as a password. Can also be a base64-encoded service account key or an access token JSON.
MCP_SHARED_SECRETNoToken that clients must present on every request, including discovery. Set for private single-tenant deployments.
MCP_STRICT_HEADERSNoSet to '0' to relax strict 2026-07-28 header-mirroring validation. Default is strict ('1').1

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_sitesA

List every Search Console property the authenticated account can access, with its permission level. Call this first in any session: the exact siteUrl strings it returns are required by every other tool, and permission level tells you what you can do (siteOwner and siteFullUser can read analytics and manage sitemaps; siteRestrictedUser has limited read access; siteUnverifiedUser cannot read data).

get_siteA

Fetch a single Search Console property and the permission level the authenticated account holds on it. Useful to confirm access before a longer sequence of calls; list_sites is usually more efficient.

query_search_analyticsA

Query clicks, impressions, CTR and average position from the Search Console Performance report - the core tool for all traffic and ranking analysis.

Group by one or more dimensions (query, page, country, device, searchAppearance, date, hour). Rows come back sorted by clicks descending, and only rows with data are returned. Omitting dimensions returns a single totals row for the whole property.

Behaviours worth planning around:

  • Data is final only up to about 3 days ago; use lastDays to get a safe window automatically.

  • Grouping by query triggers privacy filtering: rare queries are omitted entirely, so query-level clicks will not sum to the property total. Never present that gap as lost traffic.

  • Combining page and query is capped harder than either alone, so expect fewer rows than you might predict.

  • rowLimit maxes at 25000 per call; page with startRow for more.

compare_search_analyticsA

Run the same search-analytics query over two periods and return per-row and total deltas. Use it for "is traffic up or down", "what lost rankings", or "which pages grew" questions.

By default the comparison period is the equal-length window immediately before the current one. Set comparison to "yearOverYear" for the same window 364 days earlier (364 rather than 365 keeps weekdays aligned), or "custom" with explicit compareStartDate and compareEndDate.

Rows are matched on their dimension values and sorted by absolute click change, so the biggest movers in either direction come first. Rows present in only one period are included, with the missing side reported as zero.

list_sitemapsA

List the sitemaps submitted for a property, with submission and download timestamps, error and warning counts, and per-content-type submitted and indexed counts. Pass sitemapIndex to list the child sitemaps inside a sitemap index file instead of the top-level submissions.

get_sitemapA

Fetch details for a single submitted sitemap: when it was last submitted and downloaded, whether processing is still pending, its type, and how many URLs were submitted versus indexed per content type. Treat the indexed counts as a lower bound - Google has long under-reported them here.

submit_sitemapA

Submit or resubmit a sitemap for a property. Resubmitting an existing sitemap is a safe way to nudge Google into re-downloading it after content changes. The sitemap must already be reachable at the given URL and must live under the property. Returns no data on success; call get_sitemap afterwards to check processing status.

delete_sitemapA

Remove a sitemap from a property. This unsubmits the sitemap from Search Console; it does not delete the file from the site and does not remove any indexed URLs. It is destructive only in that the submission history for that sitemap is lost.

inspect_urlA

Inspect one URL as Google sees it: whether it is indexed, its coverage state, robots.txt status, last crawl time, the canonical Google chose versus the one you declared, which sitemaps reference it, plus AMP, mobile-usability and rich-results verdicts where applicable.

This is the tool for "why is this page not indexed" questions. Read indexStatusResult.coverageState first: it carries the specific reason, such as "Crawled - currently not indexed", "Discovered - currently not indexed", or "Duplicate without user-selected canonical".

Quota is roughly 2000 inspections per property per day, so inspect a considered sample rather than every URL. The URL must belong to the property being inspected. Results describe the indexed version only - this API cannot run the live test that the Search Console UI offers.

inspect_urlsA

Inspect up to 25 URLs in one call, run concurrently, returning a compact per-URL summary plus a count of how many URLs fell into each coverage state. Use it to audit a set of pages - for example the top landing pages from query_search_analytics, or URLs listed in a sitemap.

Failures are reported per URL rather than aborting the batch, so one bad URL will not cost you the rest of the results. Each URL consumes one unit of the roughly 2000/day per-property inspection quota.

check_setupA

Diagnose this server's configuration: whether credentials are present, whether they still work against Google, and which properties they reach. Call it when another tool fails with an authentication or permission error, when the user is setting the server up, or when the user asks why it is not working. It is the only tool that works before credentials are configured, and it returns remediation steps rather than failing. Do not call it as a warm-up before ordinary requests - list_sites already proves access.

Prompts

Interactive templates invoked by user choice

NameDescription
performance_reviewA structured review of a property: totals, trend, biggest movers by page and query, and device/country splits, with the analysis pitfalls already accounted for.
indexing_auditCheck whether a property key pages are actually indexed, and diagnose the ones that are not.
query_opportunitiesSurface queries where small ranking or CTR improvements would yield the most additional clicks.
sitemap_healthReview submitted sitemaps for errors, staleness and coverage gaps.

Resources

Contextual data attached and managed by the client

NameDescription
search-analytics-guideDimensions, filters, operators, aggregation, data freshness, pagination, and the analysis patterns that avoid the common wrong conclusions.
url-inspection-guideEvery field in an inspection result, a lookup table for diagnosing each coverageState, quota guidance, and what the API cannot do.
sitemaps-guideThe WmxSitemap resource explained, how to read submitted-versus-indexed counts, and a sitemap health checklist.