很棒的gsc mcp
最强大的谷歌搜索控制台MCP服务器——像SEO专业人员一样分析数据,提供基准、建议和可操作的见解。
](https://www.npmjs.com/package/awesome-gsc-mcp)  ](https://nodejs.org/)
______________________________________________________________________
演示
只需让它分析你的谷歌搜索控制台。
Ask Claude to analyze your Search Console data
Here's a sample result
______________________________________________________________________
特性
- 27工具 涵盖Google Search Console各个方面的7个类别
- 智能分析引擎 具有CTR基准、趋势检测、查询意图分类、机会评分和推荐引擎
- 内存缓存 用于快速重复查询
- 速率限制 (20个请求/秒,突发30个)保持在API配额内
- 双重运输 --stdio(默认)和HTTP用于灵活集成
- 自动检测身份验证 --服务帐户、OAuth或自动检测
credentials.json
______________________________________________________________________
安装和设置
1.获取谷歌凭据
- Enable the Search Console API
启用 搜索控制台API
- Create credentials
- 首选 您创建的项目
- 点击侧栏中的凭据
- 创建服务帐户,随便命名,单击继续
- 打开服务帐户
- 点击 钥匙 标签
- 点击 添加密钥>创建新密钥 并选择JSON。将其保存在熟悉的地方,并尝试将其重命名为可搜索的内容(例如。
awesome-gsc-service-account.json)
- Grant access
- 打开 Google搜索控制台
- 首选 设置>用户和权限
- 将服务帐户电子邮件添加为 所有者 或 满的
2.配置您的客户端
你快做完了。现在,我们将参考您在步骤4(创建凭据)中下载的JSON文件。
克劳德代码
claude mcp add awesome-gsc -- npx -y awesome-gsc-mcp \
-e GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json提示: 找不到您的密钥文件?运行此命令以定位它: ``bash claude -p "find the path of most recently downloaded .json file in ~/Desktop, ~/Documents, and ~/Downloads" ``Claude Desktop
将整个块粘贴到终端中,按Enter键,然后重新启动Claude Desktop。
cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json
Cursor
配置文件: `.cursor/mcp.json` 在项目根目录中(或 `~/.cursor/mcp.json` 全球)
{ "mcpServers": { "awesome-gsc": { "command": "npx", "args": ["-y", "awesome-gsc-mcp"], "env": { "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service-account-key.json" } } } }
Windsurf
配置文件: `~/.codeium/windsurf/mcp_config.json`
{ "mcpServers": { "awesome-gsc": { "command": "npx", "args": ["-y", "awesome-gsc-mcp"], "env": { "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service-account-key.json" } } } }
Troubleshooting
|错误|修复|
| --- | --- |
| `401 Token has been expired or revoked` |删除 `~/.awesome-gsc-mcp/token.json` 并重新授权|
| `403 User does not have sufficient permission` |将服务帐户电子邮件添加为 **所有者** 在搜索控制台> [设置>用户和权限](https://search.google.com/search-console/users) |
| `403 Forbidden` 使用OAuth |在Google Cloud Console>OAuth同意屏幕中将自己添加为测试用户,或发布应用程序|
| `Could not load the default credentials` |检查一下 `GOOGLE_APPLICATION_CREDENTIALS` 指向有效的密钥文件|
______________________________________________________________________
## 工具参考
All 27 tools organized by category
### 物业管理(4个工具)
|工具|说明|
| --- | --- |
| `list_properties` |列出经过身份验证的帐户可访问的所有Search Console属性|
| `get_property_details` |获取特定房产的详细信息|
| `add_property` |将新站点添加到搜索控制台|
| `delete_property` |从Search Console中删除网站|
### 性能和流量(6个工具)
|工具|说明|
| --- | --- |
| `get_search_analytics` |使用灵活的参数(维度、过滤器、日期范围)查询原始搜索分析数据|
| `get_performance_summary` |高级性能概述,具有自动逐期比较功能|
| `compare_periods` |并排比较两个自定义日期段之间的搜索性能|
| `get_top_queries` |点击率基准分析的热门搜索查询|
| `get_top_pages` |点击率分析和建议的首页|
| `get_traffic_by_device` |按设备类型(台式机、移动设备、平板电脑)划分的流量细分,具有移动优先的见解|
### 智能机会分析(5个工具)
|工具|说明|
| --- | --- |
| `find_quick_wins` |寻找“桌面上的金钱”SEO机会:点击率差距、几乎1岁的查询、快速获得位置|
| `find_declining_content` |通过根本原因诊断查找丢失流量的页面和查询|
| `find_ctr_opportunities` |点击率明显低于基准的页面,并附有针对具体职位的建议|
| `find_content_gaps` |内容创建机会:主页排名查询、零点击查询、新兴查询|
| `find_what_to_build_next` |基于意图的内容规划:按主题集群分组的问题、比较、问题、购买信号|
### URL检查和索引(3个工具)
|工具|说明|
| --- | --- |
| `inspect_url` |检查URL的索引状态、爬网信息、移动可用性和丰富结果|
| `batch_inspect_urls` |在一次调用中检查多个URL|
| `check_indexing_issues` |识别您网站上常见的索引问题|
### 网站地图管理(4个工具)
|工具|说明|
| --- | --- |
| `list_sitemaps` |列出为物业提交的所有站点地图|
| `get_sitemap_details` |获取特定站点地图的详细信息|
| `submit_sitemap` |向Search Console提交新的站点地图|
| `delete_sitemap` |从Search Console中删除站点地图|
### 查询智能(3个工具)
|工具|说明|
| --- | --- |
| `analyze_query_landscape` |意向分布、品牌与非品牌拆分、仓位桶分析|
| `find_new_queries` |发现时段之间出现的真正新的查询|
| `find_cannibalization` |查找竞争同一查询的多个页面|
### 综合报告(2个工具)
|工具|说明|
| --- | --- |
| `weekly_seo_report` |完整的每周SEO绩效报告,包括趋势、热门因素和建议|
| `seo_health_check` |全面的健康检查,包括字母等级和优先行动项目|
______________________________________________________________________
## 用例和示例提示
一旦连接到克劳德,尝试这些自然语言提示。按原样复制其中任何一个。
### 入门指南
List all my Search Console properties
How is example.com doing this month?
Give me a performance summary for the last 3 months
### 流量与性能分析
What are my top 20 queries by clicks?
Show me traffic breakdown by device
Compare this month's performance vs last month
What are my top pages for mobile traffic?
Show me search performance for image search
### 寻找速赢和机会
Find quick win SEO opportunities for my site
Which pages have CTR below benchmarks?
Find pages that are almost on page 1 of Google
What queries could I get more clicks from with better titles?
### 内容战略与规划
What content should I create next?
What questions are people searching that I should answer?
Find content gaps — queries ranking on my homepage that need dedicated pages
Show me new and emerging queries in the last month
What comparison and "best of" queries is my site appearing for?
### 诊断问题
Which pages are losing traffic and why?
Find keyword cannibalization issues
Are there any indexing issues on my top pages?
Inspect the URL example.com/blog/my-post for indexing problems
Which of my pages are not indexed?
### 网站地图和索引
List all my submitted sitemaps
Submit my new sitemap at example.com/sitemap.xml
Check indexing status for my top 50 pages
Batch inspect these URLs: [url1, url2, url3]
### 报告和健康检查
Generate a weekly SEO report
Run a full SEO health check and give me a grade
What are the top 5 things I should fix on my site right now?
______________________________________________________________________
## 分析引擎
Built-in SEO analysis beyond raw data
服务器通过内置的分析引擎超越了原始数据:
- **CTR基准** --按职位将您的点击率与行业平均基准进行比较。标记表现不佳的页面,并估计您可以获得多少额外点击。
- **趋势检测** --分析时间序列数据,以检测查询和页面中的上升、下降或稳定趋势。
- **查询分类** --按用户意图(信息、调查、事务、导航、解决问题)和子类型(操作、比较、审查、错误/修复等)对查询进行分类。
- **机会评分** --根据流量影响潜力、印象、点击率差距、位置接近度和交易量对每个机会进行评分。
- **推荐引擎** --根据您的房产中发现的数据模式生成具体的、有优先级的建议。
______________________________________________________________________
## API限制
What's not available through the API
Google搜索控制台API具有已知的局限性。以下数据为 **不可用** 通过API,因此不由该服务器提供:
- **核心网页指标** --页面体验和性能指标
- **爬行统计信息** --爬网请求、响应时间、主机状态
- **手动操作** --处罚和安全问题
- **链接报告** --内部和外部链接数据
- **去除** --URL删除请求
- **丰富的结果** --详细的丰富结果报告(基本信息可通过URL检查获得)
这些报告仅在Search Console web界面中可用。
______________________________________________________________________
## HTTP传输
Using HTTP instead of stdio
对于更喜欢HTTP而不是stdio的环境,请使用以下命令启动服务器 `--http` 标志:
npx awesome-gsc-mcp --http
默认情况下,服务器在端口3000上侦听。用覆盖 `PORT` 环境变量:
PORT=8080 npx awesome-gsc-mcp --http
终点:
|路径|方法|描述|
| --- | --- | --- |
| `/mcp` |POST |MCP协议端点(可流式HTTP传输)|
| `/health` |GET |健康检查--返回 `{"status":"ok","auth":"..."}` |
______________________________________________________________________
## 常见问题解答
Common questions
**GSC数据多久更新一次?**
Search Console数据通常会延迟2-3天。对于已确定的最终数字,通过 `dataState: 'final'` 在您的搜索分析查询中。随着谷歌处理数据,最近2-3天的数据可能仍会发生变化。
**利率限制是什么?**
服务器内置了每秒20个请求的速率限制,突发允许为30。谷歌搜索控制台API也有自己的每日配额-检查您的 [谷歌云控制台配额页面](https://console.cloud.google.com/apis/api/searchconsole.googleapis.com/quotas) 如果你达到了极限。
**我可以使用多个网站吗?**
对。使用 `list_properties` 要查看所有可访问的站点,请指定 `siteUrl` 任何工具中的参数都可以针对特定属性。
**域属性是如何工作的?**
域属性使用 `sc-domain:example.com` 格式。这涵盖了所有子域和协议。URL前缀属性使用完整的URL,如 `https://www.example.com/`.
**哪些数据不能通过API获得?**
请参阅 [API限制](#api-limitations) 部分。核心Web重要信息、爬网统计信息、链接、手动操作和删除仅在Search Console Web界面中可用。
______________________________________________________________________
## 发展
Build, test, and run locally
Install dependencies
npm install
Build
npm run build
Run tests
npm test
Development mode (watch + rebuild)
npm run dev
Type check
npm run lint
Start locally (stdio)
npm start
Start locally (HTTP)
npm start -- --http
______________________________________________________________________
## 许可证
[麻省理工学院](LICENSE)