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) and Gemini CLI. 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:
-
Prerequisites: Set up the project, necessary settings, and environment.
-
Configuration: Enable MCP and required APIs.
-
Load a sample dataset.
-
Create an OAuth Client.
-
Create a Gemini API Key.
-
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 and stability guidelines.
Step 1: Prerequisites > Configuration and environment
1.1 Set up a Cloud Project
Create or use existing Google Cloud Project with billing enabled.
1.2 User roles
Ensure your user account has the following permissions to the project:
-
roles/bigquery.user (for running queries)
-
roles/bigquery.dataViewer (for accessing data)
-
roles/mcp.toolUser (for accessing MCP tools)
-
roles/serviceusage.serviceUsageAdmin (for enabling apis)
-
roles/iam.oauthClientViewer (oAuth)
-
roles/iam.serviceAccountViewer (oAuth)
-
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.
Source Credit: https://cloud.google.com/blog/products/data-analytics/using-the-fully-managed-remote-bigquery-mcp-server-to-build-data-ai-agents/
