BigQuery MCP server
Last verified: 2026-09
Query Google BigQuery datasets.
Community Databases & data Needs a secret Claude Desktop, Cursor, Windsurf, Claude Code, VS Code
What it does
Run queries and inspect datasets in a GCP project. Needs Application Default Credentials or a service-account JSON. Treat the service account as the model's identity.
It sits in Databases & data: A database MCP is SQL or an API with your credentials.
Good for
- Run a dry SELECT on one dataset the service account can see.
- List tables in a project without opening the console.
- Let the model draft SQL you then run in the console yourself.
- Keep the job user + dataViewer role, never Owner.
Tools
- query / run — Execute SQL in the project.
- list datasets / tables — Discover what the account can see.
Config (Claude Desktop / Cursor / Windsurf)
Paste the JSON below. Same mcpServers shape. Replace placeholder paths and secrets.
Windows paths look like C:\\Users\\you\\project, not /path/to.
Host-side steps →
Claude Desktop
| OS | Config file |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json
(usually C:\Users\<you>\AppData\Roaming\Claude\) |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Cursor
| Scope | macOS / Linux | Windows |
|---|---|---|
| This project | .cursor/mcp.json in the repo root | |
| This user | ~/.cursor/mcp.json |
%USERPROFILE%\.cursor\mcp.json |
Windsurf
| OS | Config file |
|---|---|
| macOS / Linux | ~/.codeium/windsurf/mcp_config.json |
| Windows | %USERPROFILE%\.codeium\windsurf\mcp_config.json |
{
"mcpServers": {
"bigquery": {
"command": "npx",
"args": [
"-y",
"@ergut/mcp-bigquery-server"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/sa.json"
}
}
}
}
Windsurf remote MCP: use serverUrl instead of url if the block below is HTTP.
One-liner: npx -y @ergut/mcp-bigquery-server
Secrets it wants: GOOGLE_APPLICATION_CREDENTIALS
How to get started
- Create a service account with bigquery.jobUser + dataViewer on one dataset.
- Point GOOGLE_APPLICATION_CREDENTIALS at that JSON. Never use an Owner key.
- Ask it to list tables in that dataset, then a dry SELECT.
Access risk
BigQuery jobs cost money. A key with edit access can overwrite tables.
When to skip it
Skip it for Snowflake/Postgres, or if you only need a CSV (Filesystem + SQLite).
Instead: Snowflake, PostgreSQL, Google Cloud.
Vs alternatives
| Server | Official? | Needs a secret? | Best for |
|---|---|---|---|
| BigQuery | No | Yes | Query Google BigQuery datasets. |
| Snowflake | No | Yes | Run SQL on Snowflake. |
| PostgreSQL | Yes | Yes | Run SQL against a Postgres database. |
| Google Cloud | No | Yes | Call selected GCP APIs. |
More in Databases & data
FAQ
What identity does it use?
GOOGLE_APPLICATION_CREDENTIALS or ADC. That service account is the model. dataViewer + jobUser on one dataset.
Do queries cost money?
Yes. On-demand bytes scanned. Limit the tables you expose.
BigQuery or the GCP Toolbox listing?
This page is BigQuery SQL. The gcp listing on this site is Toolbox for databases — different package.
Can it create tables?
If the SA can. Do not give it edit access while you are evaluating.