Skip to main content
Glama
google-seo-mcp

google-seo-mcp

by skiddgoddamn

๐Ÿ” google-seo-mcp

Full Google SEO & analytics stack for AI agents โ€” over one MCP server.

Search Console ยท Indexing API ยท GA4 (Admin + Data) ยท Tag Manager ยท PageSpeed Insights

npm version npm downloads node license MCP


A Model Context Protocol server that gives Claude (and any MCP client) hands-on control of the Google SEO and analytics stack โ€” list and claim properties, query search performance, submit URLs for indexing, spin up GA4 properties and data streams (i.e. install the measurement tag), wire up Tag Manager, and run PageSpeed audits. Ships with self-configuring OAuth2: no tokens at launch โ€” the agent walks through authorization with built-in tools.

โœจ Highlights

  • ๐Ÿ”Ž Search Console โ€” properties, sitemaps, search analytics, URL inspection

  • โšก Indexing API โ€” push URL_UPDATED / URL_DELETED notifications

  • ๐Ÿ“Š GA4 โ€” create properties & web data streams (get the Measurement ID), run reports & realtime

  • ๐Ÿท๏ธ Tag Manager โ€” accounts, containers, workspaces, tags

  • ๐Ÿšฆ PageSpeed Insights โ€” Core Web Vitals + Lighthouse, no OAuth needed

  • ๐Ÿ” Self-configuring OAuth2 โ€” loopback code capture + auto-refresh, stored locally

  • ๐Ÿ›ก๏ธ Safety rails โ€” read-only mode and per-call confirm guards

Related MCP server: Google Search Console MCP Server

๐Ÿ“ฆ Installation

Run straight from npm with npx (no install needed), or build from source:

# from source
git clone https://github.com/skiddgoddamn/google-seo-mcp
cd google-seo-mcp
npm install && npm run build

๐Ÿ”Œ Connect to your MCP client

Add to your MCP config (e.g. ~/.claude.json or claude_desktop_config.json):

{
  "mcpServers": {
    "google-seo": {
      "command": "npx",
      "args": ["-y", "google-seo-mcp"],
      "env": { "GOOGLE_PSI_API_KEY": "" }
    }
  }
}
{
  "mcpServers": {
    "google-seo": {
      "command": "node",
      "args": ["F:/projects/google-seo-mcp/build/index.js"]
    }
  }
}

โ˜๏ธ Google Cloud setup

  1. Open Google Cloud Console โ†’ APIs & Credentials

  2. Create an OAuth 2.0 Client ID โ†’ application type Desktop app

  3. Enable these APIs for the project:

    • Google Search Console API ยท Indexing API ยท Analytics Admin API ยท Analytics Data API ยท Tag Manager API

  4. On the OAuth consent screen, add your Google account as a test user (while the app is in "Testing")

  5. Keep the Client ID and Client Secret handy

๐Ÿ”‘ Authorize (self-setup)

No tokens needed at startup โ€” run these tools from your agent, in order:

Step

Tool

What happens

1

g_set_credentials

Save your OAuth Client ID + Client Secret

2

g_authorize

Opens Google's consent screen and captures the code via a local loopback server

โ†ณ

g_set_code

Headless fallback โ€” paste the code + redirect URI manually

โœ“

g_auth_status

Check what's configured and whether the token is valid

The refresh token is saved to ~/.google-seo-mcp/config.json and reused (and auto-refreshed) on every run.

โš™๏ธ Environment variables

Variable

Default

Description

G_READONLY

false

Block every mutating tool (_add _create _update _delete _submit _set)

G_CONFIRM

false

Require a confirm=true argument on mutating calls

G_LOG_LEVEL

INFO

DEBUG ยท INFO ยท WARNING ยท ERROR

G_LOG_BODIES

false

Log request/response bodies to stderr (verbose)

G_LOG_FILE

โ€”

Append log lines to a file (default: stderr only)

GOOGLE_MCP_CONFIG_DIR

~/.google-seo-mcp

Override the config directory

GOOGLE_PSI_API_KEY

โ€”

PageSpeed Insights key; anonymous (rate-limited) if unset

See .env.example for a ready-to-copy template.

๐Ÿงฐ Tool reference

๐Ÿ” Auth โ€” g_

Tool

Description

g_auth_status

Show OAuth configuration status and token validity

g_set_credentials

Save OAuth client_id and client_secret

g_authorize

Open the consent screen via loopback and store the refresh token

g_set_code

Manually exchange an authorization code for a refresh token

๐Ÿ”Ž Search Console โ€” gsc_

Tool

Description

gsc_sites_get

List all Search Console properties

gsc_site_get

Get a single property and your permission level

gsc_site_add

Add (claim) a property

gsc_site_delete

Remove a property

gsc_sitemaps_get

List submitted sitemaps

gsc_sitemap_get

Get a sitemap's status

gsc_sitemap_submit

Submit a sitemap

gsc_sitemap_delete

Delete a sitemap

gsc_search_analytics

Clicks / impressions / CTR / position by query, page, country, device, date

gsc_url_inspect

Index status, coverage, mobile usability, rich results

โšก Indexing API โ€” idx_

Tool

Description

idx_url_submit

Notify Google a URL was added/updated (URL_UPDATED)

idx_url_delete

Notify Google a URL was removed (URL_DELETED)

idx_metadata

Latest indexing-notification metadata for a URL

โ„น๏ธ The Indexing API is officially eligible only for pages with JobPosting or BroadcastEvent structured data. Other URLs may be ignored.

๐Ÿ“Š GA4 โ€” ga4_

Tool

Description

ga4_accounts_get

List Analytics accounts

ga4_properties_get

List properties under an account

ga4_property_get

Get a property

ga4_property_create

Create a GA4 property

ga4_datastreams_get

List a property's data streams

ga4_datastream_create

Create a web data stream โ†’ returns the Measurement ID

ga4_datastream_get

Get a data stream

ga4_run_report

Run a report (metrics + dimensions over a date range)

ga4_realtime

Run a realtime report

๐Ÿท๏ธ Tag Manager โ€” gtm_

Tool

Description

gtm_accounts_get

List GTM accounts

gtm_containers_get

List containers under an account

gtm_container_create

Create a container โ†’ returns its GTM-ID

gtm_workspaces_get

List workspaces of a container

gtm_tags_get

List tags in a workspace

gtm_tag_create

Create a tag in a workspace

๐Ÿšฆ PageSpeed Insights โ€” psi_

Tool

Description

psi_run

Analyze a URL โ€” Core Web Vitals + Lighthouse (no OAuth required)

๐Ÿ›ก๏ธ Safety rails

  • G_READONLY=true โ€” blocks every tool whose name contains _add _create _update _delete _submit _set. Reads still work.

  • G_CONFIRM=true โ€” mutating tools return a preview and require a follow-up call with confirm: true.

๐Ÿ“„ License

MIT ยฉ skiddgoddamn

Available Tools

17 tools
ga4_datastream_createA

GA4 Admin: create a WEB data stream (returns the Measurement ID / tag โ€” i.e. installs the GA4 counter).

Inputs: default_uri (required), property_id (required), display_name (required).

ga4_datastreams_getB

GA4 Admin: list data streams of a property.

Inputs: property_id (required).

ga4_property_createB

GA4 Admin: create a new GA4 property under an account.

Inputs: time_zone (required), account_id (required), display_name (required), currency_code.

gsc_site_addC

Search Console: add (claim) a property.

Inputs: site_url (required).

gsc_site_deleteB

Search Console: remove a property from the account.

Inputs: site_url (required).

gsc_site_getA

Search Console: get one property and the user's permission level.

Inputs: site_url (required).

gsc_sitemaps_getB

Search Console: list submitted sitemaps for a property.

Inputs: site_url (required).

gsc_sites_getA

Search Console: list all properties for the user.

Inputs: no named parameters.

g_set_codeA

Manual fallback: paste an authorization code obtained by opening the authorize_url with a known redirect_uri (for headless machines).

Inputs: code (required), redirect_uri (required).

g_set_credentialsB

Save the Google OAuth app client_id and client_secret. Create a 'Desktop app' OAuth client at https://console.cloud.google.com/apis/credentials and enable the Search Console, Indexing, Analytics Admin/Data, Tag Manager APIs.

Inputs: client_id (required), client_secret (required).

gtm_accounts_getB

Tag Manager: list GTM accounts.

Inputs: no named parameters.

gtm_container_createC

Tag Manager: create a container (returns its GTM-ID).

Inputs: name (required), account_id (required), usage_context.

gtm_containers_getC

Tag Manager: list containers under an account.

Inputs: account_id (required).

gtm_tag_createC

Tag Manager: create a tag in a workspace. Pass the raw GTM tag object (type + parameters).

Inputs: tag (required), account_id (required), container_id (required), workspace_id (required).

gtm_tags_getC

Tag Manager: list tags in a workspace.

Inputs: account_id (required), container_id (required), workspace_id (required).

gtm_workspaces_getC

Tag Manager: list workspaces of a container.

Inputs: account_id (required), container_id (required).

psi_runA

PageSpeed Insights: analyze a URL (Core Web Vitals + Lighthouse). No OAuth needed; uses GOOGLE_PSI_API_KEY if set.

Inputs: url (required), locale, category, strategy.

Tool Schema Changelog

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

Loading tool schema changelogโ€ฆ

    TDQS

    B3.4/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool targets a distinct service and action. For example, gtm_tag_create is clearly different from gsc_sites_get, and the descriptions remove any ambiguity. There is no overlap in functionality.

    Naming Consistency3/5

    Most tools follow a 'service_operation' pattern (e.g., gtm_tag_create, ga4_property_create), but 'g_set_credentials' and 'g_set_code' deviate with a 'g_' prefix. 'psi_run' also breaks the pattern. This inconsistency could confuse an agent.

    Tool Count5/5

    With 17 tools across multiple Google services (Search Console, GA4, Tag Manager, PageSpeed), the count is appropriate. Each tool serves a clear purpose, and the number is neither too small nor too large for the scope.

    Completeness3/5

    The tools cover basic CRUD for Search Console and GA4 setup, but lack update/delete for tags, sitemap submission, and Analytics Data API reporting. Some lifecycle operations are missing, which may require workarounds.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to manage Google Tag Manager, Google Search Console, and Google Analytics (GA4) through unified access to tags, search performance data, URL inspection, sitemaps, and analytics reporting.
      7 npm
      ISC
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to query Google Search Console data including search analytics, URL inspection, sitemap management, and site performance monitoring, with per-user OAuth authentication.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to access Google Search Console search performance and index health data, including clicks, impressions, rankings, URL inspection, and sitemap management.
      32 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to query and analyze Google Search Console data, including search analytics, URL inspection, sitemaps, and property verification, and to perform actions like submitting sitemaps and adding properties through natural language.
      19
      24 npm
      1
      MIT