Google MCP Server
Access Google Ads data: list accessible accounts, run campaign, ad group, and keyword performance reports, and generate keyword ideas via the Keyword Planner.
Access Google Analytics 4 data: list properties, run standard and realtime reports, retrieve metadata, and batch reports across multiple properties.
Interact with Google Search Console: list verified sites, query search analytics data, inspect URL indexing, manage sitemaps, and submit URLs for indexing.
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 MCP Servershow me last week's top search queries from Search Console"
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 MCP Server
A unified Model Context Protocol (MCP) server that gives AI assistants direct access to Google Analytics 4, Google Search Console, Google Ads and Google Merchant Center data.
Built with FastMCP and Google REST APIs. Uses OAuth2 user credentials -- no service account needed. You authenticate once, and the server sees every property your Google account has access to.
Tools (21)
Google Analytics 4
Tool | Description |
| List all accessible GA4 properties |
| Run standard reports (dimensions, metrics, filters, sorting, date ranges, up to 10k rows) |
| Realtime active users report |
| List available dimensions and metrics for a property |
Google Search Console
Tool | Description |
| List all verified sites |
| Search performance data (queries, pages, countries, devices, dates) with filters and pagination (up to 25k rows) |
| Inspect URL indexing status (verdict, coverage, crawl state, robots.txt) |
| List submitted sitemaps |
| Submit a URL for indexing |
Google Ads
Tool | Description |
| List all accessible Google Ads accounts |
| Campaign performance (impressions, clicks, cost, conversions, CPC, CTR) |
| Ad group performance |
| Keyword performance (with quality score) |
| Keyword Planner: search volume, CPC, competition |
Google Merchant Center
Tool | Description |
| List all accessible Merchant Center accounts |
| List products from catalog (title, offer ID, language, feed) |
| Product approval statuses (approved, disapproved, pending, issues) |
| Account information (name, language, timezone) |
| Product issues aggregated by type (with examples) |
Batch
Tool | Description |
| Run the same GA4 report across multiple properties at once |
| Run the same Search Analytics query across multiple sites at once |
Related MCP server: Google Ads - AdLoop
Setup
1. Prerequisites
Python 3.10+
A Google Cloud project with these APIs enabled:
Google Analytics Data API
Google Analytics Admin API
Google Search Console API
Google Ads API (for Ads tools)
Merchant API (for Merchant Center tools)
2. Create OAuth credentials
Click Create Credentials > OAuth client ID > Desktop application
Download the JSON file
Save it as
~/.config/google-mcp/credentials.json
3. Configure OAuth consent screen scopes
In Google Cloud Console > Google Auth Platform > Data Access, add these scopes:
https://www.googleapis.com/auth/analytics.readonlyhttps://www.googleapis.com/auth/webmasters.readonlyhttps://www.googleapis.com/auth/adwords(sensitive)https://www.googleapis.com/auth/content(sensitive)
4. Install dependencies
pip install -r requirements.txt5. Authorize
python3 authorize.py --extra-scopes https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/contentThis opens a browser for Google OAuth consent. The resulting token is saved to ~/.config/google-mcp/token.json.
Without --extra-scopes, only GA4 and GSC tools will work.
6. Google Ads: developer token
Google Ads requires a developer token. Create ~/.config/google-mcp/config.json:
{
"google_ads": {
"developer_token": "YOUR_DEVELOPER_TOKEN"
}
}This file is optional. Without it, GA4, GSC and Merchant Center tools still work. Google Ads tools require it.
You can also add default IDs to avoid passing them on every call:
{
"google_ads": {
"developer_token": "YOUR_DEVELOPER_TOKEN",
"customer_id": "1234567890",
"login_customer_id": "1234567890"
},
"merchant_center": {
"merchant_id": "123456789"
}
}7. Google Merchant Center: GCP project registration
Merchant API v1 requires registering your GCP project with each Merchant Center account. This is a one-time step per account. See Register as a developer.
8. Configure Claude Code
Add to your ~/.claude.json:
{
"mcpServers": {
"google-mcp": {
"type": "stdio",
"command": "python3",
"args": ["/path/to/google-mcp/server.py"],
"env": {
"GOOGLE_MCP_CONFIG_DIR": "/path/to/.config/google-mcp"
}
}
}
}Restart Claude Code. The 21 tools will be available immediately.
Configuration
All paths are configurable via environment variables:
Variable | Default | Description |
|
| Directory for credentials, token and config files |
|
| OAuth client credentials file |
|
| OAuth token file |
|
| Extended config (Ads developer token, default IDs) |
Architecture
server.py FastMCP entry point, 21 @mcp.tool() wrappers
auth.py OAuth2 centralized (get_credentials, get_ads_client)
config.py Optional config.json loader (developer token, default IDs)
tools_ga4.py GA4 via google-api-python-client (REST)
tools_gsc.py GSC via google-api-python-client (REST)
tools_batch.py Batch orchestration over GA4/GSC tools
tools_ads.py Google Ads via subprocess isolation (gRPC in child process)
_ads_impl.py Google Ads gRPC implementation (runs in subprocess)
tools_merchant.py Merchant Center via REST (requests HTTP)
authorize.py One-time OAuth2 flow with --extra-scopesWhy subprocess for Google Ads? The google-ads SDK uses gRPC, which conflicts with FastMCP's asyncio event loop over stdio transport. Running Ads calls in a subprocess isolates gRPC from the MCP server process. All other APIs use REST and run in-process.
Usage examples
Once configured, you can ask Claude Code things like:
"List my GA4 properties"
"Show me the top 20 pages by sessions on property 123456789 for the last 7 days"
"What queries drive traffic to example.com?"
"Is this URL indexed? https://example.com/page"
"Show realtime active users on my site"
"List my Google Ads accounts"
"Show campaign performance for customer 9006396761 last month"
"Generate keyword ideas for 'chaussures running' in France"
"List my Merchant Center accounts"
"Show product issues for merchant 5300442232"
"Run a traffic report on all my GA4 properties at once"
Why this exists
The official Google MCP servers for GA4 and GSC require service account credentials (google.auth.default()), which means creating a service account, granting it access to each property, and managing key files. This is cumbersome for individual users.
This server uses OAuth2 user credentials (the same flow as signing in with your Google account), which means it works with whatever properties you already have access to -- no extra setup per property. One authentication, all your Google data.
License
MIT -- see LICENSE.
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/kairos-company/google-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server