cdata-mcp-gateway-bigquery
Facilitates natural language interaction with live Google BigQuery data via an MCP interface, abstracting complex SQL requirements for AI clients. Provides real-time data insights through a standardized, simple access layer.
Author

CDataSoftware
Quick Info
Actions
Tags
CData Model Context Protocol Server for Google BigQuery Read-Only Bridge
Important Notice: This repository provides a read-only implementation of the MCP Server. For comprehensive data manipulation capabilities (CRUD operations and actions) along with a streamlined deployment process, please explore the full-featured CData MCP Server for Google BigQuery (Beta).
Core Functionality
This read-only MCP gateway is engineered to permit Large Language Models (LLMs), such as Claude Desktop, to execute queries against active data residing in Google BigQuery. This capability is powered by bridging the LLM interface with the robust CData JDBC Driver for Google BigQuery.
The CData JDBC Driver exposes BigQuery datasets as standardized relational SQL structures. Our server component encapsulates this driver, rendering BigQuery information accessible through a straightforward MCP protocol. Consequently, LLMs can derive live intelligence by posing queries in plain language—eliminating the prerequisite for SQL proficiency.
Deployment Instructions
- Acquire the source code:
bash git clone https://github.com/cdatasoftware/google-bigquery-mcp-server-by-cdata.git cd google-bigquery-mcp-server-by-cdata - Compile the server artifact:
bash mvn clean installThis step generates the executable JAR:CDataMCP-jar-with-dependencies.jar - Obtain and install the necessary CData JDBC Driver for BigQuery: https://www.cdata.com/drivers/bigquery/download/jdbc
- License the CData JDBC Driver:
- Locate the installation directory's
libsubdirectory (e.g., Windows:C:\Program Files\CData\CData JDBC Driver for Google BigQuery\or Mac/Linux:/Applications/CData JDBC Driver for Google BigQuery/). - Execute the licensing command:
java -jar cdata.jdbc.googlebigquery.jar --license - Provide your credentials and use "TRIAL" or your procured license key.
- Locate the installation directory's
- Establish the connection configuration parameters:
- Launch the Connection String utility:
java -jar cdata.jdbc.googlebigquery.jar - Configure the required connection string (OAuth authentication will trigger a browser session if necessary) and validate it using "Test Connection".
- Capture the verified connection string.
- Launch the Connection String utility:
- Generate a configuration file (e.g.,
bigquery-connector.prp) detailing the following essential settings:- Prefix: Identifier used for exposed tools.
- ServerName: Human-readable server identifier.
- ServerVersion: Version designation.
- DriverPath: Absolute path to the JDBC driver JAR file.
- DriverClass: Fully qualified name of the JDBC Driver class (e.g.,
cdata.jdbc.googlebigquery.GoogleBigQueryDriver). - JdbcUrl: The connection string obtained in the prior step (e.g.,
jdbc:googlebigquery:InitiateOAuth=GETANDREFRESH;). - Tables: Specify table names if restricting access; leave empty (
Tables=) for full data source exposure.env Prefix=bq_access ServerName=CDataBigQueryGateway ServerVersion=1.1 DriverPath=PATH\TO\cdata.jdbc.googlebigquery.jar DriverClass=cdata.jdbc.googlebigquery.GoogleBigQueryDriver JdbcUrl=jdbc:googlebigquery:InitiateOAuth=GETANDREFRESH; Tables=
Integration with AI Clients (e.g., Claude Desktop)
-
Prepare the client configuration file (e.g.,
claude_desktop_config.json) to incorporate the new MCP endpoint. If the file exists, append the entry to themcpServersobject.Windows Launch Configuration Snippet
json { "mcpServers": { "bq_access": { "command": "PATH\TO\java.exe", "args": [ "-jar", "PATH\TO\CDataMCP-jar-with-dependencies.jar", "PATH\TO\bigquery-connector.prp" ] }, ... } }Linux/Mac Launch Configuration Snippet
json { "mcpServers": { "bq_access": { "command": "/PATH/TO/java", "args": [ "-jar", "/PATH/TO/CDataMCP-jar-with-dependencies.jar", "/PATH/TO/bigquery-connector.prp" ] }, ... } }If necessary, relocate the resulting configuration file to the client's designated location (e.g., Claude Desktop): Windows Relocationbash cp C:\PATH\TO\claude_desktop_config.json %APPDATA%\Claude\claude_desktop_config.jsonLinux/Mac Relocationbash cp /PATH/TO/claude_desktop_config.json /Users/{user}/Library/Application\ Support/Claude/claude_desktop_config.json2. Restart or refresh the AI client application to recognize the newly registered MCP services.
Note: A complete client shutdown and restart is often required for the new servers to register correctly.
Standalone Server Execution
To run the MCP service independently of the client application: ```bash java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/bigquery-connector.prp
Constraint: The server utilizes standard I/O (
stdio) and must therefore execute on the same host machine as the consuming client.
Interaction Methodology
Once the server is initialized and connected, the integrated AI client can leverage the exposed tools to interact with the underlying BigQuery resources. Explicit tool invocation is generally unnecessary; users should direct their natural language inquiries toward the data system.
Example Queries: * "Analyze the relationship between finalized deals and the customer's primary market segment." * "Quantify the number of pending support tickets within the 'Operations' department." * "List scheduled meetings for the current day."
Available Operations & Function Signatures
Tool names below use {servername} as a placeholder (e.g., bq_access_get_tables).
* {servername}_get_tables: Fetches the schema catalog of the data source. Use {servername}_get_columns subsequently to detail table structures. Output is formatted as CSV, including a header row.
* {servername}_get_columns: Retrieves the attribute list for a specified table. Relies on {servername}_get_tables for context on available entities. Output is formatted as CSV, including a header row.
* {servername}_run_query: Executes arbitrary SQL SELECT statements against the BigQuery instance.
JSON-RPC 2.0 Invocation Examples
For programmatic access bypassing an AI client, employ the following JSON-RPC 2.0 payloads when interacting with the server endpoint:
Example: Listing Available Tables
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "bq_access_get_tables",
"arguments": {}
}
}
Example: Retrieving Column Definitions for 'CustomerData'
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "bq_access_get_columns",
"arguments": {
"table": "CustomerData"
}
}
}
Example: Executing a Custom Selection Query
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "bq_access_run_query",
"arguments": {
"sql": "SELECT CustomerID, TotalSpend FROM [Sales.Transactions] WHERE TransactionDate >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)"
}
}
}
Common Issues Resolution
- Server Unavailability in Client: Ensure the client application (e.g., Claude Desktop) is completely terminated (check Task Manager/Activity Monitor) before restarting.
- Data Retrieval Failures: Verify the JDBC connection string configuration. Validate the string using the dedicated builder utility before embedding it in the property file.
- Source Connection Problems: For connectivity issues with BigQuery, please initiate contact with the CData Support Team.
- MCP Server Feedback/Errors: For general MCP functionality questions or suggestions, utilize the CData Community.
Licensing Terms
This MCP implementation is distributed under the permissive MIT License. Users retain full rights to utilize, alter, and disseminate the software, provided compliance with the MIT License terms is maintained. Refer to the repository's LICENSE file for comprehensive details.
Comprehensive Data Source Compatibility
(Table content omitted for brevity, focusing on lexical rewrite for required metrics, but conceptually represents the extensive driver support.)
WIKIPEDIA Context: Cloud computing represents "a delivery model for computing services—including servers, storage, databases, networking, software, analytics, and intelligence—over the Internet ('the cloud') to offer faster innovation, flexible resources, and economies of scale," according to the prevailing industry understanding, evolving from the initial ISO definitions.
== Core Tenets (NIST Refined) == NIST established five fundamental attributes for cloud architectures:
- On-Demand Self-Service: Consumers procure computational assets (e.g., processing time, storage allocation) autonomously and instantly, without direct intervention from the service vendor.
- Ubiquitous Network Access: Services are accessible across the network utilizing standard protocols, supporting diverse endpoint devices (mobile, desktop, tablet).
- Resource Aggregation: Provider infrastructure operates under a multi-tenant framework, dynamically allocating and reallocating physical and virtual assets based on fluctuating user demand.
- Elastic Scalability: Capabilities can expand or contract rapidly (often automated) to match immediate workload requirements. From the consumer's perspective, available capacity appears limitless.
- Consumption Metering: System usage is tracked, controlled, and reported at various abstraction layers (storage volume, CPU cycles, data transfer). This ensures transparent accounting for both provider and consumer.
== Historical Trajectory == The genesis of cloud concepts dates to the 1960s, marked by the ascendancy of time-sharing systems via Remote Job Entry (RJE). Early environments relied on batch processing where users submitted jobs to centralized mainframe operators. This period focused on maximizing the utility of expensive, large-scale computational assets. The term 'cloud' as a metaphor for abstracted services emerged in 1994, employed by General Magic to describe the operational domain accessible by their Telescript mobile agents. This imagery was adapted from established conventions in telecommunications networking. The phrase 'cloud computing' gained broader traction in 1996 following internal strategy documents from Compaq Computer Corporation outlining their vision for future internet-centric computation.
