MCP Toolbox for Databases (BigQuery and more)
Google's open-source MCP server that gives an agent ready-made SQL, schema and forecasting tools for BigQuery and 30-plus other databases, or tools you define in YAML.
Install
-
BigQuery (stdio, pinned)
npx -y @toolbox-sdk/server@1.13.0 --prebuilt bigquery --stdioSet BIGQUERY_PROJECT and have Google Application Default Credentials available. Set BIGQUERY_READONLY=true unless the agent needs to write.
-
Other databases
npx -y @toolbox-sdk/server@1.13.0 --prebuilt=postgres --stdioSwap postgres for snowflake, clickhouse, mysql, spanner, etc. Each needs its own connection variables — see the prebuilt tools reference.
A single Go binary (also on npm as @toolbox-sdk/server) that turns a database connection into
MCP tools. With --prebuilt bigquery you get execute_sql, dataset and table listing and
metadata, catalog search, ask_data_insights, analyze_contribution (what drove a metric
change) and forecast, which runs BigQuery’s AI.FORECAST over a time series. The same flag
works for Snowflake, ClickHouse, Postgres, MySQL, Spanner, Oracle, MongoDB and others.
When to use it
- Ask questions of a warehouse in plain English and see the SQL that answered them.
- A quick time-series forecast in BigQuery without setting up a forecasting library.
- One MCP server across several databases, or custom tools with fixed, parameterised SQL.
Before you install
Lock it down first. Set BIGQUERY_READONLY=true (or writeMode blocked/protected), restrict
allowedDatasets in a custom config, and set BIGQUERY_MAXIMUM_BYTES_BILLED so a bad query
can’t run up a large scan bill. Use a service account or role with only the datasets the agent
needs. Google also offers managed remote MCP servers for its databases if you’d rather not run
this yourself.
Limits
Forecasts are statistical projections with uncertainty; read the prediction intervals, not just the point estimate. Agent-written SQL can be wrong while still running — check joins and filters on anything you report.
- Publisher
- Works with
- Claude Code, Codex, Gemini, Cursor, Any agent
- Categories
- Data & analytics, Scenario modeling & forecasting, MCP & integrations, Databases & warehouses
- License
- Apache-2.0
- Cost
- Free