Google Search Console MCP Server
Provides tools to query Google Search Console data including search analytics, URL inspection, sitemap management, and site performance monitoring.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Search Console MCP Servershow my top queries for last month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Search Console MCP Server
A stateless, multi-tenant HTTP MCP (Model Context Protocol) server for Google Search Console, designed to run on Google Cloud Run and connect to AI agent platforms like Obot.
Connect your AI agents to Google Search Console data — query search analytics, inspect URL indexing, manage sitemaps, and monitor site performance — all authenticated through each user's own Google account via OAuth.
How It Works
Each user signs in with their own Google account through OAuth
The server validates the user's Bearer token on every request via Google's tokeninfo endpoint
All Google Search Console API calls are made using that user's token — they can only access properties they already have access to in Search Console
No credentials are stored on the server; it is fully stateless and multi-tenant
Tools
# | Tool | Description |
1 |
| List all GSC properties the authenticated user can access |
2 |
| Get details for a specific property |
3 |
| Add a new site to Search Console |
4 |
| Remove a site from Search Console |
5 |
| Query clicks, impressions, CTR, and position by query/page/device/country |
6 |
| Full analytics query with date ranges, filters, sorting, and pagination |
7 |
| Compare search performance between two date ranges |
8 |
| Top queries driving traffic to a specific page |
9 |
| Full URL inspection — indexing status, crawl state, canonicals, rich results |
10 |
| Inspect up to 10 URLs and return a summary |
11 |
| Categorize up to 10 URLs by indexing issue type |
12 |
| Aggregate totals and daily trend for a property |
13 |
| List all submitted sitemaps for a property |
14 |
| Full details for a specific sitemap |
15 |
| Submit a sitemap URL to Search Console |
16 |
| Remove a sitemap from Search Console |
Prerequisites
Google Cloud project with billing enabled
Docker (with
buildxfor Apple Silicon cross-compilation)Google Cloud CLI (
gcloud) — authenticated and configuredObot instance for serving the MCP endpoint to agents
1. Enable Required Google APIs
In the Google Cloud project that owns your OAuth client, enable the Search Console APIs:
gcloud services enable webmasters.googleapis.com searchconsole.googleapis.com \
--project=YOUR_PROJECT_ID2. Create an OAuth Client in Google Cloud
Go to APIs & Services → Credentials → Create Credentials → OAuth client ID
Application type: Web application
Add an authorized redirect URI:
https://YOUR_OBOT_HOST/oauth/mcp/callbackNote the Client ID and Client Secret — you'll need them in Obot
If you already have an OAuth client for another MCP server (e.g. Google Analytics), you can reuse it — just add the webmasters scope to your OAuth consent screen:
APIs & Services → OAuth consent screen → Edit App → Add or remove scopes
Add: https://www.googleapis.com/auth/webmasters
3. Build and Push the Docker Image
The container must target linux/amd64 for Cloud Run (important if building on Apple Silicon).
PROJECT=your-gcp-project-id
REGION=us-central1
REPO=cloud-run-images
IMAGE_NAME=gsc-mcp-oauth
IMAGE="${REGION}-docker.pkg.dev/${PROJECT}/${REPO}/${IMAGE_NAME}:v1"
# Build for linux/amd64
docker build --platform linux/amd64 -t "${IMAGE_NAME}:v1" .
# Tag and push to Artifact Registry
docker tag "${IMAGE_NAME}:v1" "$IMAGE"
docker push "$IMAGE"If the Artifact Registry repository doesn't exist yet:
gcloud artifacts repositories create cloud-run-images \ --repository-format=docker \ --location=$REGION \ --project=$PROJECT
4. Deploy to Cloud Run
On the first deploy, use a placeholder MCP_BASE_URL — then redeploy once you have the real service URL.
First deploy (to get the URL):
gcloud run deploy gsc-mcp-oauth \
--image "$IMAGE" \
--region $REGION \
--platform managed \
--allow-unauthenticated \
--set-env-vars MCP_BASE_URL=placeholder \
--project $PROJECTCapture the assigned URL from the output, then redeploy with it:
SERVICE_URL="https://gsc-mcp-oauth-XXXXXXXXXX.us-central1.run.app"
gcloud run deploy gsc-mcp-oauth \
--image "$IMAGE" \
--region $REGION \
--platform managed \
--allow-unauthenticated \
--set-env-vars MCP_BASE_URL=$SERVICE_URL \
--project $PROJECT5. Verify the Deployment
SERVICE_URL="https://gsc-mcp-oauth-XXXXXXXXXX.us-central1.run.app"
# Protected resource metadata — should list Google as the authorization server
curl -s "$SERVICE_URL/.well-known/oauth-protected-resource/mcp" | python3 -m json.tool
# No token → should return 401
curl -s -o /dev/null -w "No token → HTTP %{http_code}\n" "$SERVICE_URL/mcp"
# Invalid token → should return 400 (not 500)
curl -s -o /dev/null -w "Bad token → HTTP %{http_code}\n" \
-H "Authorization: Bearer invalid_token" "$SERVICE_URL/mcp"Expected metadata response:
{
"resource": "https://your-service-url/mcp",
"authorization_servers": ["https://accounts.google.com/"],
"scopes_supported": ["https://www.googleapis.com/auth/webmasters"],
"bearer_methods_supported": ["header"],
"resource_name": "Google Search Console MCP Server"
}6. Connect to Obot
Obot handles the OAuth flow for your users — they sign in with Google through Obot, and Obot passes their Bearer token to this server on each request.
In Obot, go to MCP Servers → Add MCP Server
Enter the server URL:
https://your-service-url/mcpGo to Advanced Configuration → Static OAuth and configure:
Field
Value
Authorization Server
https://accounts.google.comClient ID
Your Google OAuth Client ID
Client Secret
Your Google OAuth Client Secret
Scopes
https://www.googleapis.com/auth/webmastersSave — users can now authenticate with their own Google accounts and access their Search Console data through your agents.
Project Structure
├── Dockerfile
├── pyproject.toml
└── src/
└── gsc_mcp_oauth/
├── __init__.py
├── __main__.py # Entry point — reads PORT and MCP_BASE_URL
├── auth.py # Token verification + RemoteAuthProvider
├── gsc_clients.py # httpx helpers + URL encoding utilities
├── server.py # FastMCP server factory
└── tools/
├── properties.py # Site listing, add, delete, details
├── analytics.py # Search analytics queries
├── inspection.py # URL inspection and indexing checks
└── sitemaps.py # Sitemap managementEnvironment Variables
Variable | Required | Description |
| Yes (production) | The public URL of this Cloud Run service — used to generate OAuth metadata endpoints |
| No | HTTP port (default: |
Dependencies
fastmcp>= 3.1.0 — MCP server framework withRemoteAuthProviderhttpx>= 0.28.1 — async HTTP client for all Google API calls
No google-api-python-client, google-auth, or gRPC dependencies. Authentication is handled entirely via Bearer token passthrough.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sidiio/google-search-console-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server