Google Search Console MCP Server
guchey
README
Google Search Console MCP Server
A tool for accessing Google Search Console using the Model Context Protocol (MCP) server.
Features
- Retrieve search analytics data (with dimension support)
- Detailed data analysis with customizable reporting periods
Prerequisites
- Python 3.10 or higher
- Google Cloud project with Search Console API enabled
- Service account credentials with access to Search Console
Installation
pip install mcp-server-google-search-console
Or install from source:
git clone https://github.com/yourusername/mcp-server-google-search-console.git
cd mcp-server-google-search-console
pip install -e .
Setting Up Development Environment (uv)
This project uses uv for faster package management and installation.
Installing uv and uvx
First, install uv and uvx:
pip install uv uvx
Creating and Managing Virtual Environments
To create a new virtual environment using uv:
uv venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
Installing Dependencies
After cloning the repository, install dependencies:
git clone https://github.com/yourusername/mcp-server-google-search-console.git
cd mcp-server-google-search-console
pip install -e .
To install the MCP package separately:
pip install "mcp[cli]"
Installing Development Dependencies
To install additional tools needed for development, run:
pip install -e ".[dev]"
Authentication Setup
To obtain Google Search Console API credentials:
- Access the Google Cloud Console
- Create a new project or select an existing one
- Enable the API:
- Go to "APIs & Services" > "Library"
- Search for and enable "Search Console API"
- Create credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "Service Account"
- Enter service account details
- Create a new key in JSON format
- The credentials file (.json) will be automatically downloaded
- Grant access:
- Open Search Console
- Add the service account email address (format: name@project.iam.gserviceaccount.com) as a property administrator
Usage
Set an environment variable to specify the path to your Google Search Console credentials file:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
Starting the MCP Server
Standard Method
mcp-server-gsc
Using uvx
With uvx, you can automate virtual environment and package installation:
# Run directly without installation
uvx run mcp-server-gsc
# Run with a specific Python version
uvx --python=3.11 run mcp-server-gsc
# Run with specified environment variables
uvx run -e GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json mcp-server-gsc
Configuration for Claude Desktop Application
Standard Configuration
{
"mcpServers": {
"gsc": {
"command": "mcp-server-gsc",
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/credentials.json"
}
}
}
}
Configuration Using uvx
{
"mcpServers": {
"gsc": {
"command": "uvx",
"args": ["run", "mcp-server-gsc"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/credentials.json"
}
}
}
}
Available Tools
search_analytics
Retrieve search performance data from Google Search Console:
Required Parameters:
siteUrl: Site URL (format:http://www.example.com/orsc-domain:example.com)startDate: Start date (YYYY-MM-DD)endDate: End date (YYYY-MM-DD)
Optional Parameters:
dimensions: Comma-separated list (query,page,country,device,searchAppearance)type: Search type (web,image,video,news)aggregationType: Aggregation method (auto,byNewsShowcasePanel,byProperty,byPage)rowLimit: Maximum number of rows to return (default: 1000)
Example usage:
{
"siteUrl": "https://example.com",
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"dimensions": "query,country",
"type": "web",
"rowLimit": 500
}
Release Procedure
This project is automatically published to PyPI when a GitHub release tag is created.
To release a new version:
-
Run the version update script:
python scripts/bump_version.py [major|minor|patch] -
Follow the displayed instructions to push to GitHub:
git add pyproject.toml git commit -m "Bump version to x.y.z" git tag vx.y.z git push origin main vx.y.z -
Create a release on the GitHub repository page:
- Select tag:
vx.y.z - Enter title:
vx.y.z - Fill in release notes
- Click "Publish"
- Select tag:
-
GitHub Actions will be triggered and automatically publish the package to PyPI.
License
MIT
Contributions
Contributions are welcome! Please read the contribution guidelines before submitting a pull request.
Recommended Servers
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.
Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
MATLAB MCP Server
Integrates MATLAB with AI to execute code, generate scripts from natural language, and access MATLAB documentation seamlessly.
Macrostrat MCP Server
Enables Claude to query comprehensive geologic data from the Macrostrat API, including geologic units, columns, minerals, and timescales through natural language.
MCP Word Counter
A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.