queryLABSCO SUMMARY
The cost question gets answered before the bill.
Dry runs are the reason to reach for this one: an assistant can price a query and read the partition warning before it spends anything, and with non-SELECT statements refused and a byte ceiling in place, a bad guess costs less than it would from a console.
What it is
A read-only path into a BigQuery project: the datasets in it, the tables and schemas in a dataset, a table's structure with sample rows, a dry run that prices a query, and SELECT execution.
What you get
- Every dataset in the project
- The tables in a dataset with their schemas, partitioning and descriptions
- One table's schema plus sample rows, with a warning when a partitioned table is queried without a filter
- A query checked for validity and priced — bytes processed and estimated cost — without running it
- SELECT queries executed, with configurable limits on results and bytes billed
Requirements
A Google Cloud project and BigQuery credentials — Application Default Credentials or a service account key file — with the project ID and location passed on the launch command. Authentication is verified when the server starts.
Setup effort
Build from source — git clone https://github.com/takuya0206/bigquery-mcp-server.git
USE CASES
Finding the table that holds what you need
Datasets first, then the tables inside one with their schemas, so the search does not start with a guess at a name.
Writing SQL against a schema you have not read
Read the columns and a few real rows first, then run the query — the loop that otherwise costs two failed attempts.
Knowing what a query will cost first
The dry run returns bytes processed and an estimate, so an expensive scan is caught before it runs rather than after.
Answering a data question in the conversation
The SELECT runs and the rows come back inline, under the configured result and byte limits.
Avoiding a full scan of a partitioned table
The table information call flags the missing partition filter, and the dry run shows what leaving it out would cost.
5 tools
Listed in project docs. Your client may show a different list.
list_all_datasetslist_all_tables_with_datasetget_table_informationdry_run_queryBEFORE YOU INSTALL
What to know first
Tools you get
5 tools named in the project's documentation. Only SELECT queries are allowed regardless of your BigQuery permissions, and a single query is capped at 500GB of processing by default.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/takuya0206/bigquery-mcp-server.git
cd bigquery-mcp-server
bun install
bun run build
cp dist/bigquery-mcp-server <YOUR_PATH_TO_PLACE>
gcloud auth application-default loginOr supply a service account key file.
Add the mcpServers block to your MCP client configuration
MCP Clients
Any MCP client
{
"mcpServers": {
"BigQuery": {
"command": "<YOUR_PATH_TO_DIST_BIGQUERY_MCP_SERVER>",
"args": [
"--project-id",
"<YOUR_PROJECT_ID>",
"--location",
"asia-northeast1",
"--max-results",
"1000",
"--max-bytes-billed",
"500000000000"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}