
Google Search Console Connector
io.github.malaysherasia-ai由 GitHub 帳號 malaysherasia-ai 發布v0.1.3更新於 Nov 2, 2026
Google Search Console: search analytics, CSV reports, URL inspection, sitemaps, site verification.
概覽
本機 MCP 伺服器,讓助理連接 Google Search Console,進行搜尋資料分析、網址檢查、網站地圖管理、網站驗證與 CSV 報告匯出。
- 可以做什麼
- 依日期、查詢字詞、頁面、國家、裝置、小時或搜尋類型查詢 Search Analytics 成效資料,支援正規表示式篩選與品牌/非品牌拆分
- 匯出單一網站或全部網站的完整報告(CSV、JSON、Markdown 摘要),自動翻頁突破 Google 的列數上限
- 檢查網址的索引狀態、最近檢索、標準網址與複合式搜尋結果
- 列出、提交與刪除網站地圖
- 新增資源並透過 meta 標籤、HTML 檔案或 DNS 驗證所有權
- 管理連線、品牌字詞與圖表註記,並開啟本機 SEO 儀表板
- 適用情境
- 適合在建置或維護網站時,讓助理根據真實的 Search Console 資料回答 SEO 問題、省去手動匯出 CSV 的步驟,或排查索引問題、驗證新資源。
- 執行需求
- 透過 npx 在本機執行,需要 Node.js 20 或更新版本。需要一個有 Search Console 存取權的 Google 帳號,於瀏覽器以 Google OAuth 登入,無需 API 金鑰。選用環境變數:GSC_PROJECT_DIR、GSC_CLIENT_ID 與 GSC_CLIENT_SECRET(使用自己的 OAuth 用戶端)、GSC_CONNECT_HOME、GSC_CONNECT_PORT。需要連線至 Google 與 npm 登錄檔的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Google Search Console Connector,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Google Search Console Connector for Claude Code
Connect any website project to Google Search Console from Claude Code, Google Antigravity or any MCP client. Sign in with your Google account once, then ask Claude about clicks, queries, rankings and indexing, pull every GSC report as CSV with one command, and track it all in a local SEO dashboard.
It's an open-source Search Console MCP server, a GSC report exporter and a dashboard, and it runs entirely on your computer. No Google Cloud setup, no API keys: you just sign in with Google.
[npm] [License: MIT] [Node.js 20+]
If you find it useful, a ⭐ on GitHub helps other people find it.
Docs and updates: claude-repo.com/google-search-console-connector
Why this exists
If you build sites with an AI coding agent, getting Search Console data into it usually means logging in to search.google.com, clicking Export, downloading CSVs and dragging them into the chat. Every site, every time.
This tool removes those steps:
That one command downloads the same reports as Search Console's Export button (Dates, Queries, Pages, Countries, Devices, Search appearance) plus comparisons with the previous period, query-to-page pairs, sitemaps, and a summary.md written for Claude to read. Inside Claude Code you don't even type it. Ask "pull the Search Console report" and Claude runs the gsc_export_report tool.
Features
- Sign in with Google. One click in your browser, using Google's own OAuth 2.0 (PKCE). No Google Cloud project, API keys or passwords.
- One-command GSC export. Pull CSV, JSON and Markdown reports for one site or all your sites (
--all-sites), for any range up to 16 months. - MCP server for Claude Code and Antigravity. 18 tools: performance data, hourly data, branded vs non-branded queries, URL Inspection, sitemaps, adding properties and verifying ownership.
- Local SEO dashboard. KPIs against the previous period, a trend chart (hourly, daily, weekly, monthly), queries, pages, countries, devices, sitemaps and URL Inspection. Light and dark themes.
- Opportunities. Striking-distance keywords (positions 4–20), page-one pages with low CTR, and queries that are losing clicks.
- Branded vs non-branded. Set your brand terms once; the dashboard, reports and Claude can all split traffic by them.
- Chart notes. Claude can mark the chart when it ships SEO changes ("Rewrote service page titles"), so you can see what moved the numbers.
- Site verification. Claude can add a new site to Search Console, put the verification meta tag in your code, and verify it after you deploy.
- Current with Google. Supports the latest Search Console API features, including hourly data, Discover and Google News. A weekly check flags new API fields and Search Central announcements.
- Private by default. Tokens and Search Console data stay on your machine and go only to Google. There is no server in between.
Quick start
You need Node.js 20 or newer and a Google account with access to Search Console.
1. Add it to Claude Code (once, for all your projects):
On Windows, wrap npx in cmd /c:
To run the latest code straight from GitHub instead of npm, use npx -y github:malaysherasia-ai/google-search-console-connector-for-claude-code in place of npx -y google-search-console-connector@latest. The first start takes about 20 seconds while it builds. GitHub builds don't include the one-click sign-in client, so you'll need your own Google Cloud OAuth client (the Connect page walks you through it).
2. Connect a website project. Open Claude Code in the website's folder and say:
Connect this project to Google Search Console
Claude calls gsc_connect, which opens a page in your browser:
- a one-time question about anonymous usage metrics (yes or no, your choice),
- Sign in with Google with the account that has your Search Console access. On Google's second screen, tick the box next to "View and manage Search Console data for your verified sites" before you click Continue; Google leaves it unticked,
- pick which Search Console property belongs to this project.
What Google shows you (account details hidden):
That's it. Google has verified the app's branding and it only asks for non-sensitive permissions, so there's no "unverified app" screen to click through. If you continue without ticking the box, the connector keeps your previous sign-in and asks you to try again.
3. Ask away:
How did the site do in the last 28 days? Which queries are we ranking 4–20 for, and which pages should we improve? Pull the GSC report for the last 3 months. Inspect https://example.com/services/ and tell me why it isn't indexed. Submit the sitemap, then add a chart note that we launched the new location pages. Open the Search Console dashboard.
You can also run everything from a terminal:
Use with Google Antigravity, Cursor and other MCP clients
Any MCP client that can start a local (stdio) server works. Add this to its MCP configuration (in Antigravity, open the MCP servers settings and edit the raw config):
The server uses the folder it is started in as the project. If your client starts servers somewhere else, set "env": { "GSC_PROJECT_DIR": "/path/to/your/site" }.
Advanced: use your own Google Cloud project
Most people can skip this. Agencies and developers who want sign-in to run through their own Google Cloud project (their own quota, their own consent screen) can choose Use my own Google Cloud project on the sign-in page. The steps are:
- Create a Google Cloud project, or pick an existing one.
- Enable the Google Search Console API.
- Enable the Site Verification API (used to verify new sites).
- Configure the consent screen: choose External and add your email as a test user. Then publish the app to In production. Apps left in "Testing" have their sign-in expire every 7 days. You don't need Google's app verification for your own use; Google will show an "unverified app" notice, and you continue with Advanced → Go to (your app).
- Create an OAuth client ID of type Desktop app, download the JSON, and drop it on the Connect page.
Both APIs are free. Your own client means quota and the consent screen are yours. To go back to the built-in sign-in, use the link at the top of that page, or Settings in the dashboard.
One-command Search Console reports
Reports go to .gsc-reports/<site>/<date>_last-<n>-days/ in your project, and .gsc-reports/ is added to .gitignore so search data never ends up in a commit or a deployed site. Rows page past Google's 25,000-row limit automatically.
MCP tools
The dashboard
npx google-search-console-connector dashboard, or ask Claude to open it. It runs on 127.0.0.1 only and opens through a one-time link.
- Overview: clicks, impressions, CTR and position against the previous period, with a trend chart for the last 24 hours (hourly) through 16 months, grouped daily, weekly or monthly
- Queries and Pages: sortable, searchable, change columns, CSV export
- Opportunities: striking distance, low CTR, declining queries
- Sitemaps & inspection: submit sitemaps, check their status, inspect any URL
- Settings: account, project property, brand terms, chart notes, usage-metrics choice
Try it without a Google account: npx google-search-console-connector demo.
What Google's API does and doesn't expose
Search Console keeps adding features. Some reach the API and some stay in the web UI. This table reflects Google's API as of October 2026.
Privacy and anonymous usage metrics
- Your Search Console data never leaves your computer, except to go between you and Google.
- Tokens are stored in
~/.gsc-connect/with owner-only file permissions. Disconnecting revokes them at Google. - Project settings (
.gsc-connect.json: property, brand terms, chart notes) contain no secrets and are safe to commit. - Anonymous usage metrics are opt-in. The first screen asks once. If you say no, nothing is ever sent. If you say yes, the app sends event names such as
view_changedormcp_tool_calledwith the app version, operating system and a random install ID to Google Analytics 4 via the Measurement Protocol. It never sends site URLs, page URLs, queries, metrics or your account. No tracking script runs in your browser and no cookies are set. Settings → "What's been sent" shows every event exactly as it was sent, and you can change your answer there at any time.DO_NOT_TRACK=1orGSC_CONNECT_TELEMETRY=0turns it off for good. The full list of events is insrc/telemetry.ts. - Update check: once a day the app asks the public npm registry for the latest version number. Set
GSC_CONNECT_UPDATE_CHECK=0to turn it off.
Security
- The local server listens on
127.0.0.1only, checks theHostheader, and requires a session cookie that is set through a one-time launch link. - OAuth uses the loopback redirect with PKCE (S256) and a
statecheck, as Google recommends for desktop apps. - Requested at sign-in:
webmasters(Search Console) andopenid email(to show which account is connected).siteverificationis asked for separately, only the first time you verify a new site.
Report vulnerabilities privately; see SECURITY.md.
Configuration
FAQ
Is the Google Search Console API free? Yes. Google charges nothing for the Search Console API or the Site Verification API, and this tool has no paid parts.
Do I need a Google Cloud account? No. You sign in with the Google account you already use for Search Console. Your own Google Cloud project is an optional advanced setting.
Who can see my data?
Only you and Google. The sign-in grants access to your computer, not to a server: tokens are stored in ~/.gsc-connect/ and reports are saved in your project folder. See the privacy policy.
Can I export more than 1,000 rows? Yes. Search Console's web export stops at 1,000 rows. The API returns up to 25,000 per request, and this tool keeps paging, up to Google's limit of 50,000 rows per day per search type.
Does it work with domain properties (sc-domain:)?
Yes, domain properties and URL-prefix properties both work. Domain properties are verified by DNS.
Will it work with more than one website?
Yes. Each project folder links to its own property, and report --all-sites exports every property you can access.
How do I update?
If you installed with @latest, restart Claude Code. The dashboard and CLI tell you when a new version is out.
Development
See RELEASING.md for how releases are planned from Google's changes and from usage, and CONTRIBUTING.md for how to contribute.
License
MIT. Not affiliated with or endorsed by Google. Google Search Console is a trademark of Google LLC.
來源:README.md,提交 cb358e2
工具
0版本歷史
1- v0.1.3最新Oct 19, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分