Search & analytics data as infrastructure — MCP server for Google Search Console, Bing Webmaster Tools, and GA4, designed for AI agents and automation.
# Add to your Claude Code skills
git clone https://github.com/saurabhsharma2u/search-console-mcpA Model Context Protocol (MCP) server that transforms how you interact with Google Search Console, Bing Webmaster Tools, and Google Analytics 4. Stop exporting CSVs and start asking questions.
No comments yet. Be the first to share your thoughts!
One Server. Three Platforms. Infinite Accounts. Actionable Intelligence.
Copy and paste these into your MCP client (Claude Desktop, etc.) to see the intelligence engine in action:
"My traffic dropped this week compared to last. Use the anomaly detection and time-series tools to find exactly when the drop started and which pages are responsible."
"Find keywords for https://example.com where I'm ranking in positions 8-15 but have at least 1,000 impressions. These are my best opportunities for a quick traffic boost."
"Check for keyword cannibalization. Are there any queries where two or more of my pages are competing and splitting the traffic? Suggest which one should be the primary authority."
"Analyze my top 50 keywords for the last 90 days. Rank them by a custom 'Opportunity Score' (Impressions / Position). Give me the top 5 specific pages to focus on."
"Run a full SEO health check for my site. Segment the results by Brand vs. Non-Brand and give me 3 high-impact actions for the upcoming week."
"Fetch the top 5 pages by impressions. For these pages, run a PageSpeed audit. Is there any correlation between low performance scores and recently declining positions?"
"Compare my performance between Google and Bing for the last 30 days. Which keywords are ranking better on Bing but have lower traffic on Google?"
"Show me keywords where I'm in the top 5 on Google but not ranking on Bing. These are my easy Bing wins."
"Am I too dependent on Google? Check my click share across both engines and flag any keywords where over 85% of traffic comes from Google."
"Run an
opportunity_matrixfor my top 20 pages. Which high-visibility pages have the lowest engagement or conversion rates? These are my conversion optimization priorities."
Search Console MCP uses a Secure Desktop Flow. This provides high-security, professional grade authentication for your Google account:
Run the following command to start the authorization process:
npx search-console-mcp setup
The CLI will:
To wipe your credentials from both the keychain and the disk:
# Logout of the default account
npx search-console-mcp logout
# Logout of a specific account
npx search-console-mcp logout user@gmail.com
For server-side environments or automated tasks where interactive login isn't possible, you can use a Google Cloud Service Account.
account@project.iam.gserviceaccount.com) as a user with at least "Full" or "Restricted" permissions.export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/key.json"
To access Bing data, you simply need an API Key.
export BING_API_KEY="your-api-key-here"
Connect your GA4 properties to correlate ranking data with user behavior.
npx search-console-mcp setup --engine=ga4Manage multiple Google and Bing accounts from the CLI:
# List all connected accounts
npx search-console-mcp accounts list
# Remove an account
npx search-console-mcp accounts remove --account=marketing@company.com
# Add a site boundary to an account
npx search-console-mcp accounts add-site --account=marketing@company.com --site=example.com
When your AI agent queries a site, the server automatically resolves which account to use. Learn more →
This MCP server implements a multi-layered security architecture:
~/.search-console-mcp-config.enc using AES-256-GCM encryption.refresh_token and expiry_date are stored.mode 600 (read/write only by your user).| Tool | Description |
|------|-------------|
| analytics_query | Master tool for raw data. Supports dimensions, filters, aggregationType (byPage/byProperty), dataState (final/all), and type (web/image/news/discover). |
| analytics_trends | Detect trends (rising/falling) for specific queries or pages. |
| analytics_anomalies | Detect statistical anomalies in daily traffic. |
| analytics_drop_attribution | [NEW] Attribute traffic drops to mobile/desktop or correlate with known Google Algorithm Updates. |
| analytics_time_series | [NEW] Advanced time series with rolling averages, seasonality detection, and forecasting. |
| analytics_compare_periods | Compare two date ranges (e.g., WoW, MoM). |
| seo_brand_vs_nonbrand | [NEW] Analyze performance split between Brand vs Non-Brand traffic. (Supports Google & Bing). |
| Tool | Description |
|------|-------------|
| seo_low_hanging_fruit | Find keywords ranking in pos 5-20 with high impressions. |
| seo_striking_distance | [NEW] Find keywords ranking 8-15 (Quickest ROI wins). |
| seo_low_ctr_opportunities | [NEW] Find top ranking queries (pos 1-10) with poor CTR. |
| seo_cannibalization | [Enhanced] Detect pages competing for the same query with traffic conflict. |
| seo_lost_queries | [NEW] Identify queries that lost all traffic in the last 28 days. (Supports Google & Bing). |