Google Search Console MCP
Google Search Console MCP
English | Русский
A1 Google Search Console MCP 将 AI 应用连接到 Google Search Console。检查搜索效果、检查 URL 是否被索引、审阅站点地图,并在需要时主动提交或移除站点地图。
It works with properties your Google account can access. The important detail is that it uses the exact Search Console property value — a domain property and a URL-prefix property are different objects.
7个工具。 7个工具读取属性、搜索数据、站点地图和索引;2个添加属性或提交站点地图;3个可以删除数据或调用任意 API 方法。
精确的属性 ID。
https://example.com/、https://www.example.com/和sc-domain:example.com是不同的。list_sites显示要使用的值。搜索数据带上下文。 按日期、页面、URL、国家、设备或搜索外观查询点击次数、展示次数、点击率和位置。
索引,而非发布。 URL 检查解释 Google 的当前状态;它不会强制页面进入索引。
从一个只读的问题开始:
展示过去 28 天内我的属性点击量最高的 20 条搜索查询,同时显示点击次数和点击率。
一分钟上手
你:https://example.com/pricing 被索引了吗?如果没有,为什么?
谷歌搜索设备。 检查 URL 并显示索引判定、覆盖、抓取信息和 canonical 权威。不会改变任何东西。
你:检查我提交的站点地图,并为报错的那个准备重新提交。
搜索设备。 展示站点地图及其警告和错误,然后在再次提交前请求确认。
你:确认。
搜索引擎。 重新提交所选站点地图。它不会改变页面内容,也不保证能够被索引。
Related MCP server: mcp-gsc
目录
快速开始
需要 Node.js 20+、一个可以访问 Search Console 属性的 Google 账号,以及来自 Google Cloud 的 OAuth 凭证。
将服务端添加到你的 AI 应用中。
从上面的只读问题开始。
在应用中: 打开 设置 → 插件 → MCP 服务器,选择 添加服务器,然后添加 npx -y mcp-google-search-console@latest,并配上 GOOGLE_SEARCH_CONSOLE_CLIENT_ID、GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET 和 GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN。
codex mcp add google-search-console \
--env GOOGLE_SEARCH_CONSOLE_CLIENT_ID=your_client_id \
--env GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET=your_client_secret \
--env GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN=your_refresh_token \
-- npx -y mcp-google-search-console@latest
codex mcp listclaude mcp add \
--env GOOGLE_SEARCH_CONSOLE_CLIENT_ID=your_client_id \
--env GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET=your_client_secret \
--env GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN=your_refresh_token \
--transport stdio --scope user google-search-console \
-- npx -y mcp-google-search-console@latest
claude mcp list打开 设置 → 开发者 → 编辑配置,然后添加:
{"mcpServers":{"google-search-console":{"command":"npx","args":["-y","mcp-google-search-console@latest"],"env":{"GOOGLE_SEARCH_CONSOLE_CLIENT_ID":"your_client_id","GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET":"your_client_secret","GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN":"your_refresh_token"}}}}如果编辑配置不可用,在 macOS 上编辑 ~/Library/Application Support/Claude/claude_desktop_config.json,或在 Windows 上编辑 %APPDATA%\Claude\claude_desktop_config.json。
在 macOS/Linux 上添加到 ~/.cursor/mcp.json,或在 Windows 上添加到 %USERPROFILE%\.cursor\mcp.json:
{"mcpServers":{"google-search-console":{"type":"stdio","command":"npx","args":["-y","mcp-google-search-console@latest"],"env":{"GOOGLE_SEARCH_CONSOLE_CLIENT_ID":"your_client_id","GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET":"your_client_secret","GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN":"your_refresh_token"}}}}运行 MCP: 打开用户配置 并添加:
{"servers":{"google-search-console":{"type":"stdio","command":"npx","args":["-y","mcp-google-search-console@latest"],"env":{"GOOGLE_SEARCH_CONSOLE_CLIENT_ID":"${input:gsc_client_id}","GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET":"${input:gsc_client_secret}","GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN":"${input:gsc_refresh_token}"}}},"inputs":[{"type":"promptString","id":"gsc_client_id","description":"Google OAuth client ID"},{"type":"promptString","id":"gsc_client_secret","description":"Google OAuth client secret","password":true},{"type":"promptString","id":"gsc_refresh_token","description":"Google OAuth refresh token","password":true}]}用 MCP: List MCP Servers 查看。 VS Code MCP 文档
可以要求它做什么
查找搜索机会
这个月哪些查询和页面带来了最多收入?
哪些页面与上一期间相比丢失了收入?
显示包含
mcp且平均排名低于 10 的查询。
检查收录和站点地图状态
这个 URL 是否被索引?展示覆盖、抓取和 canonical 信息。
哪些已提交的站点地图有错误或警告?
先展示站点地图的当前状态,再重新提交。
谨慎管理属性
列出我可以访问的 Search Console 属性。
添加这一条精确属性;我会单独验证归属权。
确认后,从我的账号中删除此属性。
Search Console 属性的工作方式
URL 前缀属性必须包含协议和末尾斜杠,例如 https://example.com/。域属性写作 sc-domain:example.com。接近匹配会导致 403 或 404,因此请使用 list_sites 返回的精确值。
add_site 只注册属性。属性验证仍在 Search Console UI 或 Site Verification API 中完成。搜索数据使用太平洋时间;end_date 包含在内,最终分析数据通常滞后两到三天。data_state: "all" 可能包含更新的、仍在变化中的行。
什么会变化
操作 | 作用 | 确认边界 |
列出属性、分析、站点地图和 URL 用量 | 读取 Search Console 数据 | 无变化 |
添加属性 | 添加属性条目;不验证它 | 改变账号访问权限 |
提交或重新提交站点地图 | 请求处理站点地图 | 改变 Search Console 状态 |
删除属性 | 从账号中取消链接;Google 数据不会被删除 | 破坏性 |
删除站点地图 | 移除已提交的站点地图 | 破坏性 |
原始 API 请求 | 可能调用写入或删除端点 | 潜在破坏性 |
AI 客户端控制确认提示。服务端将读取、写入和破坏性操作标记出来,以便调用方区分检查与实际更改。
获取访问权限
Search Console 数据需要 Google OAuth 2.0;仅使用 API 密钥还不够。
创建或选择一个 Google Cloud 项目,并启用 Google Search Console API。
配置 OAuth 同意屏幕并创建 桌面应用 OAuth 客户端。
使用 OAuth 2.0 Playground 并使用 使用你自己的 OAuth 凭证,授权可以访问属性的 Google 账号并获取刷新令牌。
使用
https://www.googleapis.com/auth/webmasters来包括站点地图和属性更改。仅当你确实需要只读访问时,才使用https://www.googleapis.com/auth/webmasters.readonly。
测试模式下的刷新令牌可能在七天后过期。如需长期访问,请发布 OAuth 应用,或使用内部工作区应用。请将客户端密钥和刷新令牌视为密码。
配置
变量 | 必需 | 描述 |
| 是* | OAuth 客户端 ID。 |
| 是* | OAuth 客户端密钥。 |
| 是* | OAuth 刷新令牌。 |
| 是* | OAuth 三件套的短期替代方案。 |
| 否 | API 基础 URL 覆盖。 |
| 否 | 每次请求超时;默认 |
| 否 | 临时错误重试;默认 |
* 请提供 OAuth 三件套或一个访问令牌。
数据、限制和后台工作
隐私保护。 本地服务端调用 Google 并发送匿名遥测信息,包含安装 ID、版本和应用名称——绝不会发送 OAuth 令牌、产品数据、工具参数或提示词。设置
ASKADS_TELEMETRY=0可选择退出。API 限制。 URL 检查每个属性每天允许 2000 次、每分钟 600 次。分析接口每页最多返回 15,000 行;匿名长尾查询永远不会返回。请使用分页,并且永远不要逐 URL 读取整个站点。
无后台监控。 服务端仅在被调用时工作。如果你的 AI 应用支持计划任务,它可以定期检查站点地图或重要 URL。
技术文档
MCP 能力目录 — 每个工具的按任务区分页面。
支持
发现问题或需要某个场景?请创建 issue 或发送至 Telegram.
But wait: The source includes some paragraphs where the original English has a placeholder in Chinese? The given translation itself for the "Cursor" and get-config instructions, we must keep the code variables. We need to translate "VS Code" as "VS Code" (product? probably keep VS Code). The instruction says package/module/tool/function/argument names, so keep VS Code. "Cursor" product? Keep "Cursor" maybe. But also in Chinese text we can have "Cursor MCP 文档" maybe. Since it appears as link URL to Cursor docs, translate label as "Cursor". The text translated in the source as "在 macOS 或 Linux 上添加 ~/.cursor/mcp.json..." Good.
Other things: "Add" label "add" etc. Translate command words? Yes.
Need check headings "What can make change" from source "What can change" table etc.
Need ensure "Google Search Console MCP" heading? The source says "Google Search Console MCP". First heading is "Google Search Console MCP" with image alt "A1". Maybe product.
Need to decide on Chinese translation for "MCP" Keep "MCP" as known? Since MCP is a protocol and appears as function? If it's not a tool name, may translate as "MCP"? The instruction says keep product, project, org, repo names. MCP is not a product, it's Model Context Protocol. In Chinese, often "MCP 服务器" etc. We'll leave "MCP" in Latin inside translated text: "谷歌搜索控制台 MCP" versus "Google Search Console MCP"? Need exact product name? "Google Search Console" is the product. "MCP" maybe a suffix. I can leave "Google Search Console" in English? It could be read as a product name. We'll use "Google Search Console MCP" in heading? But "MCP" is three letters acronym, better leave as "MCP". We'll write: "# Google Search Console MCP" for the H1: "# <图片> Google Search Console MCP" - but the name "Google Search Console" is product, so keep. The heading "Google Search Console MCP" with alt image remains.
Use Chinese: "Google Search Console MCP" maybe "谷歌搜索控制台" is a translation, but product name; use original.
Okay, let's produce final.
Need preserve the pipe table, the alt text, quote code, bold, etc.
Translate the body. Some text in Chinese already? The prompt says from en-US to zh-CN, this is source English; we translate.
Let's## Google Search Console MCP
English | Русский
A1 Google Search Console MCP 将 AI 应用连接到 Google Search Console。检查搜索效果、检查 URL 是否被收录、检查 sitemap 以及必要时提交或删除 sitemap。
它适用于你的 Google 账号可以访问的属性。关键细节是,它使用精确的 Search Console 属性值 —— 域属性和 URL 前缀属性是不同的对象。
7 个工具。 7 个读取属性、搜索数据、sitemap 和索引的工具;2 个添加属性或提交 sitemap 的工具;3 个可以删除数据或调用任意 API 方法的工具。
精确的属性 ID。
https://example.com/、https://www.example.com/和sc-domain:example.com是不同的。list_sites会显示要使用的值。带上下文的搜索数据。 按日期、查询、URL、点击量、展示次数、点击率和位置查询结果。
索引,而非移除。 URL 检查会解释 Google 的当前状态;它不会强制页面进入索引。
从一个只读问题开始:
过去 28 天内,我的网站点击率最高的前 20 个查询,并带点击次数和点击率。
一分钟上手
你:
https://example.com/pricing是否已被索引?如果没有,为什么?助手:检查 URL 并显示索引判定、覆盖、抓取和 canonical 信息。页面不变,不改变任何东西。
你:检查我提交的 sitemap,并准备为报错的重新提交。
助手:显示 sitemap 及其警告和错误,然后要求确认后再提交。
你:确认。
助手:重新提交选中的 sitemap。它不会改变页面内容,也不保证抓取。
目录
快速开始 GETTING STARTED
快速开始
需要 Node.js 20+、一个能访问 Search Console 属性的 Google 账号,以及来自 Google Cloud 的 OAuth 凭证。
将服务端添加到你的 AI 应用。
从上面的只读问题开始。
在应用中: 打开 设置 → 插件 → MCP 服务器,选择 添加服务器,然后添加 npx -y mcp-google-search-console@latest,并填写 GOOGLE_SEARCH_CONSOLE_CLIENT_ID、GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET 和 GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN。
codex mcp add google-search-console \
--env GOOGLE_SEARCH_CONSOLE_CLIENT_ID=your_client_id \
--env GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET=your_client_secret \
--env GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN=your_refresh_token \
-- npx -y mcp-google-search-console@latest
codex mcp listclaude mcp add \
--env GOOGLE_SEARCH_CONSOLE_CLIENT_ID=your_client_id \
--env GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET=your_client_secret \
--env GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN=your_refresh_token \
--transport stdio --scope user google-search-console \
-- npx -y mcp-google-search-console@latest
claude mcp list打开 设置 → 开发者 → 编辑配置 并添加:
{"mcpServers":{"google-search-console":{"command":"npx","args":["-y","mcp-google-search-console@latest"],"env":{"GOOGLE_SEARCH_CONSOLE_CLIENT_ID":"your_client_id","GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET":"your_client_secret","GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN":"your_refresh_token"}}}}如果 编辑配置 不可用,在 macOS 上编辑 ~/Library/Application Support/Claude/claude_desktop_config.json,或在 Windows 上编辑 %APPDATA%\Claude\claude_desktop_config.json。
在 macOS 或 Linux 上添加到 ~/.cursor/mcp.json,或在 Windows 上添加到 %USERPROFILE%\.cursor\mcp.json:
{"mcpServers":{"google-search-console":{"type":"stdio","command":"npx","args":["-y","mcp-google-search-console@latest"],"env":{"GOOGLE_SEARCH_CONSOLE_CLIENT_ID":"your_client_id","GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET":"your_client_secret","GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN":"your_refresh_token"}}}}运行 MCP: 打开用户配置 并添加:
{"servers":{"google-search-console":{"type":"stdio","command":"npx","args":["-y","mcp-google-search-console@latest"],"env":{"GOOGLE_SEARCH_CONSOLE_CLIENT_ID":"${input:gsc_client_id}","GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET":"${input:gsc_client_secret}","GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN":"${input:gsc_refresh_token}"}}},"inputs":[{"type":"promptString","id":"gsc_client_id","description":"Google OAuth client ID"},{"type":"promptString","id":"gsc_client_secret","description":"Google OAuth client secret","password":true},{"type":"promptString","id":"gsc_refresh_token","description":"Google OAuth refresh token","password":true}]}使用 MCP: List MCP Servers 检查。VS Code MCP 文档
能请它做什么
查找机会
最近一个月哪些查询和网页带来了最多收入?哪些查询和网页?
哪些网页相比上一周期失去了点击?
显示包含
稳定稳定排名低于 10 的查询,定点 在 10 以下。
检查收录状况和 sitemap / Check indexing and sitemaps
这个 URL 是否已被索引?展示覆盖、抓取和有关 canonical 的信息。
我提交的 sitemap 中哪些有错误或警告?* 先展示该 sitemap 的当前状态,再重新提交。
谨慎管理属性
列出我可以访问的 Search Console 属性。* 列出这一条精确属性;我会单独验证所有权。* 确认后,从我的账号中删除此属性。
Search Console 属性的配置
URL 前缀属性必须包含协议和尾部斜杠,例如 https://example.com/。域属性写为 sc-domain:example.com。附近匹配会导致 403 或 404,所以请使用 list_sites 返回的精确值。
add_site 只是注册了一个属性。所有权验证仍在 Search Console UI 或 Site Verification API 中完成。搜索数据使用太平洋时间;end_date 是包含的,最终的分析数据通常滞后两到三天。data_state: "all" 可能包含更新的、仍在持续变化的行。
哪些数据会变化
操作 | 作用与行为 | 确认边界 |
列出属性、分析、sitemap 和 URL 使用情况 | 读取 Search Console 数据 | 无变化 |
添加属性 | 添加属性条目;不验证它 | 更改账号访问权限 |
提交或重新提交 sitemap | 请求处理 sitemap | 更改 Search Console 状态 |
删除属性 | 从账号中取消关联;Google 数据不会被删除 | 破坏性 |
删除 sitemap | 移除已提交的 sitemap | 破坏性 |
原始 API 请求 | 可能调用写入或删除端点 | 潜在破坏性 |
AI 代理可能控制,随答应再确认提示。服务端将向用户发出,或者将其操作标记为读取、写入或破坏性,从而区分“检查”与“真正更改”。
获取访问权限
Search Console 数据需要 Google OAuth,凭证不够,还需要 API 密钥,仅靠 API 密钥是不够的~~。
创建或选择一个 Google Cloud 项目,并启用 Google Search Console API。
配置 OAuth 同意屏幕,并创建桌面应用 OAuth 客户端。
使用 OAuth 2.0 Playground 并选择 使用你自己的 OAuth 凭证 授权能够访问这些属性的 Google 账号,并获取刷新令牌。
使用
https://www.googleapis.com/auth/webmasters来支持 sitemaps 和属性更改。仅当你确实需要只读访问时,才使用https://www.googleapis.com/auth/webmasters.readonly。
测试模式令牌可能七天后过期。对于长期访问,请发布 OAuth 应用,或使用内部 Workspace 应用。请将客户端密钥和刷新令牌视为密码。
配置
变量 | 要求 | 描述 |
| 是* | 您也可以访问您的 OAuth 客户端 ID。 |
| 是* | OAuth 客户端密码。 |
| 是* | OAuth 刷新令牌。 |
| 是* | OAuth 三元组的短期替代方案。 |
| 否 | API 地址覆盖。 |
| 否 | 单个请求超时;默认 |
| 否 | 临时错误重试次数;默认 |
* 请提供 OAuth 三元组或访问令牌。
数据、限制和后台工作
隐私保护。 本地服务端会调用 Google,并发送匿名遥测数据,包括安装 ID、版本和应用名称——绝不会发送 OAuth 令牌、站点数据、工具参数正文或提示词。设置
ASKADS_TELEMETRY=0可选择退出。API 限制。 URL 检查每个资源(property)有 2000 次的日配额,和 600 次千次/分钟配额。Analytics 每个请求最多返回 25,000 行;匿名长尾查询永远不会返回。请使用分页,永远不要按 URL 逐个站点读取。
无后台监控。 服务端仅在调用时工作。如果你的 AI 应用支持定时任务,它可以定期检查 sitemap 或重要 URL。
技术文档
MCP 能力目录 —— 针对每个工具的按任务页面。
支持
Maintenance
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP Server that provides access to Google's Search Console API, allowing users to interact with website search performance data and manage search presence through natural language.
- AlicenseNot gradedqualityAmaintenanceMCP server for Google Search Console, enabling querying search analytics, URL inspection, sitemap management, and more via natural language.2671MIT
- AlicenseNot gradedqualityDmaintenanceThis MCP server provides LLMs with programmatic access to Google Search Console data and functionality, including search analytics, sitemap management, site management, and URL inspection.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that exposes the Google Search Console API, allowing LLMs to query SEO data, inspect URLs, manage sitemaps, and analyze search performance via natural language.63MIT
Related MCP Connectors
MCP server for Google search results via SERP API
Serper MCP — wraps the Serper Google Search API (serper.dev)
SEO MCP server: crawl your site, find AI-visibility gaps, and ship the fix from your coding agent.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-google-search-console'
If you have feedback or need assistance with the MCP directory API, please join our Discord server