BigQuery MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BQ_PROJECT | No | GCP project ID whose BigQuery datasets you query. Falls back to the project associated with your credentials; tools error with instructions if neither is set. | |
| BQ_LOCATION | No | BigQuery location | US |
| BQ_MCP_HOST | No | Bind host when transport is http/sse. run-http.sh overrides this to 0.0.0.0 so containers can reach it | 127.0.0.1 |
| BQ_MCP_PORT | No | Bind port when transport is http/sse | 8765 |
| BQ_ROW_LIMIT | No | Default rows returned | 200 |
| BQ_MCP_CONFIG | No | Path to the TOML config file | ~/.config/data-platform-mcp/config.toml |
| BQ_WARN_BYTES | No | Above this, ask the user to confirm before running | 1073741824 |
| BQ_MCP_AUDIT_LOG | No | JSONL record of every tool call. off disables it. SQL text is never written — only a hash and length. | ~/.local/state/data-platform-mcp/audit.jsonl |
| BQ_MCP_LOG_LEVEL | No | Verbosity of the stderr log | INFO |
| BQ_MCP_TRANSPORT | No | stdio (subprocess) or http/sse (serve over network) | stdio |
| BQ_COST_PER_TIB_USD | No | On-demand price used to render the cost estimate | 6.25 |
| BQ_MAX_BYTES_BILLED | No | Hard per-query scan cap — never exceeded | 5368709120 |
| BQ_MCP_ENVIRONMENTS | No | JSON map of environment name to settings. Takes precedence over the config file. | |
| BQ_DATASET_ALLOWLIST | No | Comma-separated dataset IDs | |
| BQ_CODE_ASSET_LOCATION | No | Pin code_asset_location to skip the probing; an explicit value is never second-guessed, so a wrong one returns an empty list rather than an error | |
| BQ_MCP_DEFAULT_ENVIRONMENT | No | Environment used when a call omits environment. Prefers a staging/dev environment when unset. | |
| BQ_IMPERSONATE_SERVICE_ACCOUNT | No | Read-only service account to impersonate | |
| GOOGLE_APPLICATION_CREDENTIALS | No | Path to a service-account key file. If not set, Application Default Credentials are used. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_environmentsA | List the configured BigQuery environments and which one is the default. Call this when the user names an environment you have not seen, or when a question could plausibly be about more than one. Free — reads only this server's configuration. |
| list_datasetsA | List the BigQuery datasets available in the data platform project. Call this first to discover what data exists. Free — scans no data. Args: environment: Which configured BigQuery environment to use. Omit to use the default. Call list_environments to see what exists. |
| list_tablesA | List tables and views inside a dataset. Free — scans no data. Args: dataset_id: The dataset to inspect, e.g. "events_raw". environment: Which configured BigQuery environment to use. Omit to use the default. Call list_environments to see what exists. |
| get_table_schemaA | Get a table's columns, partitioning, size and freshness. Free — scans no data. Call this before writing a query, for two reasons beyond column names:
Args: dataset_id: The dataset, e.g. "events_raw". table_id: The table or view name. environment: Which configured BigQuery environment to use. Omit to use the default. Call list_environments to see what exists. |
| check_table_freshnessA | Report when tables were last written, to catch stale or dead sources. Several plausible-looking tables on this platform stopped being updated without being dropped, so a query against one silently returns old data. Check before trusting a table you have not used before. Free — reads table metadata only, scanning no data. Args: dataset_id: The dataset to check, e.g. "events_raw". table_id: A single table to check. Omit to report every table in the dataset, which is the faster way to spot a dead one. environment: Which configured BigQuery environment to use. Omit to use the default. Call list_environments to see what exists. |
| list_scheduled_queriesA | List scheduled queries: what they write, when they run, and their state. Use this to answer "what populates this table?" and "why is this table stale?" — a disabled or failing scheduled query is the usual cause, and check_table_freshness can see the staleness but not the reason. The SQL is not included here; call get_scheduled_query for one of them. Args: dataset: Only queries writing into this destination dataset. contains: Only queries whose name contains this text. include_disabled: Keep disabled queries in the result. They are the most likely explanation for a table that stopped updating, so this defaults to True. environment: Which configured environment to look in. Scheduled queries are regional, so this must be the environment whose location holds them. |
| get_scheduled_queryA | Get one scheduled query in full: its SQL, destination, and recent runs. Call this after list_scheduled_queries to see why a query is failing, or what SQL actually produces a table. Args: query: The scheduled query's name, or the id from list_scheduled_queries. runs: How many recent runs to include, newest first. environment: Which configured environment to look in. |
| list_code_assetsA | List Colab notebooks and saved queries in BigQuery Studio. Use this for anything the user calls a Colab notebook, Colab Enterprise notebook, "colab script", BigQuery notebook, saved query or data canvas -- BigQuery Studio stores all of them as code assets and this lists them all. Free -- this reads metadata only and never opens an asset. Bodies are what cost quota, so filter here first and open individual assets afterwards. Args: environment: Which configured environment to read. Omit for the default. asset_type: Restrict to one of 'sql', 'notebook', 'data_canvas'. Saved queries usually outnumber notebooks by a wide margin, so this is the difference between a readable answer and 600 rows. name_contains: Case-insensitive substring match on the display name. limit: Maximum assets to return. |
| get_code_assetA | Return one Colab notebook or saved query's contents, by name or id. Notebook outputs are stripped -- across 52 real notebooks they were 77% of the bytes, and none of the logic. Args: asset: Display name (as shown in BigQuery Studio) or the asset id. environment: Which configured environment to read. Omit for the default. |
| find_code_assets_using_tableA | Find which Colab notebooks and saved queries reference a table. The question to ask before changing or dropping a table:
Unlike the other tools here this one opens every asset it considers, which
costs Dataform read quota. It is bounded by Args: table: Table name to search for. A bare name matches any qualification; 'dataset.table' or a fully-qualified name narrows it. environment: Which configured environment to read. Omit for the default. asset_type: Restrict to 'sql', 'notebook' or 'data_canvas'. max_assets: Ceiling on how many bodies to read. |
| list_notebook_schedulesA | List scheduled Colab notebooks with how many recent runs passed or failed. This is the health overview for scheduled notebook work: what is scheduled, whether it is active or paused, and — the part that is otherwise invisible — how its actual runs have been going. Do not read a schedule's own state as health. A schedule reports its last scheduled run as "OK" when it successfully launched the notebook, whether or not the notebook then failed; on this platform every schedule says OK while hundreds of runs have failed. The pass/fail numbers here come from the execution jobs, which is the only place the outcome exists. Args: environment: Which configured environment to read. Omit for the default. state: Restrict to 'active' or 'paused'. A paused schedule that used to fail is a common find — someone paused it instead of fixing it. name_contains: Case-insensitive substring match on the schedule name. lookback_days: How far back to read runs for the pass/fail counts. Defaults to 30 so monthly schedules show at least one run. Larger windows cost proportionally more (90 days is roughly 23 API pages). Set to 0 to skip run history entirely and just list what exists. |
| list_notebook_runsA | List individual scheduled-notebook runs, by default the failed ones. Use this for "what has been failing?" across every scheduled notebook at once, rather than per schedule. Runs are returned newest first. Outcome cannot be filtered server-side — the API rejects a jobState filter — so this reads the runs in the window and filters here. That makes lookback_days the cost control: each 100 runs is one API call. Args: status: 'failed' (default), 'succeeded', 'running', or 'all'. environment: Which configured environment to read. Omit for the default. schedule: Restrict to one schedule, by its name or id. lookback_days: How far back to read. Defaults to 30. limit: Maximum runs to return. |
| get_notebook_scheduleA | Get one scheduled notebook in full: its cron, its notebook, and recent runs. Call this after list_notebook_schedules to see why a scheduled notebook is
failing. The error text for each failed run is included, and Args: schedule: The schedule's name or its id from list_notebook_schedules. runs: How many recent runs to include, newest first. environment: Which configured environment to read. Omit for the default. |
| run_queryA | Run a read-only (SELECT/WITH) SQL query against BigQuery and return rows. Cost safety: the query is ALWAYS dry-run first to estimate how much data it
will scan. If that estimate is above the warning threshold, the query does
NOT run — instead this returns Always fully-qualify tables as Args: sql: A SELECT (or WITH ... SELECT) query. max_rows: Max rows to return, to keep responses small. 0 (the default) uses the server's configured limit. confirm_expensive: Set True only after the user has agreed to a query previously flagged as costly. Leave False for the first attempt. environment: Which configured BigQuery environment to query. Omit to use the default. Call list_environments to see what exists. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Each tool targets a distinct resource and action: discovery (list_environments/datasets/tables), schema/freshness, code assets, scheduled SQL queries, and scheduled notebooks. The list/get pairs and the freshness-vs-scheduled-query distinction are explicitly spelled out, leaving no real overlap.
Consistent snake_case verb_noun pattern throughout (list_datasets, get_table_schema, check_table_freshness, run_query). find_code_assets_using_table is longer but follows the same convention.
14 tools sit in the ideal band and each earns its place, covering distinct phases of a BigQuery workflow (discovery, schema inspection, cost-safe querying, schedule diagnosis) without redundancy.
The read-and-query surface is thorough: environments, datasets, tables, schema, freshness, scheduled queries, notebook schedules/runs, code assets, and ad-hoc query execution. Write/DDL operations are absent, which appears intentional for a read-only query server, but leaves a minor gap if mutation were ever expected.