logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

cdata-google-analytics-mcp-gateway

A read-only Model Context Protocol (MCP) server enabling natural language queries against live Google Analytics metrics, leveraging the CData JDBC Driver to virtualize analytics data into relational structures.

Author

cdata-google-analytics-mcp-gateway logo

CDataSoftware

MIT License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

cdatasoftwarecdataanalyticscdata jdbccdatasoftware googlecdata provides

CData's Google Analytics MCP Endpoint Gateway

:heavy_exclamation_mark: This implementation provides strictly read-only data access. For a comprehensive interface supporting full CRUD operations and simplified deployment, explore the beta version of the CData MCP Server for Google Analytics.

Rationale

This read-only MCP Server component was engineered specifically to facilitate interactions between Large Language Models (LLMs), such as Claude Desktop, and live data residing within Google Analytics. The underlying connectivity is powered by the robust CData JDBC Driver for Google Analytics.

The CData JDBC Driver functions by presenting Google Analytics data as standard, queryable relational SQL models. This server component wraps that driver, exposing the Google Analytics information via an accessible MCP interface. Consequently, LLMs can retrieve up-to-the-minute data by formulating queries in plain language, completely circumventing the need to write explicit SQL.

Deployment Procedures

  1. Obtain the source repository: bash git clone https://github.com/cdatasoftware/google-analytics-mcp-server-by-cdata.git cd google-analytics-mcp-server-by-cdata

  2. Compile the application: bash mvn clean install

    This action generates the bundled executable JAR: CDataMCP-jar-with-dependencies.jar 3. Procure and install the CData JDBC Driver for Google Analytics: https://www.cdata.com/drivers/ganalytics/download/jdbc 4. License the CData JDBC Driver: * Navigate to the lib directory within the driver's installation path (e.g., C:\Program Files\CData\CData JDBC Driver for Google Analytics\ on Windows or /Applications/CData JDBC Driver for Google Analytics/ on Unix-like systems). * Execute the licensing utility: java -jar cdata.jdbc.googleanalytics.jar --license * Provide the required credentials (name, email) and use "TRIAL" or your validated license key. 5. Formulate the necessary connection configuration via a .prp file (e.g., google-analytics.prp), adhering to the structure below. This defines metadata for the exposed server: * Prefix: Alias for the exposed tools. * ServerName: Identifier for the service endpoint. * ServerVersion: Version tag. * DriverPath: Absolute location of the installed JDBC driver JAR file. * DriverClass: Fully qualified name of the JDBC Driver implementation class (e.g., cdata.jdbc.googleanalytics.GoogleAnalyticsDriver). * JdbcUrl: The connection string, derived using the CData utility, necessary to link to the Google Analytics instance. * Tables: Optional list of specific tables to expose; leave empty () for full schema access. env Prefix=googleanalytics ServerName=CDataGoogleAnalytics ServerVersion=1.0 DriverPath=PATH\TO\cdata.jdbc.googleanalytics.jar DriverClass=cdata.jdbc.googleanalytics.GoogleAnalyticsDriver JdbcUrl=jdbc:googleanalytics:InitiateOAuth=GETANDREFRESH; Tables=

Integration with Claude Desktop

  1. Construct or augment the client configuration file (e.g., claude_desktop_config.json) to register the new MCP gateway. The configuration snippet must be appended to the mcpServers object:

    Windows Execution Path

    { "mcpServers": { "{classname_dash}": { "command": "PATH\TO\java.exe", "args": [ "-jar", "PATH\TO\CDataMCP-jar-with-dependencies.jar", "PATH\TO\google-analytics.prp" ] }, ... } }

    Linux/Mac Execution Path

    { "mcpServers": { "{classname_dash}": { "command": "/PATH/TO/java", "args": [ "-jar", "/PATH/TO/CDataMCP-jar-with-dependencies.jar", "/PATH/TO/google-analytics.prp" ] }, ... } }

    If the config file is outside the current working directory, deploy it to the appropriate client application settings folder (e.g., for Claude Desktop): Windows Deployment bash cp C:\PATH\TO\claude_desktop_config.json %APPDATA%\Claude\claude_desktop_config.json

    Linux/Mac Deployment bash cp /PATH/TO/claude_desktop_config.json /Users/{user}/Library/Application\ Support/Claude/claude_desktop_config.json'

  2. Restart or refresh your consuming client (e.g., Claude Desktop). Server availability should update automatically.

Critical Note: Client applications often require a complete shutdown and restart to recognize newly added MCP endpoints.

Standalone Server Execution

To initiate the MCP Server independently (using stdio communication, requiring the client to be co-located): bash java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/Salesforce.prp

Constraint: Due to reliance on standard I/O streams, this execution mode necessitates that the client interacts with the server process on the identical host machine.

Operational Utilization

Upon successful configuration, the LLM client gains access to a suite of integrated utilities for interacting with the data source. Explicit invocation of these tools is generally unnecessary; prompt the LLM to address data-centric inquiries directly. Examples include: * "Analyze the covariance between closed-won deals and the associated client industry sector." * "Quantify the current volume of unresolved support cases in the 'SUPPORT' operational grouping." * "Summarize my scheduled calendar appointments for the present day."

Available Toolset & Function Descriptions

Tool naming convention: {servername} refers to the alias defined in the configuration file (e.g., {classname_dash}). * {servername}_get_tables - Fetches a comprehensive roster of accessible structures within the underlying data repository. Consult {servername}_get_columns subsequently for schema details. Output is delivered in CSV format, commencing with a header row. * {servername}_get_columns - Retrieves the field definitions for a specified data structure. Review {servername}_get_tables first to identify valid targets. Output is delivered in CSV format, commencing with a header row. * {servername}_run_query - Executes an arbitrary SQL SELECT statement against the mapped data.

JSON-RPC Interaction Schemas

For programmatic scripting scenarios bypassing an AI interface (i.e., direct JSON-RPC 2.0 calls to the server), consult the payload blueprints below for invoking the registered utilities.

Example: Invoking google_analytics_get_tables

{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "google_analytics_get_tables", "arguments": {} } }

Example: Invoking google_analytics_get_columns

{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "google_analytics_get_columns", "arguments": { "table": "Account" } } }

Example: Invoking google_analytics_run_query

{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "google_analytics_run_query", "arguments": { "sql": "SELECT * FROM [Account] WHERE [IsDeleted] = true" } } }

Diagnostic Guidance

  1. If the CData MCP Gateway is invisible within the consuming client interface, ensure the client application has been completely terminated (use Task Manager on Windows or Activity Monitor on macOS).
  2. If data retrieval consistently fails, meticulously verify the database connection parameters. Utilize the embedded Connection String Builder utility to validate the connection before committing the resulting string into the configuration (.prp) file.
  3. For connectivity issues related to the source data system, direct inquiries should be routed to the CData Support Portal.
  4. For feedback concerning the MCP server operation or general usability, engage with the CData Developer Community.

Licensing Terms

This MCP server implementation is distributed under the terms of the MIT License. This grants broad permissions for usage, modification, and distribution, contingent upon adherence to the stipulations outlined in the MIT License text, available in the accompanying LICENSE file within this repository.

See Also

`