home / mcp / google search console mcp server
Provides access to Google Search Console data via MCP tools for sites, sitemaps, analytics, and URL inspection.
Configuration
View docs{
"mcpServers": {
"saurabhsharma2u-search-console-mcp": {
"command": "npx",
"args": [
"search-console-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/service-account-key.json"
}
}
}
}You can enable an MCP server that provides AI agents with access to Google Search Console data. It exposes management of sites, sitemaps, analytics, URL inspection, and built-in AI documentation to make interactions with GSC data efficient and scalable through MCP-compatible clients.
You will run a microservice that speaks the MCP interface and connects to Google Search Console using the provided credentials. With an MCP client, you can list sites, add or remove sites, manage sitemaps, query performance data with filters and pagination, compare metrics across date ranges, fetch top queries and pages, and inspect URL indexing status. Use the prebuilt prompts to guide AI agents through common workflows, such as analyzing site performance over a period, finding content opportunities, or identifying pages that lose traffic.
Prerequisites: you need Node.js and npm installed on your machine. You will also configure Google Cloud credentials to access the Google Search Console API.
Option 1: Use with npx (recommended) ā no installation needed.
npx search-console-mcpOption 2: Global install
npm install -g search-console-mcp
search-console-mcpOption 3: Clone for development and run from source
git clone https://github.com/saurabhsharma2u/search-console-mcp.git
cd search-console-mcp
npm install
npm run build
node dist/index.jsFollow these steps to enable API access and create credentials for the MCP server to use Google Search Console data.
Step 1 ā Create a Google Cloud Project
- Open Google Cloud Console and create a new project or select an existing one.
- Enable the Google Search Console API: APIs & Services > Library > search for "Google Search Console API" > Enable.
Step 2 ā Create a Service Account
- Go to APIs & Services > Credentials
- Click Create Credentials > Service Account and follow the prompts to create the account.
- Open the service account, go to Keys > Add Key > Create new key, choose JSON, and download the key file.
Configure your MCP client to provide the necessary credentials so the server can authenticate with Google Cloud.
Example credential approach (file-based for local development): set the path to your service account key.
Export the credentials path
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-key.json"You can run and test the MCP server locally by cloning the project, installing dependencies, building, and running the server.
# Clone the repository
git clone https://github.com/saurabhsharma2u/search-console-mcp.git
cd search-console-mcp
# Install dependencies
npm install
# Create and edit environment configuration as needed
cp .env.example .env
# Edit .env with your credentials
# Build the project
npm run build
# Run tests
npm test
# Start the server
node dist/index.jsThis MCP server is organized to separate concerns between API access, error handling, documentation for AI agents, and tool implementations.
The server implements a set of tools that AI agents can call to interact with Google Search Console data.
Built-in documentation and data resources are available for AI agents to read and use in workflows.
Pre-configured analysis workflows help AI agents perform common analyses, such as evaluating site performance over a period, comparing periods, identifying declining pages, and discovering keyword opportunities.
List all configured sites for Google Search Console within the MCP context.
Add a new site to be managed by the MCP server.
Remove a site from the MCP server.
Retrieve details for a specific site.
List sitemaps for a given site.
Get details about a specific sitemap.
Submit a new sitemap for a site.
Delete a sitemap for a site.
Query search analytics with filters, dimensions, and pagination.
Get aggregate performance metrics for a number of days.
Compare two date ranges for a site.
Retrieve top performing queries for a site.
Retrieve top performing pages for a site.
Inspect indexing status for a specific URL.