这是一个提供 Google Search Console API 的 MCP 服务器,可无缝集成到 n8n 工作流中的 MCP 客户端节点,为您的搜索数据管理带来便利。
本服务器可提供 Google Search Console API,用于 n8n 工作流中的 MCP 客户端节点。以下是使用该服务器的基本步骤。
git clone https://github.com/yourusername/google-search-console-mcp.git
cd google-search-console-mcp
python3 -m venv .venv
source .venv/bin/activate # 在 Windows 上:.venv\Scripts\activate
pip install -r requirements.txt
chmod +x google_search_console_server.py
chmod +x setup-credentials.sh
./setup-credentials.sh
您可以使用现有的服务账户凭证文件,或者直接粘贴 JSON。要进行完全自动安装,也可以使用 install.sh 脚本:
chmod +x install.sh
./install.sh
如果您已经拥有一个服务账户(例如用于 Google Ads),可以重复使用它来处理搜索控制台:
./setup-credentials.sh如果没有服务账户:
./setup-credentials.sh/pad/naar/.venv/bin/python (例如 /home/username/google-search-console-mcp/.venv/bin/python)/pad/naar/google_search_console_server.py(例如 /home/username/google-search-console-mcp/google_search_console_server.py)SERVICE_ACCOUNT_JSON=/pad/naar/service_account_credentials.json
get_top_queries{
"site_url": "sc-domain:example.com",
"start_date": "2023-01-01",
"end_date": "2023-01-31"
}
本项目采用 MIT 许可证。
欢迎提交拉取请求。对于较大的更改,请先打开问题讨论您想要更改的内容。