# Build data analytics agents faster with BigQuery’s fully managed, remote MCP server

January 7, 2026

##### Vikram Manghnani

Technical Program Manager

##### Prem Ramanathan

Software Engineer

Connecting AI agents to your enterprise data shouldn't require complex custom integrations or weeks of development. With the release of fully managed, remote [Model Context Protocol (MCP) servers for Google services](https://cloud.google.com/blog/products/ai-machine-learning/announcing-official-mcp-support-for-google-services?e=48754805) last month, you can now use BigQuery MCP server to give your AI agents a direct, secure, way to analyze data. This fully managed MCP server removes management overhead, enabling you to focus on developing intelligent agents.

MCP server support for BigQuery is also available via the open source [MCP Toolbox for Databases](https://googleapis.github.io/genai-toolbox/getting-started/introduction/), designed for those seeking more flexibility and control over the servers. In this blog post, we discuss and demonstrate the integrations of newly released [fully managed, remote BigQuery Server](https://docs.cloud.google.com/bigquery/docs/use-bigquery-mcp), which is in preview as of January 2026.

Remote MCP servers run on the service's infrastructure and offer an HTTP endpoint to AI applications.  This enables communication between the AI MCP client and the MCP server using a defined standard.

MCP helps accelerate the AI agent building process by giving LLM-powered applications direct access to your analytics data through a defined set of tools. Integrating the BigQuery MCP server with the ADK using the Google OAuth authentication method can be straightforward, as you can see below with our discussion of [Agent Development Kit (ADK)](https://google.github.io/adk-docs) and [Gemini CLI](https://geminicli.com/). Platforms and frameworks such as LangGraph, Claude code, Cursor IDE, or other MCP clients can also be integrated without significant effort.

Let's get started.

## **Use BigQuery MCP server with ADK**

To build a BigQuery Agent prototype with ADK, follow a six-step process:

1. Prerequisites: Set up the project, necessary settings, and environment.
2. Configuration: Enable MCP and required APIs.
3. Load a sample dataset.
4. Create an OAuth Client.
5. Create a Gemini API Key.
6. Create and test agents.

IMPORTANT: When planning for a production deployment or using AI agents with real data, ensure adherence to [AI security and safety](https://docs.cloud.google.com/mcp/ai-security-safety) and [stability](https://docs.cloud.google.com/mcp/mcp-gcp-stability-commitment) guidelines.

### **Step 1: Prerequisites > Configuration and environment**

**1.1 Set up a Cloud Project** Create or use existing [Google Cloud Project](https://console.cloud.google.com/projectselector2/home/dashboard) with billing enabled.

**1.2 User roles** Ensure your user account has the following permissions to the project:

1. roles/bigquery.user (for running queries)
2. roles/bigquery.dataViewer (for accessing data)
3. roles/mcp.toolUser (for accessing MCP tools)
4. roles/serviceusage.serviceUsageAdmin (for enabling apis)
5. roles/iam.oauthClientViewer (oAuth)
6. roles/iam.serviceAccountViewer (oAuth)
7. roles/oauthconfig.editor (oAuth)

**1.3 Set up environment** Use MacOS or Linux Terminal with the gcloud CLI installed.

In the shell, run the following command with your Cloud PROJECT_ID and authenticate to your Google Cloud account; this is required to enable ADK to access BigQuery.

```
# Set your cloud project id in env variable
BIGQUERY_PROJECT=PROJECT_ID

gcloud config set project ${BIGQUERY_PROJECT}
gcloud auth application-default login
```

### **Step 2: Configuration > User roles and APIs**

**2.1 Enable BigQuery and MCP APIs** Run the following command to enable the BigQuery APIs and the [MCP APIs](https://docs.cloud.google.com/mcp/enable-disable-mcp-servers).

```
gcloud services enable bigquery.googleapis.com --project=${BIGQUERY_PROJECT}
gcloud beta services mcp enable bigquery.googleapis.com --project=${BIGQUERY_PROJECT}
```

### **Step 3: Load sample dataset > cymbal_pets dataset**

**3.1 Create cymbal_pets dataset** For this demo, let’s use the cymbal_pets dataset. Run the following command to load the cymbal_pets database from the public storage bucket:

```
# Create the dataset if it doesn't exist (pick a location of your choice)
bq --project_id=${BIGQUERY_PROJECT} mk -f --dataset --location=US cymbal_pets

# Load the data
for table in products customers orders order_items; do
 bq --project_id=${BIGQUERY_PROJECT} query --nouse_legacy_sql 
 "LOAD DATA OVERWRITE cymbal_pets.${table} FROM FILES(
  format = 'avro',
  uris = [ 'gs://sample-data-and-media/cymbal-pets/tables/${table}/*.avro']);"
done
```

### **Step 4: Create OAuth Client ID**

**4.1 Create OAuth Client ID** We will be using Google OAuth to connect to the BigQuery MCP server. In the Google Cloud console, go to Google Auth Platform > Clients > [Create client](https://console.cloud.google.com/auth/clients/create).

- Select Application type value as “Desktop app”.
- Once client is created, make sure to copy the Client ID and Secret and keep it safe.

### **Step 5: API Key for Gemini**

**5.1 Create API Key for Gemini** Create a Gemini API key at [API Keys page](https://aistudio.google.com/api-keys). We will need a generated key to access the Gemini model using ADK.

### **Step 6: Create ADK web application**

**6.1 Install ADK** To install ADK and initiate an agent project, follow the instructions outlined in the [Python Quickstart for ADK](https://google.github.io/adk-docs/get-started/python/).

**6.2 Create a new ADK Agent** Now, create a new agent for our BigQuery remote MCP server integration.

```
adk create cymbal_pets_analyst
```

**6.3 Configure the env file** Run following command to update the **cymbal_pets_analyst/.env** file, with the below list of variables and their actual values.

```
cat >> cymbal_pets_analyst/.env <<EOF
GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_CLOUD_PROJECT=BIGQUERY_PROJECT
GOOGLE_CLOUD_LOCATION=REGION
GOOGLE_API_KEY=AI_STUDIO_API_KEY
OAUTH_CLIENT_ID=YOUR_CLIENT_ID
OAUTH_CLIENT_SECRET=YOUR_CLIENT_SECRET
EOF
```

**6.4 Update the agent code** Edit the `cymbal_pets_analyst/agent.py` file, replace file content with the provided code to set up OAuth2 authentication and connection parameters.

```python
import os
from google.adk.agents.llm_agent import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams
from google.adk.auth.auth_credential import AuthCredential, AuthCredentialTypes
from google.adk.auth import OAuth2Auth

def get_oauth2_mcp_tool():
    auth_scheme = OAuth2(...)
    auth_credential = AuthCredential(...)
    bigquery_mcp_tool_oauth = McpToolset(...)
    return bigquery_mcp_tool_oauth

root_agent = Agent(...)
```

**6.5 Run the ADK application** Run this command from the parent directory that contains cymbal_pets_analyst folder.

```
adk web --port 8000 .
```

Launch the browser, point to http://127.0.0.1:8000/ and select your agent name from the dropdown. You now have your personal agent to answer questions about the cymbal pets data.

**Here are some questions you can ask:**

- What datasets are in my_project?
- What tables are in the cymbal_pets dataset?
- Get the schema of the table customers in cymbal_pets dataset
- Find the top 3 orders by volume in the last 3 months...

## **Use BigQuery MCP server with Gemini CLI**

To use [Gemini CLI](https://geminicli.com/), you can use the following configuration in your ~/.gemini/settings.json file.

```
{
  "mcpServers": {
   "bigquery": {
    "httpUrl": "https://bigquery.googleapis.com/mcp",
    "authProviderType": "google_credentials",
    "oauth": {
     "scopes": [
      "https://www.googleapis.com/auth/bigquery"
     ]
    }
   }
  }
}
```

Then run authenticate with gcloud.

```
gcloud auth application-default login --clien-id-file YOUR_CLIENT_ID_FILE
```

Run Gemini CLI.

```
gemini
```

## **BigQuery MCP server for your agents**

You can integrate BigQuery tools into your development workflow and create intelligent data agents using LLMs and the BigQuery MCP server.  Before you build agents for production or use them with real data, be sure to follow [AI security and safety](https://docs.cloud.google.com/mcp/ai-security-safety) guidelines.
