Skip to main content
Glama
Google Search Console (GSC) MCP

Google Search Console (GSC) MCP

by amirjahfar1

Google Search Console (GSC) MCP

Maintained by Amir Ali.

A Model Context Protocol (MCP) server that connects Google Search Console to AI assistants — query your SEO data, audit indexing, manage sitemaps, and run full site audits through natural language. Works with Claude Code, Claude Desktop, Cursor, Codex CLI, and any other MCP-compatible client.


What's Different in This Edition

This fork keeps the full 20-tool GSC API surface from the upstream project and adds 8 new skills plus a master audit skill that cross-references findings across checks instead of reporting them in isolation:

  • device-performance-split, country-opportunities, branded-vs-nonbranded — deeper analytics cuts the base tools don't surface on their own

  • new-vs-lost-queries, content-decay-report, sitemap-health-check — trend and health checks the original skill set didn't cover

  • multi-property-comparison — portfolio-level view across every property in the account

  • full-seo-audit — chains indexing, sitemap, cannibalization, content-decay, and lost-query checks together and cross-references the results to point at the actual root cause (e.g. a "decaying" page that's really being cannibalized by a newer page, not losing to competitors)

See Available Skills below for the full list, and SETUP.md for the install walkthrough.


Related MCP server: Google Search Console MCP Server

Available Tools

All 19 tools covering the full GSC API surface:

Tool

What It Does

What You Need to Provide

get_capabilities

Lists all tools and shows auth status — call this first if unsure

Nothing

list_properties

Shows all your GSC properties

Nothing

get_site_details

Details about a specific site

Site URL

add_site

Add a new property to the account (disabled by default)

Site URL

delete_site

Remove a property from the account (disabled by default)

Site URL

get_search_analytics

Top queries and pages with clicks, impressions, CTR, position

Site URL, time period

get_performance_overview

Summary of site performance with daily trend

Site URL, time period

compare_search_periods

Compare performance between two time periods

Site URL, two date ranges

get_search_by_page_query

Search terms driving traffic to a specific page

Site URL, page URL

get_advanced_search_analytics

Analytics with filters by country, device, query, page

Site URL

inspect_url_enhanced

Detailed crawl/index status for a URL

Site URL, page URL

batch_url_inspection

Inspect up to 10 URLs at once

Site URL, list of URLs

check_indexing_issues

Check multiple URLs for indexing problems

Site URL, list of URLs

get_sitemaps

Lists all sitemaps for a site

Site URL

list_sitemaps_enhanced

Detailed sitemap info including errors and warnings

Site URL

get_sitemap_details

Submitted-vs-indexed breakdown for one sitemap

Site URL, sitemap URL

submit_sitemap

Submit a new sitemap

Site URL, sitemap URL

delete_sitemap

Remove a sitemap (disabled by default)

Site URL, sitemap URL

manage_sitemaps

Submit or delete sitemaps via one action tool

Site URL, action

reauthenticate

Re-run the OAuth browser login (switch accounts)

Nothing

Destructive tools (add_site, delete_site, delete_sitemap) are disabled by default — see Safety.

Tool usage examples

10 sample prompts, each exercising a different tool directly (no skill involved):

Tool

Sample Prompt

list_properties

"List all my GSC properties and tell me which ones I have full access to."

get_site_details

"Show me the verification and ownership details for example.com."

get_search_analytics

"Show me the top 20 search queries for mywebsite.com in the last 30 days, and highlight any with CTR below 2%."

get_performance_overview

"Give me a performance overview of mywebsite.com for the last 28 days, including the daily trend."

compare_search_periods

"Compare mywebsite.com's performance between January and February. What queries improved the most?"

get_search_by_page_query

"What search terms are driving traffic to mywebsite.com/pricing?"

get_advanced_search_analytics

"Show queries with high impressions but position below 10, filtered to mobile traffic in the US."

inspect_url_enhanced

"Do a full crawl and index inspection of mywebsite.com/landing-page."

batch_url_inspection

"Check the indexing status of these 5 pages: [list URLs]."

get_sitemaps

"List all sitemaps submitted for mywebsite.com and flag any with errors."


Available Skills

Skills are ready-made workflows that chain the tools above together. They're auto-loaded in Claude Code via .claude-plugin/plugin.json.

Core reports

Skill

What it does

seo-weekly-report

Full 28-day performance summary with period-over-period comparison and top queries

indexing-audit

Batch-inspects top pages and returns a prioritized indexing fix list

cannibalization-check

Finds queries where multiple pages compete; recommends which to consolidate

content-opportunities

Surfaces position 11–20 queries with high impressions and low CTR

Deeper analytics cuts

Skill

What it does

device-performance-split

Compares mobile vs desktop vs tablet performance, flags mobile-specific gaps

country-opportunities

Finds top and under-performing countries/markets

branded-vs-nonbranded

Splits branded vs non-branded queries to reveal true organic growth

new-vs-lost-queries

Finds queries that are brand-new or have completely disappeared, not just declined

Health & trend checks

Skill

What it does

content-decay-report

Finds pages on a 90-day gradual traffic decline — refresh candidates

sitemap-health-check

Audits sitemap errors/warnings and the submitted-vs-indexed gap

multi-property-comparison

Ranks and compares every property in the account side by side

Master audit

Skill

What it does

full-seo-audit

Runs indexing, sitemap, cannibalization, content-decay, and lost-query checks together, then cross-references the findings to point at root cause instead of listing symptoms in isolation


Getting Started

Full step-by-step walkthrough (Google Cloud credentials, install, and client config) is in SETUP.md.

Quick summary:

  1. Get Google API credentials — OAuth client ID (recommended) or a service account key, from Google Cloud Console.

  2. Clone this repo and install dependencies — this fork's extra skills only exist in this repo, so use the clone method, not the uvx/PyPI package (see note in SETUP.md).

  3. Point your MCP client at it — Claude Code picks up .mcp.json automatically at the project root; see SETUP.md for Claude Desktop / Cursor configs.

  4. Test — ask your assistant "List my GSC properties." If you see your properties, it's working.


Environment Variables Reference

Variable

Required

Default

Description

GSC_OAUTH_CLIENT_SECRETS_FILE

OAuth only

—

Absolute path to your OAuth client secrets JSON

GSC_CREDENTIALS_PATH

Service account only

—

Absolute path to your service account JSON key

GSC_SKIP_OAUTH

No

false

Set to "true" to force service account auth and skip OAuth entirely

GSC_DATA_STATE

No

"all"

"all" matches the GSC dashboard. "final" returns only confirmed data (2–3 day lag)

GSC_ALLOW_DESTRUCTIVE

No

false

Set to "true" to enable add_site / delete_site / delete_sitemap


Skill Usage Examples

10 sample prompts that trigger the bundled skills (chained tool workflows) instead of a single tool:

Goal

Sample Prompt

Weekly report

"Run the SEO weekly report for example.com"

Full audit

"Run a full SEO audit on example.com"

Cannibalization

"Check for keyword cannibalization on example.com"

Indexing

"Audit indexing for my top pages"

Content ideas

"Find content opportunities for example.com"

Mobile vs desktop

"Compare mobile and desktop performance for example.com"

Lost visibility

"Show me new and lost queries for example.com this month"

Content decay

"Which pages on example.com are losing traffic gradually?"

Sitemap health

"Check sitemap health for example.com"

Multi-site

"Compare performance across all my GSC properties"


Safety: Destructive Operations

By default, add_site, delete_site, and delete_sitemap are disabled. To enable them, set:

"GSC_ALLOW_DESTRUCTIVE": "true"

Troubleshooting

See the Troubleshooting section in SETUP.md for spawn ENOENT errors, auth failures, and client-specific config issues.


License

MIT License — see LICENSE.

Available Tools

20 tools
add_siteA
Add a site to your Search Console properties.

Args:
    site_url: The URL of the site to add (must be exact match e.g. https://example.com, or https://www.example.com, or https://subdomain.example.com/path/, for domain properties use format: sc-domain:example.com)

Inputs: site_url (required). Returns: result

batch_url_inspectionA
Inspect multiple URLs in batch (within API limits).

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    urls: List of URLs to inspect, one per line

Inputs: urls (required), site_url (required). Returns: result

check_indexing_issuesA
Check for specific indexing issues across multiple URLs.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    urls: List of URLs to check, one per line

Inputs: urls (required), site_url (required). Returns: result

compare_search_periodsA
Compare search analytics data between two time periods.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    period1_start: Start date for period 1 (YYYY-MM-DD)
    period1_end: End date for period 1 (YYYY-MM-DD)
    period2_start: Start date for period 2 (YYYY-MM-DD)
    period2_end: End date for period 2 (YYYY-MM-DD)
    dimensions: Dimensions to group by (default: query)
    limit: Number of top results to compare (default: 10)

Inputs: site_url (required), period1_end (required), period2_end (required), period1_start (required), +3 more. Returns: result

delete_siteA
Remove a site from your Search Console properties.

Args:
    site_url: The URL of the site to remove (must be exact match e.g. https://example.com, or https://www.example.com, or https://subdomain.example.com/path/, for domain properties use format: sc-domain:example.com)

Inputs: site_url (required). Returns: result

delete_sitemapA
Delete (unsubmit) a sitemap from Google Search Console.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    sitemap_url: The full URL of the sitemap to delete

Inputs: site_url (required), sitemap_url (required). Returns: result

get_advanced_search_analyticsA
Get advanced search analytics data with sorting, filtering, and pagination.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    start_date: Start date in YYYY-MM-DD format (defaults to 28 days ago)
    end_date: End date in YYYY-MM-DD format (defaults to today)
    dimensions: Dimensions to group by, comma-separated (e.g., "query,page,device")
    search_type: Type of search results (WEB, IMAGE, VIDEO, NEWS, DISCOVER)
    row_limit: Maximum number of rows to return (max 25000)
    start_row: Starting row for pagination
    sort_by: Metric to sort by (clicks, impressions, ctr, position)
    sort_direction: Sort direction (ascending or descending)
    filter_dimension: Single filter dimension (query, page, country, device). Use 'filters' instead for multiple filters.
    filter_operator: Single filter operator (contains, equals, notContains, notEquals)
    filter_expression: Single filter expression value
    filters: JSON array of filter objects for AND logic across multiple dimensions. Overrides
             filter_dimension/filter_operator/filter_expression when provided. Each object must
             have 'dimension', 'operator', and 'expression' keys. Valid dimensions: query, page,
             country, device. Valid operators: contains, equals, notContains, notEquals.
             Example: [{"dimension":"country","operator":"equals","expression":"usa"},
                       {"dimension":"device","operator":"equals","expression":"MOBILE"}]
    data_state: Data freshness — "all" (default, matches GSC dashboard) or "final" (confirmed data only, 2-3 day lag)

Inputs: site_url (required), filters, sort_by, end_date, +10 more. Returns: result

get_capabilitiesA

Get a full list of all available tools, current auth status, and how to get started. ALWAYS call this first when asked what tools are available, what this server can do, or how to get started. Returns all tool names grouped by category in a single call — faster than searching individually. Also shows if authentication is needed.

Inputs: no named parameters. Returns: result

get_performance_overviewA
Get a performance overview for a specific property.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    days: Number of days to look back (default: 28)

Inputs: site_url (required), days. Returns: result

get_search_analyticsA
Get search analytics data for a specific property.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    days: Number of days to look back (default: 28)
    dimensions: Dimensions to group by (default: query). Options: query, page, device, country, date
               You can provide multiple dimensions separated by comma (e.g., "query,page")
    row_limit: Number of rows to return (default: 20, max: 500). Use 5-20 for quick overviews,
               50-200 for deeper analysis, up to 500 for comprehensive reports. For bulk exports
               beyond 500 rows, use get_advanced_search_analytics which supports pagination.

Inputs: site_url (required), days, row_limit, dimensions. Returns: result

get_search_by_page_queryA
Get search analytics data for a specific page, broken down by query.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    page_url: The specific page URL to analyze
    days: Number of days to look back (default: 28)
    row_limit: Number of rows to return (default: 20, max: 500). Use 5-20 for quick overviews,
               50-200 for deeper analysis, up to 500 for comprehensive reports. For bulk exports
               beyond 500 rows, use get_advanced_search_analytics which supports pagination.

Inputs: page_url (required), site_url (required), days, row_limit. Returns: result

get_site_detailsA
Get detailed information about a specific Search Console property.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.

Inputs: site_url (required). Returns: result

get_sitemap_detailsA
Get detailed information about a specific sitemap.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    sitemap_url: The full URL of the sitemap to inspect

Inputs: site_url (required), sitemap_url (required). Returns: result

get_sitemapsA
List all sitemaps for a specific Search Console property.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.

Inputs: site_url (required). Returns: result

inspect_url_enhancedB
Enhanced URL inspection to check indexing status and rich results in Google.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    page_url: The specific URL to inspect

Inputs: page_url (required), site_url (required). Returns: result

list_propertiesA
List all Google Search Console (GSC) properties and sites the user has access to.
Use this to see all verified sites, domain properties, and URL-prefix properties
in the connected Google Search Console account. Always call this first to get the
exact site_url needed for other tools.

Inputs: no named parameters. Returns: result

list_sitemaps_enhancedA
List all sitemaps for a specific Search Console property with detailed information.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    sitemap_index: Optional sitemap index URL to list child sitemaps

Inputs: site_url (required), sitemap_index. Returns: result

manage_sitemapsA
All-in-one tool to manage sitemaps (list, get details, submit, delete).

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    action: The action to perform (list, details, submit, delete)
    sitemap_url: The full URL of the sitemap (required for details, submit, delete)
    sitemap_index: Optional sitemap index URL for listing child sitemaps (only used with 'list' action)

Inputs: action (required), site_url (required), sitemap_url, sitemap_index. Returns: result

reauthenticateA

Perform a logout and new login sequence. Deletes the current OAuth token file and triggers the browser authentication flow. Useful when you need to switch to a different Google account.

Inputs: no named parameters. Returns: result

submit_sitemapA
Submit a new sitemap or resubmit an existing one to Google.

Args:
    site_url: Exact GSC property URL from list_properties (e.g. "https://example.com/" or
              "sc-domain:example.com"). Domain properties cover all subdomains — use the
              domain property as site_url and filter by page to analyze a specific subdomain.
    sitemap_url: The full URL of the sitemap to submit

Inputs: site_url (required), sitemap_url (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 20 tools

    Disambiguation2/5

    Multiple tools serve overlapping purposes: sitemap management has three tools (get_sitemaps, list_sitemaps_enhanced, manage_sitemaps) and URL inspection has three (batch_url_inspection, inspect_url_enhanced, check_indexing_issues). Search analytics tools also overlap, causing potential ambiguity.

    Naming Consistency2/5

    Naming pattern is inconsistent: some tools use verb_noun (add_site, delete_site, submit_sitemap) while others use get_X or other patterns (get_sitemaps, inspect_url_enhanced, batch_url_inspection). This mix reduces predictability.

    Tool Count3/5

    20 tools for a GSC server is near the upper bound of reasonableness. While the scope is broad, there is redundancy (e.g., manage_sitemaps duplicates individual sitemap tools) suggesting a leaner set would be more appropriate.

    Completeness3/5

    Covers core GSC areas (sites, sitemaps, search analytics, URL inspection) but lacks coverage reports (like index coverage or mobile usability). Some CRUD operations for sitemaps are duplicated rather than streamlined.

    Related MCP Connectors

    Related MCP Servers