
Google Search Console MCP Server
io.github.conorbronsdon由 GitHub 帳號 conorbronsdon 發布v1.1.0更新於 Oct 24, 2026
Google Search Console for AI agents: search analytics, sitemaps, URL inspection.
概覽
一個本機 MCP 伺服器,讓 AI 助理取得 Google Search Console 資料——搜尋分析、臨界關鍵字、網站地圖和網址檢查——用於 SEO。
- 可以做什麼
- 列出已驗證的 Search Console 資源及其權限層級,並依查詢字詞、頁面、國家、裝置或日期查詢搜尋分析資料(點擊、曝光、點擊率、排名)。找出臨界關鍵字:平均排名在 8–25 且曝光量足夠的查詢。列出已提交的網站地圖及其狀態、最近下載時間和警告或錯誤數量。提交或註銷網站地圖(寫入類工具)。檢查網址的索引狀態、最近檢索、標準網址以及行動版或複合式搜尋結果判定。
- 適用情境
- 適合讓助理對已通過驗證的資源做日常 SEO 工作:尋找接近首頁的關鍵字、檢查頁面是否被索引、維持網站地圖健康,而不必在 Search Console 介面中反覆點選。
- 執行需求
- 透過 npx 在本機執行(需要 Node.js)。需要 Google OAuth 已安裝應用程式憑證檔案,包含 client_id、client_secret、refresh_token 和 scopes,預設位於 ~/.config/gws/searchconsole_credentials.json,或由 GSC_CREDENTIALS_PATH 指定的路徑。Google Cloud 專案需啟用 Search Console API。讀取類工具需要 webmasters.readonly 權限範圍;寫入類工具和網址檢查需要完整的 webmasters 權限範圍。需要連線至 Google API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Google Search Console MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
gsc-mcp
Maintenance mode. This project is stable and receives security fixes. New features aren't planned, but issues and pull requests are still welcome.
Google Search Console for AI agents: search performance, striking-distance keywords, sitemaps, and URL inspection. SEO automation you can hand to an assistant.
[License: MIT] [npm version] [Node] [Glama score] [Podcast] [X]
[Demo: an agent calls gsc_striking_distance and gets back queries ranking just off page one (sample data)]An MCP server for Google Search Console. It gives an AI assistant the data and the levers behind organic search: how queries and pages perform, which keywords are one nudge away from page one, the state of your sitemaps, and whether a specific URL is indexed — plus the ability to submit or remove sitemaps.
Why this exists. Search Console is where SEO actually happens, but its UI is click-heavy and its data is hard to act on at a glance. The single most useful view — queries ranking in striking distance of page one — is not even a built-in report; you have to filter and eyeball it. This server puts that view, and the rest of the funnel, in front of an agent so the boring parts of SEO (find the near-miss keywords, check index status, keep sitemaps healthy) can be automated.
It was built to run SEO for two sites — a podcast and a personal site — but nothing here is specific to them. Point it at any property you have verified.
Tools
Every tool carries MCP read/write annotations, so a client can tell the two write tools apart from the five read-only ones before calling them. Read tools are readOnlyHint: true; gsc_submit_sitemap is a non-destructive write; gsc_delete_sitemap is destructiveHint: true.
List tools default row_limit / limit low (25) to keep responses small — agents pay tokens per response.
Authentication
This server uses an OAuth installed-app credential (a saved refresh token), not a service account or an API key. It reads the credential from:
The file is google-auth's Credentials.to_json() shape: it contains client_id, client_secret, refresh_token, and scopes. The server refreshes short-lived access tokens against Google's token endpoint directly with fetch — no heavy googleapis dependency.
To create the file yourself if you do not already have it:
- In Google Cloud Console, create an OAuth client of type Desktop app and download its
client_secret.json. - Enable the Search Console API on that project.
- Run an installed-app OAuth flow requesting the scope you need (see below) and save the resulting credentials to
~/.config/gws/searchconsole_credentials.json. Any standardgoogle-auth-oauthlibinstalled-app snippet works — about ten lines, and it opens a browser for a single consent click.
The path is shared on purpose: if you already hold a Search Console credential in that location for other tooling, this server reuses it rather than asking you to mint a second one.
Scopes: read-only vs. full
- Read tools work with
https://www.googleapis.com/auth/webmasters.readonly. - Write tools (
gsc_submit_sitemap,gsc_delete_sitemap) and URL inspection need the fullhttps://www.googleapis.com/auth/webmastersscope.
If your saved credential only has the read-only scope, the read tools work and the write tools return a clear "re-mint with the full scope" error rather than a cryptic 403. Re-running the mint with the full scope upgrades the same file in place; read tools keep working throughout.
Set GSC_CREDENTIALS_PATH to point at a different credential file if you do not use the default location.
Starts without a credential
The server boots and answers tools/list even when no credential is present, so MCP inspectors can introspect it. Tool calls then return a setup pointer (to stderr at startup, and as the tool result). stdout is reserved for the MCP transport and stays clean.
Setup
1. Verify your property in Search Console
Add your site at search.google.com/search-console. A Domain property (verified with a DNS TXT record) covers http/https and all subdomains and is the recommended choice. Note the exact property string — gsc_list_sites will show it as sc-domain:example.com (Domain) or https://example.com/ (URL-prefix).
2. Mint the credential
Create ~/.config/gws/searchconsole_credentials.json as described under Authentication, requesting the full webmasters scope if you want the write and URL-inspection tools.
3. Configure your MCP client
Claude Code
Add to your .mcp.json:
Claude Desktop
Add to your claude_desktop_config.json:
No env block is needed when the credential is at the default path. Set GSC_CREDENTIALS_PATH if it lives elsewhere.
4. Verify
Ask your assistant: "List my Search Console properties," then "Show me striking-distance keywords for it over the last 28 days."
Limitations
Read these so you know what the numbers mean and what this can and cannot do.
- No request-indexing tool — by design. Search Console's "Request indexing" button has no public API. Google's Indexing API only supports
JobPostingandBroadcastEventpages, not normal content, and using it for normal pages violates its terms. So there is deliberately no "ask Google to index this page" tool here; for normal pages, requesting indexing is a manual click in the Search Console UI.gsc_submit_sitemapis the supported, API-backed way to nudge crawling. - Data lags ~2–3 days. Search Analytics is not real-time. End your date ranges a few days before today or the last days come back empty.
searchAnalyticsis capped per call.row_limitcaps at 1000 here (the API allows 25,000 with pagination); for very large pulls, page withstart_date/dimension filters rather than asking for everything at once.- Striking distance is computed client-side. It pulls up to 1000 query rows and filters to the position band. On a site with thousands of ranking queries, the band view reflects the top 1000 by clicks, not the entire long tail.
- URL inspection is rate-limited and slow. Google enforces a low daily quota on the URL Inspection API and each call can take a second or two. Inspect specific URLs you care about; do not loop it over a whole sitemap.
- No property add/remove tools. Verifying a property is a stateful, error-prone flow (DNS TXT, meta tag, file upload) that does not fit a single tool call. Add and verify properties in the Search Console UI; this server operates on properties you have already verified.
- General API quotas apply. The server surfaces a clear error on HTTP 429. Keep
row_limitand inspection volume modest.
Development
Run locally:
Tests mock fetch and make no network calls.
Contributing
Issues and pull requests are welcome. If a Search Console endpoint is worth wrapping as a tool, open an issue describing what it should return and the endpoint it maps to. Keep the contract honest: read tools stay read-only, write tools carry the right annotations, and responses stay compact.
The rest of the suite
Search Console is one credential family in a wider Google data stack. The siblings, each with its own auth:
Nothing here shares a token: this server uses a webmasters OAuth credential, Workspace uses gws auth login, YouTube Analytics uses a yt-analytics.readonly OAuth credential, GA4 uses Application Default Credentials scoped analytics.readonly.
About
Built and maintained by Conor Bronsdon. I host the Chain of Thought podcast, which covers AI infrastructure, developer tools, and how practitioners actually use this stuff. I built this to pull SEO work into the agent workflows that run the show and my site.
Companion tools:
- op3-mcp: podcast analytics through OP3 — downloads, geography, apps, per-episode breakdowns.
- podcast-benchmark: benchmark your show against peers on public signals.
- Transistor MCP: Transistor.fm's official MCP server. Episodes, publishing, and analytics.
- substack-mcp: read posts and manage drafts on Substack, safe for agent workflows.
- ai-tools-for-creators: a curated list of AI skills and MCP servers for people who ship ideas for a living.
More at chainofthought.show and on X.
Disclaimer
This is an independent personal project, not affiliated with, sponsored by, or endorsed by Google LLC. All views expressed are my own.
License
MIT
來源:README.md,提交 29e2056
工具
0版本歷史
1- v1.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分