google-seo-mcp
Provides AI agents with hands-on control of Google SEO and analytics tools including Search Console, GA4, Tag Manager, Indexing API, and PageSpeed Insights, with self-configuring OAuth2.
README
<div align="center">
🔍 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
</div>
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_DELETEDnotifications - 📊 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
📦 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": "" }
}
}
}
<details> <summary>Or point at a local build</summary>
{
"mcpServers": {
"google-seo": {
"command": "node",
"args": ["F:/projects/google-seo-mcp/build/index.js"]
}
}
}
</details>
☁️ Google Cloud setup
- Open Google Cloud Console → APIs & Credentials
- Create an OAuth 2.0 Client ID → application type Desktop app
- Enable these APIs for the project:
- Google Search Console API · Indexing API · Analytics Admin API · Analytics Data API · Tag Manager API
- On the OAuth consent screen, add your Google account as a test user (while the app is in "Testing")
- 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
JobPostingorBroadcastEventstructured 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 withconfirm: true.
📄 License
MIT © skiddgoddamn
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。