Skip to main content
This guide shows you how to configure the Google BigQuery connector for WRITER Agent. After setting up this connector, WRITER Agent can execute SQL queries, list datasets and tables, and retrieve metadata to surface data insights, answer analytical questions, and generate reports based on your BigQuery data warehouse.

Set up the Google BigQuery connector

Configure the Google BigQuery connector in AI Studio under Connectors & Tools. The Google BigQuery connector requires organization-managed OAuth authentication.
The Google BigQuery connector only supports organization-managed OAuth. You must create your own Google Cloud OAuth application. Writer-managed OAuth is not available for Google BigQuery.
Google OAuth credentials expire after 6 months of inactivity. If the Google BigQuery connector is not used for 6 months, users will need to re-authenticate.

Enable the BigQuery MCP server

Before configuring the connector, enable the BigQuery API and MCP server in your Google Cloud project:
  1. Navigate to the Google Cloud Console
  2. Select your project or create a new one
  3. Enable the BigQuery API for your project (enabled by default for new projects)
  4. Enable the BigQuery MCP server by running the following command in the Google Cloud Shell or your local terminal with the Google Cloud CLI installed:
    gcloud beta services mcp enable bigquery.googleapis.com \
        --project=PROJECT_ID
    
    Replace PROJECT_ID with your Google Cloud project ID.
After March 17, 2026, the BigQuery remote MCP server is automatically enabled when you enable BigQuery.
For detailed instructions, see Google’s BigQuery MCP server documentation.

Create a Google OAuth application

Create a new Google OAuth application in the Google Cloud Console:
  1. Navigate to the Google Cloud Console
  2. Select the same project where you enabled the BigQuery MCP server
  3. Navigate to APIs & ServicesCredentials
  4. Configure the OAuth consent screen with your application details
  5. Create OAuth 2.0 credentials (Web application type)
  6. Add the Writer redirect URI to authorized redirect URIs:
    https://app.writer.com/mcp/oauth/callback
    
  7. Configure the required OAuth scopes for your application
  8. Copy the client ID and client secret for use in AI Studio
For detailed instructions, see Google’s OAuth 2.0 documentation.

Required OAuth scopes

  • https://www.googleapis.com/auth/bigquery - View and manage your data in BigQuery

Configure the connector in AI Studio

  1. Navigate to Connectors & Tools in AI Studio
  2. Select the Google BigQuery connector
  3. Select who has access by default (all users or specific teams)
  4. Select the connection type:
    • Level: User level (each user authenticates their own account) or org level (shared connection to a single account)
  5. Select which tools to enable for your agents
  6. Enter your OAuth client ID and client secret
  7. Complete the OAuth authorization flow

Next steps