[Connect AI to your data](/about/connect-ai-to-marketing-data) November 13, 2026

# Connect BigQuery to Claude: connector, roles and cost caps

Add Google’s BigQuery connector to Claude or run MCP Toolbox on your machine, with read-only roles and a cap on what each query can scan.

![](/images/65d75b0ae8d69ef95785a5d6_david-pombar.webp)

**[David Pombar](/authors-guides/david-pombar)** Swiss army knife at Trackingplan

7 min read · 1583 words

> **TL;DR** To connect BigQuery to Claude, add the ** Google Cloud BigQuery** connector from Claude’s directory: Google built it, it talks to Google’s remote MCP server, and you sign in with your Google account. If your organization can’t use the directory, add the same server as a custom connector with an OAuth client you create, or run Google’s open-source MCP Toolbox on your machine. Whichever you pick, set it up read-only and cap the bytes it can scan before the first question.

BigQuery is the easy platform in this series. Google publishes the server, Anthropic lists it, and the sign-in is your normal Google account. The work is on the Google Cloud side: which identity Claude uses, what that identity can write, and how much a curious question can scan.

This guide is part of a series on [connecting AI assistants to marketing data](/guides/connect-ai-to-marketing-data). It covers the three routes into Claude, the roles, and cost control. Whether a raw MCP connection is the right tool, or a data agent with your context behind it, is covered in [BigQuery agents in your code](/guides/bigquery-agents-api-adk-mcp).

![A technician crouching in front of an open server rack in a data center, with a laptop on the floor plugged into the rack](/images/connect-bigquery-to-claude-server-rack.jpg)

The connection is the quick part. What the account on the other end can touch takes longer. Image: Derrick Coetzee, Wikimedia Commons, CC0

## Pick a route

![Diagram of three ways to connect BigQuery to Claude: the Google Cloud BigQuery connector from Claude’s directory, the same remote server added as a custom connector with your own OAuth client, and MCP Toolbox running locally over stdio. A band below says to use a separate read-only identity and a cap on bytes scanned before the first question.](/images/connect-bigquery-to-claude-routes.webp)

The first two use Google’s hosted server. The third runs on your computer.

| Route | Where it works | Best for |
| --- | --- | --- |
| Directory connector | claude.ai, Desktop, mobile, Claude Code | Most people |
| Custom connector, your OAuth client | Same | Organizations that can’t use the directory listing |
| MCP Toolbox | Claude Desktop, Claude Code | Analysts who want a bytes cap and a read-only switch |

## Before any route: the Google Cloud side

[Google’s setup page for the remote server](https://docs.cloud.google.com/bigquery/docs/use-bigquery-mcp) sets three conditions.

1.  **The API is on.** The remote MCP server is enabled with the BigQuery API, which new projects have by default.
2.  **The identity has three roles** on the project: MCP Tool User (`roles/mcp.toolUser`) to call tools, BigQuery Job User (`roles/bigquery.jobUser`) to run queries, and BigQuery Data Viewer (`roles/bigquery.dataViewer`) to read tables.
3.  **The scope is BigQuery.** The server authenticates with OAuth 2.0 and the scope `https://www.googleapis.com/auth/bigquery`.

Google recommends a separate identity for agents. Use one: a Google account or group whose only grants are the read roles on the datasets you want Claude to see. Claude inherits that identity’s permissions, nothing more and nothing less.

## Route 1: the directory connector

Claude’s directory lists **Google Cloud BigQuery**, marked ** Made by Google** and ** Anthropic verified**. It connects to `https://bigquery.googleapis.com/mcp`. [Anthropic’s connector guide](https://claude.com/docs/connectors/getting-started.md) gives the steps:

1.  In claude.ai or the desktop app, open **Customize** > ** Connectors** > ** Discover**.
2.  Search for BigQuery and select **Connect to Claude**.
3.  Sign in with the Google identity from the previous section and approve.

The connector then shows as **Connected**. It works on the web, desktop and mobile, and in Claude Code when you sign in with your Claude account. On Team and Enterprise plans, an Owner enables it for the organization first, and each member still signs in as themselves.

The listing shows five tools: `list_dataset_ids`, `get_dataset_info`, `list_table_ids`, `get_table_info` and `execute_sql`. The first four read metadata. The last one runs SQL, and Google’s page notes it’s the only one that isn’t read-only.

## Route 2: the same server, with your own OAuth client

If your organization won’t enable the directory listing, or wants the sign-in tied to its own Google Cloud project, add the server by URL. Google’s remote servers don’t register clients on their own, so you create one. [Google’s client setup page](https://docs.cloud.google.com/mcp/configure-mcp-ai-application) has the Claude values:

1.  In the Google Cloud console, go to **Google Auth Platform** > ** Clients** > ** Create client**.
2.  Set **Application type** to ** Web application**.
3.  Add `https://claude.ai` under **Authorized JavaScript origins** and `https://claude.ai/api/mcp/auth_callback` under ** Authorized redirect URIs**.
4.  Select **Create** and copy the client secret. It’s shown once.

Then, in Claude, go to **Customize** > ** Connectors** > ** Add** > ** Add custom connector**, enter a name and `https://bigquery.googleapis.com/mcp`, and select ** Continue**. Under ** OAuth client**, choose ** Use your own OAuth client** and paste the ID and secret, then ** Add** and ** Connect**. On Team, only Owners and Primary Owners add custom connectors. Free accounts get one.

In Claude Code, the command takes the client directly. [Anthropic’s Claude Code docs](https://code.claude.com/docs/en/mcp) say to register `http://localhost:PORT/callback` as the redirect URI for this flow:

```bash
claude mcp add --transport http \
  --client-id YOUR_CLIENT_ID --client-secret --callback-port 8080 \
  bigquery https://bigquery.googleapis.com/mcp
```

Run `/mcp` inside Claude Code to sign in.

## Route 3: MCP Toolbox on your machine

MCP Toolbox for Databases is Google’s open-source server, in [Google’s mcp-toolbox repository](https://github.com/googleapis/mcp-toolbox). It runs locally, uses your Application Default Credentials, and adds tools the remote server lacks: `forecast`, `analyze_contribution`, `search_catalog` and `ask_data_insights`. [Google’s Toolbox setup page](https://docs.cloud.google.com/bigquery/docs/pre-built-tools-with-mcp-toolbox) covers the install; for Claude Desktop, the config goes under **Settings** > ** Developer** > ** Edit Config**.

What makes it worth the extra setup is two environment variables listed in [the Toolbox repository’s docs](https://github.com/googleapis/mcp-toolbox/blob/main/docs/en/integrations/bigquery/prebuilt-configs/bigquery.md):

-   `BIGQUERY_READONLY=true` enforces read-only mode across every tool.
-   `BIGQUERY_MAXIMUM_BYTES_BILLED` caps the bytes each query can scan. A query over the cap fails before it runs and costs nothing.

In Claude Code, after `gcloud auth application-default login`:

```bash
claude mcp add --env BIGQUERY_PROJECT=your-project \
  --env BIGQUERY_READONLY=true \
  --env BIGQUERY_MAXIMUM_BYTES_BILLED=10000000000 \
  --transport stdio bigquery \
  -- npx -y @toolbox-sdk/server --prebuilt bigquery --stdio
```

That cap is 10 GB a query. Pick yours from the size of the tables Claude will read.

## Read-only and cost control

Three controls, from the server outwards.

-   **Tools.** Google’s server also offers `execute_sql_readonly`, which rejects DML and DDL. In Claude, open the connector’s ** Tool permissions** and set `execute_sql` to ** Blocked** or ** Needs approval**. Google’s page adds an IAM deny policy on `execute_sql` for a block Claude can’t override.
-   **Roles.** Data Viewer and Job User can’t modify tables. A role such as BigQuery Data Editor can. If the identity has it, `execute_sql` can use it.
-   **Bytes.** Google doesn’t document a per-query bytes limit on the remote server. Set BigQuery’s custom quota ** Query usage per day per user** under ** IAM & Admin** > ** Quotas & System Limits**, so a runaway question fails with `quotaExceeded`. The full set of limits, with partitions and the jobs history, is in [data agents in production](/guides/bigquery-data-agents-in-production). Google labels MCP jobs `goog-mcp-server:true`, so you can find their cost in that history.

Results are capped at 3,000 rows, and queries stop after three minutes by default. Ask for aggregates, not raw events.

## What to ask once it’s connected

GA4 export tables are where most marketing teams start. The traps in that schema are in [inside the GA4 BigQuery export](/guides/ga4-bigquery-export-schema). If you’d rather query GA4’s own reports than the export, [connect GA4 to Claude](/guides/connect-ga4-to-claude) instead.

| Ask | What it uses |
| --- | --- |
| “List the datasets in `my-project` and describe the tables in `analytics_123456`.” | `list_dataset_ids`, `get_table_info` |
| “Which columns hold traffic source and campaign in `events_*`? Don’t query yet.” | `get_table_info` |
| “Purchases and revenue by day for the last 14 days. Filter on `_TABLE_SUFFIX` and show me the SQL first.” | `execute_sql_readonly` |
| “Sessions by source and medium, this week against last week.” | `execute_sql_readonly` |
| “Find days in the last 30 where purchases fell by more than a third.” | `execute_sql_readonly` |

Asking for the SQL before the result is a habit worth keeping. It shows you the date filter, and that filter sets the bill.

## Before you trust the answers

Claude reads your tables. It doesn’t read the hits that filled them. If the checkout tag lost its `value` parameter in last Tuesday’s release, if a consent change dropped one country, or if `purchase` fires twice on one payment method, the export holds those rows, and Claude sums them into a confident revenue trend.

Trackingplan watches the hits, the dataLayer, the consent state and the pixels on real traffic, before any of it reaches BigQuery, and flags missing properties and duplicate fires when they start. An AI agent can only reason about what it can see. Its agent answers inside Claude too, as the Ask Trackingplan tool through the plan’s [MCP endpoint](/docs/mcp-endpoint), next to the BigQuery connector. Which question goes to which is covered in [warehouse agent or tracking agent](/guides/warehouse-agent-vs-tracking-agent).

## FAQ

### Is there an official BigQuery connector for Claude?

Yes. Claude’s directory lists Google Cloud BigQuery, made by Google and marked Anthropic verified. It points at Google’s remote MCP server, [https://bigquery.googleapis.com/mcp](https://bigquery.googleapis.com/mcp), and you sign in with your Google account. That identity needs MCP Tool User, BigQuery Job User and BigQuery Data Viewer on the project.

### Can Claude change or delete data in BigQuery?

It can if the identity it uses has write roles, because the execute\_sql tool runs any statement those roles allow. Give the identity only BigQuery Data Viewer and Job User, set execute\_sql to Blocked in Claude’s tool permissions or deny it with an IAM policy, and in MCP Toolbox set BIGQUERY\_READONLY to true.

### How do I limit what Claude’s BigQuery queries cost?

Google doesn’t document a per-query bytes setting for the remote server, so cap the identity with BigQuery’s custom quota for query usage per day per user. If you run MCP Toolbox, set BIGQUERY\_MAXIMUM\_BYTES\_BILLED: a query over the limit fails before it runs and costs nothing.

### Do I need a paid Claude plan to connect BigQuery?

No. Directory connectors are available on every plan, and custom connectors too, with Free limited to one. On Team and Enterprise an Owner has to enable the connector first. MCP Toolbox runs locally in Claude Desktop or Claude Code.

Part of[Connect Claude or ChatGPT to your marketing data](/guides/connect-ai-to-marketing-data)

On this page

1.  [*01*Pick a route](#pick-a-route)
2.  [*02*Before any route: the Google Cloud side](#before-any-route-the-google-cloud-side)
3.  [*03*Route 1: the directory connector](#route-1-the-directory-connector)
4.  [*04*Route 2: the same server, with your own OAuth client](#route-2-the-same-server-with-your-own-oauth-client)
5.  [*05*Route 3: MCP Toolbox on your machine](#route-3-mcp-toolbox-on-your-machine)
6.  [*06*Read-only and cost control](#read-only-and-cost-control)
7.  [*07*What to ask once it’s connected](#what-to-ask-once-it-s-connected)
8.  [*08*Before you trust the answers](#before-you-trust-the-answers)
9.  [*09*FAQ](#faq)

**Stop babysitting tags**

Trackingplan audits your real user data around the clock and flags issues before they cost you.

[Start free trial →](https://app.trackingplan.com/signup)

![](/images/65d75b0ae8d69ef95785a5d6_david-pombar.webp)

**David Pombar** Swiss army knife at Trackingplan

Read more from David, a Senior Product Strategist with 18+ years in digital product development and an atypical error detection knack.

Share Copy link [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.trackingplan.com%2Fguides%2Fconnect-bigquery-to-claude) [X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.trackingplan.com%2Fguides%2Fconnect-bigquery-to-claude&text=Connect%20BigQuery%20to%20Claude%3A%20connector%2C%20roles%20and%20cost%20caps)

Read next

[All Guides →](/guides)

-   [
    
    7 minConnect AI to your dataNovember 13, 2026
    
    ### Connect GA4 to Claude with Google’s MCP server
    
    Set up Google’s Analytics MCP server in Claude Desktop, Claude Code or claude.ai, see what it reads and changes, and the no-code fallback through Sheets.
    
    by **David Pombar**](/guides/connect-ga4-to-claude)
-   [
    
    7 minConnect AI to your dataNovember 13, 2026
    
    ### Connect Adobe Analytics to ChatGPT or Claude via MCP
    
    Use Adobe’s own MCP servers to query Adobe Analytics and CJA from ChatGPT or Claude: the Admin Console access, the setup and what each tool can change.
    
    by **David Pombar**](/guides/connect-adobe-analytics-to-chatgpt-claude)
-   [
    
    7 minBigQuery Data AgentsNovember 3, 2026
    
    ### BigQuery agents in your code: the API, ADK, and MCP
    
    Create and query BigQuery data agents from Python with the Conversational Analytics API, give an ADK agent BigQuery tools, and connect assistants over MCP.
    
    by **David Pombar**](/guides/bigquery-agents-api-adk-mcp)

Trackingplan

## See everything. Miss nothing.

Your implementations audited around the clock with real-time, real-user data. Real-time alerts about errors or changes in your data, campaigns, pixels, privacy and consent. Let AI flag issues before they cost you.

[Start free trial →](https://app.trackingplan.com/signup) [Book a demo](/demo)
