Connector guide6-minute read11 MCP tools7 languages

Google BigQuery to MCP: Explore and Query your Data from any AI Agent

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

HCBy HelpCode teamUpdated 6 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Google BigQuery

Google BigQuery

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

tools

11

Region

INTL

Category

Databases

Authentication

OAuth 2.0

Required env vars

GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Google BigQuery in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

Try asking

Example prompts for Google BigQuery

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Google BigQuery · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Google BigQuery, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Google BigQuery

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

Setup

  1. Open console.cloud.google.com, pick or create a project, then go to APIs & Services → Library and enable the BigQuery API.
  2. Open APIs & Services → OAuth consent screen. Choose Internal if you are on Google Workspace (the simplest option), otherwise External. For External, set the publishing status to In production: while the app is in Testing, Google revokes its refresh tokens after 7 days and the connector stops working every week. For your own account you can click through the "unverified app" warning.
  3. Open APIs & Services → Credentials → Create credentials → OAuth client ID, choose the application type Web application and add the authorized redirect URI https://cloud.anythingmcp.com/api/mcp-oauth/callback. If you host AnythingMCP yourself, enter https://your-anythingmcp-host/api/mcp-oauth/callback instead.
  4. Paste the client ID into GOOGLE_CLIENT_ID and the client secret into GOOGLE_CLIENT_SECRET, then install the connector.
  5. On the connector page, click Authorize with Provider and sign in with the Google account whose BigQuery data the AI should use. The refresh token is stored encrypted and access tokens are renewed automatically.

One Google client for all Google connectors: the same Cloud project and OAuth client can serve every Google connector, from Gmail and Google Sheets to Search Console and Firebase. Enable each API in that project, reuse the same client ID and secret, and authorize each connector once.

Roles: the connector asks for https://www.googleapis.com/auth/bigquery, but what the AI can read, query or change is decided by the signed-in account's roles. To run queries the account needs BigQuery Job User on the project that runs them and BigQuery Data Viewer on the data.

Read-only setup: Google offers no BigQuery read-only scope for this API. Change the scope in the connector's OAuth settings to https://www.googleapis.com/auth/cloud-platform.read-only, authorize again, give the account only BigQuery Data Viewer and BigQuery Job User, and disable bigquery_cancel_job. Statements that change data then fail with 403.

Exploring is free: listing projects, datasets and tables, reading a schema with bigquery_get_table and looking at sample rows with bigquery_preview_table_rows scan no bytes. The AI reads the schema before it writes SQL.

Queries cost money, so the AI dry-runs first: on on-demand pricing BigQuery bills the bytes a query scans, about 6.25 US dollars per TiB in most regions (the first TiB each month is free). Before it runs a query on a table it has not sized, the AI runs a free dry run, tells you the estimate in GB and the approximate cost, and asks you to confirm anything above 10 GB, with suggestions to narrow it (fewer columns, a partition filter, a shorter date range). It then sets a byte limit slightly above the estimate, so a query that would bill more fails without charge. LIMIT does not reduce the bytes scanned.

Statements that change data wait for your yes: bigquery_run_query can run any GoogleSQL statement the account is allowed to run, including INSERT, UPDATE, DELETE, MERGE, CREATE, ALTER and DROP. Before anything other than a SELECT, the AI shows you the exact statement and its effect and waits for an explicit yes. Cancelling a running job with bigquery_cancel_job asks first too.

Results and history: a query returns up to 100 rows by default (1,000 at most); the AI pages on with bigquery_get_query_results, which also waits for long queries. bigquery_list_jobs and bigquery_get_job show past jobs with their SQL, bytes processed and billed, and errors.

Common errors: 401 means the authorization expired or was revoked (always after 7 days while the consent screen is in Testing): click Authorize with Provider again. 403 accessDenied: the account lacks a role (Job User on the query project, Data Viewer on the data), or a read-only scope was used for a change. 403 "BigQuery API has not been used in project": enable the BigQuery API in the Cloud project of the OAuth client. 403 bytesBilledLimitExceeded: the query would have scanned more than the limit, and nothing was charged. 400 invalidQuery: an SQL error, and the message names the position. 404 notFound: a wrong project, dataset or table id, or a job looked up without its location. 403 quotaExceeded or rateLimitExceeded: wait and try again.

The connector does not load or export data, copy tables, manage BigQuery ML models or scheduled queries, or use the Storage Read API. It creates or deletes datasets and tables only through SQL statements in a query, after your confirmation.

Prerequisites: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET

Install the connector locally

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Open http://localhost:3000/connectors/store, pick Google BigQuery and paste in the env vars listed under Prerequisites.

Available tools

ToolWhat it does
bigquery_list_projectsList the Google Cloud projects the signed-in account can use in BigQuery, with project id, name and number
bigquery_list_datasetsList the datasets of a project with their location and labels
bigquery_get_datasetGet one dataset: description, location, creation and modification times, default table expiration and labels
bigquery_list_tablesList the tables, views and materialized views of a dataset with type, partitioning and clustering
bigquery_get_tableGet a table's schema (column names, types, modes, descriptions, nested fields), row count, size in bytes, partitioning, clustering, whether…
bigquery_preview_table_rowsRead the first rows of a table directly, without running a query: FREE, no bytes are billed
bigquery_run_queryRun a GoogleSQL query (jobs.query)
bigquery_get_query_resultsGet the result rows of a query job, page by page, or wait for a query that was still running (jobComplete false)
bigquery_list_jobsList recent BigQuery jobs of a project (queries, loads, copies, exports), newest first, with state, SQL, bytes processed and errors
bigquery_get_jobGet one job: its SQL, state (PENDING, RUNNING, DONE), errors, start and end times, bytes processed and billed, slot time, cache hit and…
bigquery_cancel_jobAsk BigQuery to cancel a running job

Example prompts

  • "Which datasets are in our analytics project, and what columns does the events table have?"
  • "Show me ten sample rows of the orders table without running a query."
  • "How many orders per country did we have last month? Dry-run the query first and tell me how much data it scans."
  • "Which of my BigQuery queries this week billed the most bytes, and what did they run?"
  • "In the public dataset bigquery-public-data.samples.shakespeare, which ten words appear most often in Hamlet? Tell me the estimated cost before you run it."

Next steps

Was this guide helpful?

Your Google BigQuery agent is one click away.

Install the connector, paste the key, prompt your AI client. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Google BigQuery to ChatGPT via MCP

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

Connectors

How to Connect Google BigQuery to Claude via MCP

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

Connectors

How to Connect Google BigQuery to Cursor via MCP

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

Connectors

How to Connect Google BigQuery to Gemini via MCP

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

Connectors

How to Connect Google BigQuery to Meta Muse via MCP

Let your AI explore and query Google BigQuery: list projects, datasets and tables, read schemas, preview rows for free, estimate a query's cost with a dry run before running it, page through results and check the job history. Signs in with your Google account.

Connectors

Avito to MCP: Manage Avito Ads, Prices and Statistics from any AI Agent

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.