GSC MCP Server
MCP server for Google Search Console, enabling chat-based queries about search performance, sitemaps, and URL indexing status via natural language.
README
Google Search Console MCP Server
A Model Context Protocol (MCP) server for Google Search Console — connect it to Claude Desktop, Claude Code, or any other MCP-compatible client and ask questions about your site's search analytics (clicks, impressions, CTR, position), sitemaps, and indexing status directly in chat.
What it can do
| Tool | Description |
|---|---|
list_sites |
List every property the authenticated account can access |
query_search_analytics |
Query clicks, impressions, CTR, and position — grouped by query, page, country, device, or date, with optional filters |
list_sitemaps |
List sitemaps submitted for a property |
get_sitemap |
Get status/details for one sitemap |
submit_sitemap |
Submit a new sitemap |
delete_sitemap |
Remove a sitemap |
inspect_url |
Run the URL Inspection tool (indexing status, coverage issues, mobile usability) on a single URL |
Requirements
- Node.js 18+
- A Google account with Owner or Full user access to the site(s) in Google Search Console
1. Create a Google Cloud project and enable the API
-
Go to the Google Cloud Console and create a new project (top bar → project dropdown → New Project). Give it any name, e.g.
GSC Connection.
-
With that project selected, open APIs & Services → Library, search "Google Search Console API", and click Enable.
Everything below branches by auth method — pick one.
2a. Option A — OAuth 2.0 (recommended if this is just for you)
Uses your own Google login, so it automatically sees every property you personally have access to. Requires a one-time browser authorization.
Configure the consent screen:
-
Go to APIs & Services → OAuth consent screen (in the newer Cloud Console this is under Google Auth Platform → Branding, part of a 4-step setup wizard).
-
App information: enter an app name (e.g.
GSC MCP Server) and your email as the support email → Next.
-
Audience: choose External → Next.
-
Contact information: enter your email → Next.
-
Finish: accept the policy → Create.
-
On the Audience page that follows, scroll to Test users → Add users, and add your own Google account's email. While the app is unpublished ("Testing" status), only test users can complete the login — this is expected and fine to leave as-is indefinitely for personal use.

Create the OAuth client:
-
Go to Clients (left sidebar) → Create client.
-
Application type: Web application (not "Desktop" — this project's local auth flow expects a fixed redirect URI, which only the Web application type lets you set).
-
Name it anything, e.g.
GSC MCP. -
Under Authorized redirect URIs, click Add URI and enter exactly:
http://localhost:53682/oauth2callback
-
Click Create, then download the client JSON (via the download icon next to the client in the Clients list).
-
Save the downloaded file into this project's folder as
oauth-credentials.json.
Configure and authorize:
- Copy
.env.exampleto.envand set (use absolute paths — see the note below):GSC_OAUTH_CREDENTIALS_PATH=/absolute/path/to/google-search-console-mcp-server/oauth-credentials.json GSC_OAUTH_TOKEN_PATH=/absolute/path/to/google-search-console-mcp-server/.gsc-token.json - Run the one-time login:
This prints a URL — open it in your browser, log in with the account you added as a test user, and approve access. The CLI saves a token tonpm run auth.gsc-token.jsonand you're done; you won't need to repeat this unless the token is deleted or access is revoked.
Why absolute paths?
.envpaths are resolved relative to the current working directory of whatever process launches the server — that's your shell when you runnpm run dev, but it's a different, unpredictable directory when an app like Claude Desktop spawns the server for you. Relative paths (./oauth-credentials.json) can silently fail to resolve in that case, causing an unexplained "no credentials" error. Absolute paths always work regardless of who launches the process.
2b. Option B — Service account (no browser login, better for servers/CI)
- In Cloud Console, go to APIs & Services → Credentials → Create Credentials → Service account.
- Give it any name (e.g.
gsc-mcp) and click Done (no project-level roles needed). - Open the new service account → Keys tab → Add Key → Create new key → JSON. Save the downloaded file into this project's folder, e.g.
gsc-service-account.json. - Copy the service account's email address (looks like
gsc-mcp@your-project.iam.gserviceaccount.com). - In Google Search Console, open the property → Settings → Users and permissions → Add user → add the service account's email as a Full user. Repeat for every property you want this server to see.
- In
.env(absolute path, same reasoning as above):GSC_SERVICE_ACCOUNT_KEY_PATH=/absolute/path/to/google-search-console-mcp-server/gsc-service-account.json
3. Install and build
git clone https://github.com/wyattxmgmt/google-search-console-mcp-server.git
cd google-search-console-mcp-server
npm install
npm run build
(You should already have .env set up from section 2a or 2b above.)
4. Connect it to an MCP client
Claude Desktop
The current Claude Desktop app manages local MCP servers under Settings → Developer → Local MCP servers, not under Settings → Connectors (Connectors there is for remote/hosted MCP servers reachable over HTTPS — a locally-run server like this one won't show up there).
-
Open Settings → Developer → Local MCP servers → Edit Config. This opens
claude_desktop_config.jsondirectly. -
Add a
mcpServersentry (merge with whatever's already in the file — don't replace it):{ "mcpServers": { "gsc": { "command": "node", "args": [ "--env-file=/absolute/path/to/google-search-console-mcp-server/.env", "/absolute/path/to/google-search-console-mcp-server/dist/index.js" ] } } } -
Save, then fully quit Claude Desktop (not just close the window — use the tray/taskbar icon) and reopen it.
-
Check Settings → Developer → Local MCP servers again —
gscshould show status running.
Claude Code
Copy .mcp.json.example to .mcp.json in this project and fill in the absolute path:
{
"mcpServers": {
"gsc": {
"command": "node",
"args": ["--env-file=.env", "dist/index.js"],
"cwd": "/absolute/path/to/google-search-console-mcp-server"
}
}
}
Open Claude Code in this directory — it'll prompt you to approve the project-scoped gsc server on first load. To make it available in every session regardless of directory, register it globally instead:
claude mcp add gsc --scope user -- node --env-file=/absolute/path/to/google-search-console-mcp-server/.env /absolute/path/to/google-search-console-mcp-server/dist/index.js
Any other MCP client
The server speaks standard MCP over stdio — point your client at node dist/index.js with the same environment variables set (or --env-file), and it will work the same way.
Example prompts once connected
- "List my Search Console properties"
- "What were my top 20 queries for example.com over the last 28 days?"
- "Compare clicks by device for example.com in July vs June"
- "Is https://example.com/some-page indexed? Run a URL inspection."
- "Submit https://example.com/sitemap.xml as a new sitemap"
Troubleshooting
- "No credentials configured" — you need exactly one of
GSC_SERVICE_ACCOUNT_KEY_PATHorGSC_OAUTH_CREDENTIALS_PATHset in.env. - "No cached OAuth token found" — run
npm run authfirst. - Works with
npm run devbut fails/times out when launched by Claude Desktop — almost always relative paths in.env. Switch to absolute paths (see the callout in 2a). - Empty results from
list_sites— the account/service-account tied to your credentials hasn't been added as a user on any property in Search Console. - 403 errors on a specific site — double check the exact
siteUrlformat Search Console uses for that property (e.g.sc-domain:example.comfor domain properties vs.https://example.com/for URL-prefix properties) — see it vialist_sites. - Google shows "app isn't verified" / blocks login — expected while the OAuth consent screen is in "Testing" status. Make sure the Google account you're logging in with was added under Audience → Test users.
Development
npm run dev # run directly with tsx, no build step
npm run build # compile to dist/
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。