
MCP Google Search Console
io.github.crunchtools由 GitHub 帳號 crunchtools 發布v0.1.0更新於 Nov 3, 2026
Secure MCP server for Google Search Console analytics, sitemaps, and URL inspection
概覽
本機 MCP 伺服器,讓助理查詢 Google Search Console 搜尋分析資料、管理網站地圖、檢查網址索引狀態並管理資源。
- 可以做什麼
- 查詢搜尋分析資料,例如點擊、曝光、點擊率和平均排名
- 列出、取得、新增和刪除 Search Console 資源
- 列出、取得、提交和刪除網站地圖
- 檢查指定網址的索引狀態
- 適用情境
- 適合需要讓助理取得 Search Console 成效數據、排查頁面是否被索引,或維護網站地圖與已驗證資源、而不必手動開啟 Google 後台的場合。
- 執行需求
- 以本機 Python 程序(uvx 或 pip)或容器方式執行。需要啟用 Search Console API 與 webmasters 權限範圍的 Google Cloud OAuth 用戶端,並透過 GSC_CLIENT_ID、GSC_CLIENT_SECRET 以及瀏覽器 OAuth 流程或 GSC_REFRESH_TOKEN 提供憑證;可選 GSC_CREDENTIALS_DIR 與 GSC_OAUTH_REDIRECT_URI。需能連線至 Google API。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MCP Google Search Console,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-google-search-console-crunchtools
Secure MCP server for Google Search Console. Query search analytics (clicks, impressions, CTR, position), manage sitemaps, inspect URL indexing status, and manage site properties.
[CI] [PyPI] [License: AGPL v3]
Installation
uvx (recommended, zero-install)
pip
Container (Podman/Docker)
OAuth Setup
This server supports two authentication methods: browser-based OAuth (recommended) and environment variable (fallback).
Option A: Browser-Based OAuth (Recommended)
Browser-based OAuth handles token exchange automatically. When credentials expire, visit the /auth URL and click through Google's consent screen — no manual code exchange needed.
Step 1: Create a Google Cloud OAuth App
- Go to Google Cloud Console
- Create a new project (or select an existing one)
- Navigate to APIs & Services > Library
- Search for Google Search Console API and click Enable
- Navigate to APIs & Services > Credentials
- Click + CREATE CREDENTIALS > OAuth client ID
- If prompted, configure the OAuth consent screen first:
- User type: External (or Internal if using Google Workspace)
- App name: anything (e.g., "MCP Search Console")
- Scopes: add
https://www.googleapis.com/auth/webmasters - Test users: add your Google account email
- Back on Create OAuth client ID:
- Application type: Web application
- Name: anything (e.g., "MCP Search Console")
- Authorized redirect URIs: add your server's callback URL (e.g.,
https://mcp-gsc.example.com/oauth2callback)
- Click Create — copy the Client ID and Client Secret
Step 2: Configure and Start
Create an env file:
Start the server with a persistent volume for credentials:
Step 3: Authenticate
Visit https://mcp-gsc.example.com/auth in your browser. You'll be redirected to Google's consent screen. Grant access and the server will save credentials automatically.
When tokens expire, any tool call will return the /auth URL. Click it to re-authenticate — no container restart needed.
Option B: Environment Variable (Fallback)
If you prefer static credentials or can't expose a callback URL, set GSC_REFRESH_TOKEN in your env file. See the manual OAuth flow below.
Manual OAuth flow
- Open the URL in your browser, sign in, and click Allow
- Copy the
code=value from the redirect URL - Exchange the code:
- Copy the
refresh_tokenfrom the response and addGSC_REFRESH_TOKEN=...to your env file.
How it works at runtime
The server checks for credentials in this order:
- File-based credentials from
GSC_CREDENTIALS_DIR/credentials.json(written by the browser-based flow) - Environment variable
GSC_REFRESH_TOKEN(fallback)
On each API call, the server exchanges the refresh token for a short-lived access token (~1 hour), cached in memory and refreshed automatically. Updated tokens are persisted to the credentials file for reuse across container restarts.
Available Tools (10)
Security
- OAuth2 credentials stored as
SecretStr(never logged) - File-based credentials written with
0o600permissions (atomic writes) - Automatic token scrubbing from error messages
- Pydantic input validation with
extra="forbid" - No filesystem access, shell execution, or code evaluation
- TLS certificate validation (httpx default)
- Request timeouts and response size limits
- Built on Hummingbird container images
See SECURITY.md for the full security design document.
Development
License
來源:README.md,提交 dde91a8
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分