SEO Analytics MCP Server
Enables querying Google Analytics 4 traffic, engagement, and conversions, as well as Google Search Console performance, index status, and sitemap management.
README
SEO Analytics MCP Server
MCP server for Google Analytics 4 and Search Console. Deploys to Railway and connects to Claude as a custom connector.
Tools
| Tool | Description |
|---|---|
ga4_run_report |
Traffic, engagement, conversions by page/channel/date |
gsc_query_performance |
Clicks, impressions, CTR, position from Search Console |
gsc_inspect_url |
Index status, crawl date, canonical, mobile usability |
gsc_list_sitemaps |
List submitted sitemaps and their status |
gsc_submit_sitemap |
Submit a new sitemap URL |
gsc_delete_sitemap |
Remove a sitemap from Search Console |
Setup
1. Google Cloud project
- Go to console.cloud.google.com and create a project (or use an existing one).
- Enable these APIs:
- Google Analytics Data API
- Google Search Console API
- Web Search Analytics API
- Go to IAM & Admin → Service Accounts → Create Service Account.
- Name it (e.g.
seo-mcp), skip optional fields, click Done. - Click the service account → Keys → Add Key → JSON. Download the file.
- Keep the
client_emailfrom the JSON — you'll need it for steps below.
2. Grant the service account access
Google Analytics 4:
- Open GA4 → Admin → Property → Property Access Management.
- Click + → Add user → paste the
client_email. - Set role to Viewer.
Google Search Console:
- Open Search Console → Settings → Users and permissions.
- Click Add user → paste the
client_email. - Set permission to Full (required for sitemap submit/delete).
3. Find your IDs
- GA4 Property ID: GA4 Admin → Property Settings → Property ID (numeric only, e.g.
123456789) - GSC Site URL: Exactly as it appears in Search Console (e.g.
https://example.com/with trailing slash, orsc-domain:example.comfor domain properties)
4. Deploy to Railway
- Push this repo to GitHub.
- Go to railway.app → New Project → Deploy from GitHub repo → select this repo.
- Railway will detect Node.js and run
npm install && npm run buildautomatically. - Go to Variables and add:
MCP_AUTH_TOKEN = <generate with: openssl rand -hex 32>
GOOGLE_CREDENTIALS_JSON = <paste the entire contents of your service account JSON key, minified to one line>
GA4_PROPERTY_ID = 123456789
GSC_SITE_URL = https://example.com/
To minify the credentials JSON to one line (Mac/Linux):
cat your-key-file.json | jq -c . | pbcopy
- Deploy. Railway will give you a public domain like
https://seo-mcp-production.up.railway.app. - Test the health check:
curl https://your-railway-domain.up.railway.app/health
5. Connect to Claude
Claude Pro/Max (personal):
- Open Claude → Customize → Connectors → + Add custom connector
- Enter your Railway URL:
https://your-railway-domain.up.railway.app/mcp - Add the Authorization header:
Bearer your-mcp-auth-token
Claude Team/Enterprise:
- Owner adds it under Organization Settings → Connectors
6. Test in Claude
Enable the connector in a chat and try:
What are my top 10 landing pages by sessions for the last 28 days?
Show me my GSC performance for the past 30 days, grouped by query.
Inspect https://example.com/blog/my-post
List all my submitted sitemaps.
Local development
cp .env.example .env
# Fill in .env with your real values
npm install
npm run dev
Test locally:
curl -X POST http://localhost:3000/mcp \
-H "Authorization: Bearer your-token" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Environment variables
| Variable | Description |
|---|---|
MCP_AUTH_TOKEN |
Secret token for bearer auth. Generate with openssl rand -hex 32 |
GOOGLE_CREDENTIALS_JSON |
Full contents of the service account JSON key (single line) |
GA4_PROPERTY_ID |
GA4 numeric property ID (e.g. 123456789) |
GSC_SITE_URL |
Exact site URL from Search Console (e.g. https://example.com/) |
PORT |
Port to listen on. Set automatically by Railway. Defaults to 3000 |
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。