home / mcp / youtube analytics mcp server

YouTube Analytics MCP Server

Provides live YouTube Analytics data via MCP with read-only access for queries and analysis.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cdatasoftware-youtube-analytics-mcp-server-by-cdata": {
      "command": "java",
      "args": [
        "-jar",
        "CDataMCP-jar-with-dependencies.jar",
        "/PATH/TO/youtube-analytics.prp"
      ]
    }
  }
}

You are running a local, read-only MCP server that exposes live YouTube Analytics data through a simple MCP interface. This lets AI clients ask natural-language questions and receive up-to-date results without writing SQL. The server connects to YouTube Analytics via the CData JDBC Driver and presents the data as MCP tools you can invoke from your MCP client.

How to use

Interact with the YouTube Analytics MCP Server using your MCP client. After you configure and start the server, your client can read data and run queries through the exposed tools. You can ask the AI client questions such as metrics by channel, audience demographics, or engagement trends, and it will translate those requests into tool calls to fetch the relevant data.

In general you will use the built-in tools to discover what data is available and then retrieve it. The common workflow is: list available tables, inspect columns for a table, and run a select-like query to obtain the data you need. No SQL is required from you; the MCP layer handles the SQL translation.

How to install

Prerequisites you need before installing include a Java runtime and a build environment for Java projects.

# Step 1: Install Java (if not already installed)
# Example for Debian/Ubuntu:
sudo apt-get update
sudo apt-get install -y default-jdk
# Step 2: Build the MCP server
mvn clean install
# This creates the jar: CDataMCP-jar-with-dependencies.jar

# Step 3: Prepare the data source connection
# Download and install the CData JDBC Driver for YouTube Analytics, and license it as described in the setup guide.

Step-by-step command flow for running the MCP server with the YouTube Analytics JDBC connection is shown below. You will run the MCP JAR with the path to your prepared .prp file that contains the JDBC connection details.

# Run the MCP server using your prepared property file
java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/youtube-analytics.prp

Additional content

Configuration details and example entries are shown below to help you wire up Claude Desktop or any other MCP client. The configuration is designed so you can run the MCP server locally and connect from a client on the same machine.

If you want to integrate with Claude Desktop, you provide a config that points to the MCP server with the jar and the .prp file. The example entry toward the end of the usage section demonstrates the expected structure.

Troubleshooting tips include ensuring the MCP server is fully started, quitting the client and re-opening it if the MCP server does not appear, and verifying the JDBC connection string is valid and tested successfully.

Available tools

YouTubeAnalytics_get_tables

Retrieves a list of tables available in the YouTube Analytics data source. Output is CSV with headers.

YouTubeAnalytics_get_columns

Retrieves a list of columns for a specified table. Output is CSV with headers.

YouTubeAnalytics_run_query

Executes a SQL SELECT query against the YouTube Analytics data source.