
它通过官方API直接连接到你的谷歌搜索控制台账户,让你直接访问Claude Desktop、OpenAI Agents SDK等AI工具的关键数据。
概览
该项目提供了一个模型上下文协议(MCP)服务器,允许 Claude AI(通过 Claude 桌面应用)或其他平台与 Google Search Console API 交互。您可以使用它直接从您的 Claude 聊天(或其他平台)查询性能数据、检查 URL 、查询索引状态等。 你可以在X @metehan777关注我,访问我的博客https://metehan.ai 根据本项目允许的Google Search Console API端点: * 在您的Search Console账户中列出可访问的网站/属性。* 获取搜索表现数据(点击量、曝光量、点击率、排名),并带有多种筛选条件和维度。* 检查Google索引中特定URL的状态,检查其索引状态,并请求索引。* 列出提交的网站地图。* 获取整体网站表现摘要(基于搜索分析数据)。
概述(AI 翻译)
该项目提供了一个模型上下文协议(MCP)服务器,允许 Claude AI(通过 Claude 桌面应用)或其他平台与 Google Search Console API 交互。您可以使用它直接从您的 Claude 聊天(或其他平台)查询性能数据、检查 URL 、查询索引状态等。
你可以在X @metehan777关注我,访问我的博客https://metehan.ai
特色
根据本项目允许的Google Search Console API端点:
- 网站: 在您的搜索控制台账户中列出可访问的网站/属性。
- 搜索分析: 获取搜索表现数据(点击量、曝光量、点击率、位置),并带有多种筛选和维度。
- URL 检查: 检查 Google 索引中特定 URL 的状态,检查其索引状态,并请求索引。
- Sitemaps: 列出提交的网站地图。
- (助手) 获取整体网站表现摘要(来源于搜索分析数据)。
(注:超出URL检查API的索引覆盖细节和爬取错误通常不会通过谷歌搜索控制台API泄露。)
请点击这里查看Search Console API的功能和公告:https://developers.
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Google Search Console MCP Server
This project provides a Model Context Protocol (MCP) server that allows Claude AI (via the Claude Desktop app) or others to interact with the Google Search Console API. You can use it to query performance data, inspect URLs, check indexing status, and more, directly from your Claude chat (or others).
You can follow me on X @metehan777 and visit my blog https://metehan.ai
Features
Based on the available Google Search Console API endpoints allowed in this project:
- Sites: List accessible sites/properties in your Search Console account.
- Search Analytics: Fetch search performance data (clicks, impressions, CTR, position) with various filters and dimensions.
- URL Inspection: Inspect the status of a specific URL in the Google index, check its indexing status, and request indexing.
- Sitemaps: List submitted sitemaps for a site.
- (Helper) Get an overall site performance summary (derived from Search Analytics data).
(Note: Index coverage details and crawl errors beyond what’s available in the URL Inspection API are generally not exposed via the Google Search Console API.)
See the Search Console API capabilities & announcements here: https://developers.google.com/webmaster-tools/v1/api_reference_index
Prerequisites
- Python: Version 3.11 or higher.
- pip: Python package installer (usually comes with Python).
- Virtual Environment Tool:
venv(recommended, built into Python 3). - Google Account: With access to the Google Search Console properties you want to query.
- Claude Desktop App: Installed and running.
Setup Instructions
-
Clone or Download: Get the project files onto your local machine. If using git:
git clone https://github.com/metehan777/google-search-console-mcp.git cd search-console-mcp -
Create and Activate Virtual Environment: It’s highly recommended to use a virtual environment to manage dependencies.
# Create the virtual environment (using the name 'fresh_env' as in previous steps) python3 -m venv fresh_env # Activate the environment # On macOS/Linux: source fresh_env/bin/activate # On Windows: # .\fresh_env\Scripts\activate(You should see
(fresh_env)at the beginning of your terminal prompt) -
Install Dependencies: Install the required Python packages, including the project itself in editable mode.
pip install -e . -
Google Cloud Setup & Credentials:
- Enable API: Go to the Google Cloud Console and create a new project or select an existing one. Enable the “Google Search Console API” for your project.
- Create OAuth Credentials:
- Navigate to “APIs & Services” -> “Credentials”.
安装
npx -y @modelcontextprotocol/server-filesystem /Users/username/Desktop /Users/username/Downloads配置
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/Users/username/Downloads"
]
},
"google-search-console": {
"command": "/Users/username/Documents/search-console-mcp/fresh_env/bin/python3",
"args": [
"-m",
"main"
],
"cwd": "/Users/username/Cursor/search-console-mcp"
}
}
}