GSC-MCP-Server
Connects Google Search Console to MCP clients to query search analytics, manage sitemaps, and perform URL inspections. It enables users to identify SEO opportunities and generate performance reports through natural language interactions.
README
GSC-MCP-Server
Google Search Console MCP Server — Connect Google Search Console to Claude, Cursor, and other MCP clients.
Features
- 🔍 Search Analytics — Query clicks, impressions, CTR, and position data
- 📊 SEO Opportunities — Find low-CTR keywords, detect cannibalization issues
- 📈 Reports — Weekly summaries, period comparisons
- 🗺️ Sitemaps — List, submit, and manage sitemaps
- 🔎 URL Inspection — Check indexing status (requires full scope)
- 💾 Caching — SQLite cache for faster repeated queries
- 🔐 Secure — OAuth tokens stored in OS keychain
Quick Start
# Install globally
npm install -g @appsyogi/gsc-mcp-server
# Set up OAuth credentials
gsc-mcp init
# Verify setup
gsc-mcp doctor
# Start the server (for MCP clients)
gsc-mcp run
Prerequisites
1. Create Google Cloud OAuth Credentials
You need to create your own OAuth credentials in Google Cloud Console:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Search Console API:
- Go to "APIs & Services" → "Library"
- Search for "Google Search Console API"
- Click "Enable"
- Create OAuth credentials:
- Go to "APIs & Services" → "Credentials"
- Click "Create Credentials" → "OAuth client ID"
- Choose "Desktop application"
- Name it (e.g., "GSC-MCP")
- Click "Create"
- Copy the Client ID and Client Secret
- Add test users (required while app is in testing mode):
- Go to "APIs & Services" → "OAuth consent screen"
- Scroll to "Test users" section
- Click "Add users"
- Add the Google account email(s) you'll use to authenticate
- Click "Save"
Note: While your app's publishing status is "Testing", only test users can authenticate. You can add up to 100 test users.
2. Configure GSC-MCP
Run the init command and enter your credentials:
gsc-mcp init
This will:
- Prompt for your Client ID and Client Secret
- Open a browser for Google authentication
- Store your refresh token securely in the OS keychain
Usage
CLI Commands
# Initialize with OAuth (interactive)
gsc-mcp init
# Initialize with service account
gsc-mcp init --service-account /path/to/key.json
# Initialize with full scope (for sitemap submission, URL inspection)
gsc-mcp init --scope full
# Check configuration and connectivity
gsc-mcp doctor
gsc-mcp doctor --verbose
# Start MCP server (stdio mode)
gsc-mcp run
# Start in HTTP mode (for debugging)
gsc-mcp run --http 3333
# View current configuration
gsc-mcp config
# Clear credentials
gsc-mcp logout
MCP Client Configuration
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"gsc": {
"command": "gsc-mcp",
"args": ["run"]
}
}
}
VS Code (Copilot)
Add to your VS Code MCP settings (~/.vscode/mcp.json or workspace settings):
{
"servers": {
"gsc": {
"command": "gsc-mcp",
"args": ["run"],
"type": "stdio"
}
}
}
Cursor
Add to your Cursor MCP config:
{
"mcpServers": {
"gsc": {
"command": "npx",
"args": ["-y", "@appsyogi/gsc-mcp-server", "run"]
}
}
}
Available Tools
Search Analytics
| Tool | Description |
|---|---|
searchanalytics.query |
Query search performance data with dimensions and filters |
report.comparePeriods |
Compare two time periods |
Sitemaps
| Tool | Description | Scope |
|---|---|---|
sitemaps.list |
List all sitemaps | readonly |
sitemaps.get |
Get sitemap details | readonly |
sitemaps.submit |
Submit a sitemap | full |
sitemaps.delete |
Delete a sitemap | full |
URL Inspection
| Tool | Description | Scope |
|---|---|---|
urlInspection.inspect |
Inspect a URL's indexing status | full |
urlInspection.batchInspect |
Inspect multiple URLs | full |
SEO Opportunities
| Tool | Description |
|---|---|
opportunities.lowCtrHighPos |
Find quick-win keywords (position 4-20, low CTR) |
opportunities.cannibalization |
Detect keyword cannibalization |
report.weeklySummary |
Generate weekly performance summary |
Export
| Tool | Description |
|---|---|
export.csv |
Export data as CSV |
export.json |
Export data as JSON |
Resources
The server exposes browsable resources:
gsc://sites— List all propertiesgsc://sites/{siteUrl}/sitemaps— List sitemaps for a property
Scopes
GSC-MCP supports two permission levels:
Readonly (default)
- Search analytics queries
- List sitemaps
- SEO analysis tools
gsc-mcp init # Uses readonly by default
Full
- Everything in readonly, plus:
- Submit/delete sitemaps
- URL inspection
gsc-mcp init --scope full
Configuration Files
GSC-MCP stores configuration in platform-specific locations:
| Platform | Config Path |
|---|---|
| macOS | ~/.config/gsc-mcp/ |
| Linux | ~/.config/gsc-mcp/ |
| Windows | %APPDATA%/gsc-mcp/ |
Files:
config.json— OAuth client ID/secret, scope settingscache.sqlite— Query cache and saved presets
Tokens are stored securely in the OS keychain when available.
Service Account Setup
For automated/server use, you can use a service account instead of OAuth:
- Create a service account in Google Cloud Console
- Download the JSON key file
- Add the service account email as an owner in Google Search Console
- Initialize:
gsc-mcp init --service-account /path/to/key.json
API Quotas
Google Search Console API has a default quota of 1,200 queries per day. GSC-MCP includes:
- Automatic retry with exponential backoff
- Query caching to reduce API calls
- Pagination handling for large result sets
Examples
Find Quick-Win Keywords
Use gsc-mcp to find quick-win opportunities for my site https://example.com
Weekly Report
Generate a weekly performance summary for https://example.com
Compare Periods
Compare search performance for https://example.com between last week and the week before
Export Data
Export the top 1000 queries for https://example.com in the last 28 days as CSV
Development
# Clone the repo
git clone https://github.com/AppsYogi-com/gsc-mcp-server.git
cd gsc-mcp-server
# Install dependencies
npm install
# Build
npm run build
# Run in dev mode
npm run dev
# Test locally
node dist/cli/index.js doctor
License
MIT
Contributing
Contributions are welcome! Please open an issue or PR.
Credits
Built with:
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。