Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Google Search Console MCP Server
From the repo.
Connect Google Search Console to MCP clients such as Claude Desktop, Cursor, and Codex CLI. This lets your AI assistant read search performance, find SEO opportunities, and diagnose page indexing issues.
You do not need to remember tool parameters. In most cases, you can paste a site or page URL into the chat, and the AI client will match it to the right Search Console property before querying data.
This project only reads and analyzes Search Console data. It does not add or remove sites, and it does not submit or delete Sitemaps.
Use this flow when you operate the MCP server from an AI agent:
get_capabilities to confirm that the server is reachable and authenticated.list_properties before any site-specific request. Use the exact site_url it returns; do not infer or rewrite Search Console property strings.get_performance_overview, get_search_analytics, get_search_by_page_query, compare_search_periods, or get_advanced_search_analytics.inspect_url_enhanced, batch_url_inspection, or check_indexing_issues.You need:
Using npm:
npm install
npm run build
Or using pnpm:
pnpm install
pnpm build
Run in development mode:
npm run dev
Run the built server:
npm start
The built entry point is dist/index.js. When installed as a package, the binary name is google-search-console-mcp.
OAuth is the recommended option for local use because it authorizes with your own Google account.
Desktop app as the client type.~/Documents/client_secrets.json.GSC_OAUTH_CLIENT_SECRETS_FILE=/absolute/path/to/client_secrets.json npm run dev
The first tool call starts the browser-based Google sign-in flow. After authorization succeeds, the token is cached under google-search-console-mcp/token.json in your system user config directory, so later runs can reuse it. Set GSC_CONFIG_DIR if you want to use a different cache directory.
Service Accounts are a better fit for automation, server deployments, and shared team setups.
~/Documents/service_account.json.GSC_CREDENTIALS_PATH=/absolute/path/to/service_account.json GSC_SKIP_OAUTH=true npm run dev
If you use a Domain property, the user or Service Account must be explicitly added to the sc-domain:example.com property.
By default, the server tries OAuth first. If OAuth fails and GSC_CREDENTIALS_PATH is set, it falls back to the Service Account.
Set GSC_SKIP_OAUTH=true to skip OAuth and use only the Service Account.
First, find your Node.js path:
which node
Replace the example paths below with real absolute paths on your machine:
/absolute/path/to/node: the output of which node/absolute/path/to/google-search-console-mcp/dist/index.js: this project's built entry point/absolute/path/to/client_secrets.json: your OAuth Desktop Client JSON file/absolute/path/to/service_account.json: your Service Account JSON keyChoose the section for your MCP client below: Claude Desktop, Cursor, or Codex CLI. For macOS GUI apps, use the absolute Node.js path instead of just node. After changing the configuration, fully quit and restart the MCP client.
Edit the Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonOAuth configuration:
{
"mcpServers": {
"google_search_console": {
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/google-search-console-mcp/dist/index.js"],
"env": {
"GSC_OAUTH_CLIENT_SECRETS_FILE": "/absolute/path/to/client_secrets.json"
}
}
}
}
Service Account configuration:
{
"mcpServers": {
"google_search_console": {
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/google-search-console-mcp/dist/index.js"],
"env": {
"GSC_CREDENTIALS_PATH": "/absolute/path/to/service_account.json",
"GSC_SKIP_OAUTH": "true"
}
}
}
}
Cursor can use a global MCP configuration or a project-specific configuration:
~/.cursor/mcp.json.cursor/mcp.json in your project rootOAuth configuration:
{
"mcpServers": {
"google_search_console": {
"type": "stdio",
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/google-search-console-mcp/dist/index.js"],
"env": {
"GSC_OAUTH_CLIENT_SECRETS_FILE": "/absolute/path/to/client_secrets.json"
}
}
}
}
Service Account configuration:
{
"mcpServers": {
"google_search_console": {
"type": "stdio",
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/google-search-console-mcp/dist/index.js"],
"env": {
"GSC_CREDENTIALS_PATH": "/absolute/path/to/service_account.json",
"GSC_SKIP_OAUTH": "true"
}
}
}
}
Edit the Codex CLI configuration file at ~/.codex/config.toml.
OAuth configuration:
[mcp_servers.google_search_console]
command = "/absolute/path/to/node"
args = ["/absolute/path/to/google-search-console-mcp/dist/index.js"]
enabled = true
env = { GSC_OAUTH_CLIENT_SECRETS_FILE = "/absolute/path/to/client_secrets.json" }
Service Account configuration:
[mcp_servers.google_search_console]
command = "/absolute/path/to/node"
args = ["/absolute/path/to/google-search-console-mcp/dist/index.js"]
enabled = true
env = { GSC_CREDENTIALS_PATH = "/absolute/path/to/service_account.json", GSC_SKIP_OAUTH = "true" }
When using OAuth, the first tool call opens a browser so you can sign in with Google and authorize Search Console access.
| Variable | Default | Description |
|---|---|---|
GSC_OAUTH_CLIENT_SECRETS_FILE | client_secrets.json next to the entry script | Path to the OAuth Desktop Client JSON file |
GSC_CREDENTIALS_PATH | Not set | Path to the Service Account JSON key |
GSC_SKIP_OAUTH | false | Set to true to skip OAuth |
GSC_CONFIG_DIR | System user config directory | OAuth token cache directory |
GSC_DATA_STATE | all | Global Search Analytics data state, either all or final |
MCP_TRANSPORT | stdio | stdio, http, sse, or streamable-http |
MCP_HOST | 127.0.0.1 | HTTP transport bind host |
MCP_PORT | 3001 | HTTP transport bind port |
MCP_MAX_BODY_BYTES | 1048576 | Maximum request body size for HTTP transport |
See .env.example for an example.
The default transport is stdio, which is the usual choice for local MCP clients. To use Streamable HTTP:
MCP_TRANSPORT=http MCP_HOST=0.0.0.0 MCP_PORT=3001 npm start
Endpoints:
POST /mcp
GET /health
In your MCP client, ask the AI assistant to call:
get_capabilities
Then list the Search Console properties your account can access:
list_properties
If you call tools directly, use the exact site_url returned by list_properties.
In your MCP client, type:
Show the search performance for this site over the last 28 days: https://example.com/
If everything is configured correctly, the AI client will find the Search Console property your account can access, read the data, and summarize the results.
Generate an SEO weekly report for https://example.com/ over the last 28 days. Include clicks, impressions, CTR, average position, and trend changes.
Find pages on https://example.com/ from the last 28 days that have high impressions but low CTR, then suggest title and meta description improvements.
Analyze which search queries brought traffic to this page over the last 90 days: https://example.com/blog/example-post
Search traffic for https://example.com/ has dropped recently. Help me find the main declining pages and likely causes.
Check whether these pages have indexing, canonical, robots, or crawl issues:
https://example.com/page-1
https://example.com/page-2
https://example.com/page-3
Make sure the Google account you authorized can see the site in Search Console. Domain properties usually look like sc-domain:example.com, while URL-prefix properties usually look like https://example.com/.
Ask the AI client to call:
reauthenticate
This clears the local OAuth token cache and starts a new browser-based authorization flow.
No. URL Inspection returns Google's current indexed-view information. It does not represent a real-time crawl of a page you just changed.
npm install
npm run typecheck
npm run build
When you change a tool's input, output, or behavior, update the tools reference and the relevant tool document.
To check that tool docs still match the registered tools:
npm run docs:check
Do not commit OAuth client secrets, Service Account keys, OAuth tokens, .env files, or Search Console exports that contain sensitive data.
MIT License. See LICENSE.
Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.
Tool
OS
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"url": "{MCP_ENDPOINT_URL}"
}
}
}Paste into mcpServers in the config file. Restart Cursor after saving.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.