This MCP server connects Google Search Console (GSC) with Claude AI, allowing you to analyze SEO data through natural language conversations. You can access property information, search analytics, URL inspection, and sitemap management by simply chatting with Claude.
Before getting started, you'll need to install:
The tool supports two authentication methods:
https://www.googleapis.com/auth/webmasters
service_account_credentials.json
Download the tool:
git clone https://github.com/AminForou/mcp-gsc.git
Or download the ZIP file from the GitHub repository and unzip it.
Navigate to the folder in terminal:
cd path/to/mcp-gsc-main
Create a virtual environment:
# Using uv (recommended):
pip install uv
uv venv .venv
# OR using standard Python:
python -m venv .venv
Activate the virtual environment:
# On Mac/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate
Install dependencies:
# Using uv:
uv pip install -r requirements.txt
# OR using standard pip:
pip install -r requirements.txt
Open your Claude Desktop configuration file:
# For Mac users:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
# For Windows users:
notepad %APPDATA%\Claude\claude_desktop_config.json
Add the appropriate configuration:
{
"mcpServers": {
"gscServer": {
"command": "/FULL/PATH/TO/.venv/bin/python",
"args": ["/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"],
"env": {
"GSC_OAUTH_CLIENT_SECRETS_FILE": "/FULL/PATH/TO/client_secrets.json"
}
}
}
}
{
"mcpServers": {
"gscServer": {
"command": "/FULL/PATH/TO/.venv/bin/python",
"args": ["/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"],
"env": {
"GSC_CREDENTIALS_PATH": "/FULL/PATH/TO/service_account_credentials.json",
"GSC_SKIP_OAUTH": "true"
}
}
}
}
Replace all paths with the actual locations on your computer.
Save the file and restart Claude Desktop
Once connected, you can use the following tools by asking Claude:
list_properties
- Shows all your GSC propertiesget_site_details
- Shows details about a specific siteadd_site
- Adds a new site to your GSC propertiesdelete_site
- Removes a site from your GSC propertiesget_search_analytics
- Shows top queries and pages with metricsget_performance_overview
- Gives a summary of site performanceget_search_by_page_query
- Analyzes search terms driving traffic to specific pagescompare_search_periods
- Compares performance between different time periodsget_advanced_search_analytics
- Provides detailed analytics with filtering optionscheck_indexing_issues
- Checks if pages have indexing problemsinspect_url_enhanced
- Detailed inspection of a specific URLbatch_url_inspection
- Inspects multiple URLs at onceget_sitemaps
- Lists all sitemaps for your sitelist_sitemaps_enhanced
- Provides enhanced sitemap informationsubmit_sitemap
- Submits a new sitemap to Googleget_sitemap_details
- Checks the status of a specific sitemapHere are some effective prompts you can use:
On macOS, create a Python alias:
sudo ln -s $(which python3) /usr/local/bin/python
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "gscServer" '{"command":"/FULL/PATH/TO/-main/.venv/bin/python","args":["/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"],"env":{"GSC_OAUTH_CLIENT_SECRETS_FILE":"/FULL/PATH/TO/client_secrets.json"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"gscServer": {
"command": "/FULL/PATH/TO/-main/.venv/bin/python",
"args": [
"/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"
],
"env": {
"GSC_OAUTH_CLIENT_SECRETS_FILE": "/FULL/PATH/TO/client_secrets.json"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"gscServer": {
"command": "/FULL/PATH/TO/-main/.venv/bin/python",
"args": [
"/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"
],
"env": {
"GSC_OAUTH_CLIENT_SECRETS_FILE": "/FULL/PATH/TO/client_secrets.json"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect