# seotesting-com/gsc-mcp-server architecture

> Architecture diagram of the GitHub repository seotesting-com/gsc-mcp-server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/seotesting-com/gsc-mcp-server
- Repository: https://github.com/seotesting-com/gsc-mcp-server

## Overview

##### Project Type and Purpose
- This project is a Python-based backend service (an MCP [Model Context Protocol] server) designed to integrate Google Search Console data with Claude Desktop.
- Its primary purpose is to authenticate with Google Cloud (using a service account JSON), pull Search Console data, process it, and then make that data available via a set of analytics tools in Claude Desktop.
- The README outlines various steps (from generating Google Cloud credentials to integrating with Claude Desktop) that indicate this is a specialized tool focused on SEO data analysis.

##### File Structure
- The key project files include:
- server.py: This is the main application script running the MCP server.
- pyproject.toml: Contains project dependencies and build configurations.
- uv.lock: Likely related to the “uv” tool (which is used to manage Python virtual environments and possibly run commands) and its configuration.
- .gitignore and .python-version: Standard configuration files for version control and ensuring consistent Python environments.
- The minimal file tree shows that the project is self-contained; most of its setup and execution logic is in server.py, with dependencies managed in the configuration files.

##### README for Additional Insights
- It provides step-by-step instructions for:
- Generating and using Google Cloud service credentials.
- Setting up the virtual environment (using “uv venv”).
- Installing dependencies with “uv sync”.
- Running the MCP server with the proper environment variable for the credentials.
- Integrating and communicating with Claude Desktop, which uses a configuration file to point to the server.
- The README also highlights the tools (like list_sites, query_search_analytics, etc.) that the MCP server exposes once running.

##### Specific Elements
- “Claude Desktop”
- “MCP Server (server.py)”
- “Google Search Console API”
- “Google Cloud Credentials (service account JSON)”
- “uv (Environment/Dependency Manager)”
- “Python Runtime & Libraries”
- Data flow from Google Search Console API to the MCP Server.
- Command or configuration flow from the MCP Server to Claude Desktop.
- Setup/configuration flow from uv to the MCP Server (indicating its role in initializing and managing the environment).
- Another for internal processing,
- And another for client/integration components.
- Optionally, add annotations showing configuration details (like environment variables for GOOGLE_APPLICATION_CREDENTIALS) and key commands mentioned in the README (e.g., “uv venv”, “uv sync”, “mcp install server.py”).

- On the left, external components (Google Search Console API and Google Cloud Credentials).
- In the middle, the MCP Server, with a side note describing its dependencies (Python libraries, uv-managed environment).
- On the right, Claude Desktop which consumes the functionalities exposed by the MCP Server.
- The Google Search Console API feeds data/authenticates into the MCP Server.
- The MCP Server sends processed data and analytics to Claude Desktop.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "External Services"
        API["Google Search Console API"]:::external
        GCredentials["Google Cloud Credentials (service account JSON)"]:::external
    end

    subgraph "MCP Backend"
        MCP["MCP Server (server.py)"]:::backend
        UV["uv (Environment/Dependency Manager)"]:::config
        PyLib["Python Runtime & Libraries (pyproject.toml)"]:::config
        Configs["Project Config (.python-version, .gitignore)"]:::config
    end

    subgraph "Client Integration"
        Claude["Claude Desktop"]:::client
    end

    subgraph "Documentation"
        Doc["Documentation (README.md)"]:::config
    end

    API -->|"data_flow"| MCP
    GCredentials -->|"auth"| MCP
    UV -->|"env_setup"| MCP
    PyLib -->|"dependencies"| MCP
    MCP -->|"analytics"| Claude

    classDef external fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#FFCCCB,stroke:#000,stroke-width:2px;
    classDef client fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef config fill:#FFFFE0,stroke:#000,stroke-width:2px;

    click MCP "https://github.com/seotesting-com/gsc-mcp-server/blob/master/server.py"
    click UV "https://github.com/seotesting-com/gsc-mcp-server/blob/master/uv.lock"
    click PyLib "https://github.com/seotesting-com/gsc-mcp-server/blob/master/pyproject.toml"
    click Configs "https://github.com/seotesting-com/gsc-mcp-server/blob/master/.python-version"
    click Doc "https://github.com/seotesting-com/gsc-mcp-server/blob/master/README.md"
```
