MG

metehan777/google-search-console-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

25 stars 9 forks 品質 55 トレンド 11

It connects directly to your Google Search Console account via the official API, letting you access key data right from AI tools like Claude Desktop or OpenAI Agents SDK and others .

概要

This project provides a Model Context Protocol (MCP) server that allows Claude AI (via the Claude Desktop app) or others to interact with the Google Search Console API. You can use it to query performance data, inspect URLs, check indexing status, and more, directly from your Claude chat (or others). You can follow me on X @metehan777 and visit my blog https://metehan.ai Based on the available Google Search Console API endpoints allowed in this project: * List accessible sites/properties in your Search Console account. * Fetch search performance data (clicks, impressions, CTR, position) with various filters and dimensions. * Inspect the status of a specific URL in the Google index, check its indexing status, and request indexing. * List submitted sitemaps for a site. * Get an overall site performance summary (derived from Search Analytics data).

README

以下は原文 README の抜粋です。原文を見る。

Google Search Console MCP Server

This project provides a Model Context Protocol (MCP) server that allows Claude AI (via the Claude Desktop app) or others to interact with the Google Search Console API. You can use it to query performance data, inspect URLs, check indexing status, and more, directly from your Claude chat (or others).

You can follow me on X @metehan777 and visit my blog https://metehan.ai

Features

Based on the available Google Search Console API endpoints allowed in this project:

  • Sites: List accessible sites/properties in your Search Console account.
  • Search Analytics: Fetch search performance data (clicks, impressions, CTR, position) with various filters and dimensions.
  • URL Inspection: Inspect the status of a specific URL in the Google index, check its indexing status, and request indexing.
  • Sitemaps: List submitted sitemaps for a site.
  • (Helper) Get an overall site performance summary (derived from Search Analytics data).

(Note: Index coverage details and crawl errors beyond what’s available in the URL Inspection API are generally not exposed via the Google Search Console API.)

See the Search Console API capabilities & announcements here: https://developers.google.com/webmaster-tools/v1/api_reference_index

Prerequisites

  • Python: Version 3.11 or higher.
  • pip: Python package installer (usually comes with Python).
  • Virtual Environment Tool: venv (recommended, built into Python 3).
  • Google Account: With access to the Google Search Console properties you want to query.
  • Claude Desktop App: Installed and running.

Setup Instructions

  1. Clone or Download: Get the project files onto your local machine. If using git:

    git clone https://github.com/metehan777/google-search-console-mcp.git
    cd search-console-mcp
    
  2. Create and Activate Virtual Environment: It’s highly recommended to use a virtual environment to manage dependencies.

    # Create the virtual environment (using the name 'fresh_env' as in previous steps)
    python3 -m venv fresh_env
    
    # Activate the environment
    # On macOS/Linux:
    source fresh_env/bin/activate
    # On Windows:
    # .\fresh_env\Scripts\activate
    

    (You should see (fresh_env) at the beginning of your terminal prompt)

  3. Install Dependencies: Install the required Python packages, including the project itself in editable mode.

    pip install -e .
    
  4. Google Cloud Setup & Credentials:

    • Enable API: Go to the Google Cloud Console and create a new project or select an existing one. Enable the “Google Search Console API” for your project.
    • Create OAuth Credentials:
      • Navigate to “APIs & Services” -> “Credentials”.
GitHub で README 全文を見る

インストール

npx -y @modelcontextprotocol/server-filesystem /Users/username/Desktop /Users/username/Downloads
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop", "/Users/username/Downloads" ] }, "google-search-console": { "command": "/Users/username/Documents/search-console-mcp/fresh_env/bin/python3", "args": [ "-m", "main" ], "cwd": "/Users/username/Cursor/search-console-mcp" } } }