mcp-gsc-multi-account
Enables managing multiple Google Search Console accounts through a single MCP server, providing tools for search analytics, quick win detection, period comparison, URL inspection and indexing, and sitemap management.
README
MCP GSC Multi-Account
A Model Context Protocol (MCP) server for Google Search Console with multi-account support.
Manage multiple GSC accounts from a single MCP server. Perfect for agencies, SEO professionals, or anyone managing multiple properties.
Features
- 🔄 Multi-Account - Switch between accounts dynamically
- 📊 Search Analytics - Up to 25,000 rows with regex filtering
- 🎯 Quick Wins Detection - Automatic SEO opportunity identification
- 📈 Period Comparison - Compare performance between time periods
- 🔍 URL Inspection - Check indexing status of any URL
- 📤 URL Indexing - Submit URLs for indexing via Indexing API
- 🗺️ Sitemap Management - List and submit sitemaps
Installation
npm install mcp-gsc-multi-account
Or run directly:
npx mcp-gsc-multi-account
Configuration
Required Environment Variables
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
Account Configuration
Option 1: Single Account (Simple)
GSC_REFRESH_TOKEN=1//your-refresh-token
GSC_EMAIL=user@gmail.com # optional, defaults to "default"
Option 2: Multiple Accounts via JSON
GSC_ACCOUNTS_JSON='{"accounts":[{"id":"main","email":"main@gmail.com","refreshToken":"1//..."},{"id":"client1","email":"client@gmail.com","refreshToken":"1//..."}]}'
Option 3: Multiple Accounts via File
GSC_ACCOUNTS_FILE=/path/to/accounts.json
accounts.json format:
{
"accounts": [
{
"id": "main",
"email": "main@gmail.com",
"refreshToken": "1//..."
},
{
"id": "client1",
"email": "client@gmail.com",
"refreshToken": "1//..."
}
]
}
Option 4: Runtime Registration
Use the register_account tool to add accounts at runtime:
{
"tool": "register_account",
"arguments": {
"id": "newclient",
"email": "newclient@gmail.com",
"refreshToken": "1//..."
}
}
MCP Configuration
Claude Desktop / Cursor
{
"mcpServers": {
"gsc": {
"command": "npx",
"args": ["-y", "mcp-gsc-multi-account"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-secret",
"GSC_ACCOUNTS_FILE": "/path/to/accounts.json"
}
}
}
}
mcporter
{
"mcpServers": {
"gsc": {
"command": "npx -y mcp-gsc-multi-account",
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-secret",
"GSC_REFRESH_TOKEN": "1//your-token"
}
}
}
}
Available Tools
Account Management
register_account
Register a new account at runtime.
id(required): Unique identifieremail(required): Google account emailrefreshToken(required): OAuth2 refresh token
list_accounts
List all registered accounts.
list_sites
List all sites accessible by an account.
account(optional): Account ID or email
Search Analytics
search_analytics
Get search performance data.
siteUrl(required): Site URL (e.g.,https://example.comorsc-domain:example.com)startDate(required): Start date (YYYY-MM-DD)endDate(required): End date (YYYY-MM-DD)account(optional): Account to usedimensions(optional): query, page, country, device, daterowLimit(optional): Max 25,000 rowspageFilter,queryFilter,countryFilter,deviceFilterfilterOperator: equals, contains, includingRegex, excludingRegex
detect_quick_wins
Find SEO optimization opportunities - keywords ranking 4-20 with high impressions but low CTR.
siteUrl,startDate,endDate(required)minImpressions(default: 100)maxCtr(default: 3.0%)positionRangeMin/Max(default: 4-20)limit(default: 50)
compare_periods
Compare metrics between two time periods.
siteUrl(required)currentStartDate,currentEndDate(required)previousStartDate,previousEndDate(required)dimensions(optional)
URL Management
inspect_url
Check URL indexing status.
siteUrl,inspectionUrl(required)
submit_url_for_indexing
Submit URL for Google indexing (requires Indexing API enabled).
url(required)type: URL_UPDATED (index) or URL_DELETED (remove)
Sitemaps
list_sitemaps
List sitemaps for a site.
siteUrl(required)
submit_sitemap
Submit a sitemap.
siteUrl,feedpath(required)
Getting OAuth Credentials
- Go to Google Cloud Console
- Create or select a project
- Enable Search Console API and Indexing API
- Go to Credentials → Create Credentials → OAuth 2.0 Client ID
- Application type: Desktop app
- Download the credentials
Getting a Refresh Token
Use the Google OAuth Playground or run:
npx -y google-search-console-mcp-server google-search-console-mcp-setup
Examples
"List my GSC accounts"
"Show quick wins for https://example.com using the main account"
"Compare last 7 days vs previous 7 days for sc-domain:example.com"
"Submit https://example.com/new-article for indexing"
"Get top 100 queries for https://example.com from 2024-01-01 to 2024-01-31"
License
MIT
Contributing
Contributions welcome! Please read the contributing guidelines first.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。