
Mcp Gsc
io.github.pijusz由 GitHub 账号 pijusz 发布v0.1.7更新于 Oct 24, 2026
Google Search Console MCP server — query performance, sitemaps, indexing & more
概览
本地 MCP 服务器,让助手连接 Google Search Console,查询搜索表现、检查网址收录、管理站点地图并生成 SEO 报告。
- 可以做什么
- 列出资源属性,并显示每个属性的验证、所有权和权限信息。按查询词、页面、国家、设备、日期和搜索类型查询搜索分析数据,并可导出为 CSV。列出并查看站点地图的状态、已收录数量和错误。检查单个网址或最多 10 个网址的收录状态、抓取信息和规范网址。可选的扩展工具提供周期对比、涨跌最大项、快速见效机会、关键词自相竞争、点击率异常、内容衰退和每周 SEO 报告。可选的写入工具可添加或删除站点、提交或删除站点地图,并请求编入索引。
- 适用场景
- 适合需要处理 Google Search Console 数据、希望用自然语言让助手回答 SEO 问题的场景,例如热门查询词、收录检查、站点地图健康状况、周期对比或定期 SEO 报告。
- 运行要求
- 通过 npx(Node 22+)或 Bun 在本地运行。需要 Google Cloud Console 中启用 Search Console API 后生成的 OAuth 客户端凭据或服务账号密钥,通过 GOOGLE_GSC_CREDENTIALS_PATH 传入。首次需运行 setup 命令,在浏览器中完成 OAuth 授权并缓存刷新令牌。需要访问 Google API 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Gsc,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-gsc
Google Search Console MCP server — query search analytics, inspect URLs, manage sitemaps & more via natural language.
Built with Bun + TypeScript. Works with Claude, Cursor, and any MCP client.
Quick Start
1. Get Credentials
You need OAuth client credentials from Google Cloud Console.
-
Go to Google Cloud Console
-
Create a project (or select existing)
-
Enable the Google Search Console API:
- APIs & Services → Library → search "Google Search Console API" → Enable
-
Configure OAuth consent screen (if not done):
- APIs & Services → OAuth consent screen → External
- Fill in app name + your email, add scope
https://www.googleapis.com/auth/webmasters
-
Create credentials:
- APIs & Services → Credentials → Create Credentials → OAuth client ID
- Application type: Desktop app (allows localhost redirects automatically)
- Download the JSON file
-
Set the credentials path:
- Run setup to authorize:
This opens your browser for OAuth consent, saves a refresh token, verifies access to your GSC properties, and prints config snippets for your MCP client.
2. Add to Claude Code
That's it. Restart Claude Code and the tools are available.
Also works with
bunx mcp-gsc@latestif you have Bun. Requires Node 22+ when running vianpx.
Claude Desktop / Cursor
Add to your claude_desktop_config.json:
Codex CLI
Add to ~/.codex/config.toml (TOML, not JSON):
Codex defaults to a 10s startup timeout, which is often too short for a cold
npxfetch. Bumpstartup_timeout_sec(30 is safe) or install the package globally (npm i -g mcp-gsc) and usecommand = "mcp-gsc"instead.
Service Account (alternative)
For server-to-server auth without browser-based OAuth:
- Create a service account in Google Cloud Console
- Download the JSON key file
- In Google Search Console, add the service account email as a user for each property
- Point
GOOGLE_GSC_CREDENTIALS_PATHto the key file — auth type is auto-detected
Tools (25)
Core Tools (always available)
Sites
Search Analytics
Dimensions: query, page, country, device, date, searchAppearance, hour
Types: web, image, video, news, discover, googleNews
Note: searchAppearance cannot combine with query or page. hour requires data_state="hourly_all" (last 10 days only). Country codes are ISO 3166-1 alpha-3 (usa, gbr, deu).
Sitemaps
URL Inspection
Rate limits: 600/minute + 2,000/day per site (tracked automatically).
Export
Extended Tools (disabled by default)
Enable with GOOGLE_GSC_ENABLE_EXTENDED_TOOLS=true:
Reporting Suite
SEO Suite
Technical SEO Suite
Write Tools (disabled by default)
Enable with GOOGLE_GSC_ENABLE_WRITES=true:
Indexing API prerequisites. The last two use a different Google API to the rest of this server, so they need three things the other tools don't:
- Re-run
mcp-gsc setup— credentials created before this feature lack theauth/indexingscope. The tools say so explicitly if yours do.- Enable the Indexing API on your Google Cloud project — console.cloud.google.com/apis/library/indexing.googleapis.com
- Be a verified owner of the property in Search Console. Full-user access is not enough.
Google officially supports the Indexing API only for pages carrying
JobPostingorBroadcastEventstructured data, with a default quota of 200 URLs/day. It requests a crawl — it never guarantees indexing.
Configuration
Property resolution: You can pass bare domains like example.com — the server auto-resolves to sc-domain:example.com or https://example.com/ by matching against your verified properties.
Examples
Ask your AI assistant:
- "Show me my top 10 queries this month"
- "Find quick wins for example.com"
- "Which pages have declining traffic over the last 3 months?"
- "Check if these URLs are indexed: url1, url2, url3"
- "Compare this week's performance to last week"
- "Export all search analytics data to CSV for the last 28 days"
- "Run a weekly SEO report for my site"
- "Find keyword cannibalization issues"
Future Tool Ideas
- Content gap analysis (requires competitor data integration)
- Core Web Vitals integration (via PageSpeed Insights API)
- Multi-property comparison
- Search appearance deep analysis
- Integration with Google Analytics for conversion data
- Automated reporting schedules
Updates
Using npx @latest (recommended): You always get the latest version.
Using a binary: The server checks for new releases on startup and logs to stderr if outdated.
Development
Requires Bun.
License
MIT
来源:README.md,提交 4b24854
工具
0版本历史
1- v0.1.7最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分