# BigQuery

> Query Google BigQuery datasets from Claude, Cursor, and VS Code.

[Canonical HTML page](https://top-mcps.com/mcp/bigquery) · [server.json](https://top-mcps.com/mcp/bigquery.json) · [methodology](https://top-mcps.com/about/methodology)

## Install

### Claude Desktop — `claude_desktop_config.json`

Paste under mcpServers. Fully quit and reopen Claude after editing.

```json
{
  "mcpServers": {
    "bigquery": {
      "command": "uvx",
      "args": [
        "mcp-server-bigquery"
      ],
      "env": {
        "GOOGLE_CLOUD_PROJECT": "${GOOGLE_CLOUD_PROJECT}",
        "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}"
      }
    }
  }
}
```

### Claude Code — `CLI or .mcp.json`

Run from your repo. Commit .mcp.json to share with your team.

```shell
# export GOOGLE_CLOUD_PROJECT=my-project
# export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json (optional if gcloud auth login)
claude mcp add bigquery -- uvx mcp-server-bigquery
```

### Cursor — `.cursor/mcp.json`

Global path: ~/.cursor/mcp.json. Reload window after editing.

```json
{
  "mcpServers": {
    "bigquery": {
      "command": "uvx",
      "args": [
        "mcp-server-bigquery"
      ],
      "env": {
        "GOOGLE_CLOUD_PROJECT": "${GOOGLE_CLOUD_PROJECT}",
        "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}"
      }
    }
  }
}
```

### VS Code — `.vscode/mcp.json`

VS Code uses the "servers" key (not "mcpServers").

```jsonc
{
  "servers": {
    "bigquery": {
      "command": "uvx",
      "args": [
        "mcp-server-bigquery"
      ],
      "env": {
        "GOOGLE_CLOUD_PROJECT": "${GOOGLE_CLOUD_PROJECT}",
        "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}"
      }
    }
  }
}
```

### Windsurf — `~/.codeium/windsurf/mcp_config.json`

Open via Cascade → hammer icon → Configure.

```json
{
  "mcpServers": {
    "bigquery": {
      "command": "uvx",
      "args": [
        "mcp-server-bigquery"
      ],
      "env": {
        "GOOGLE_CLOUD_PROJECT": "${GOOGLE_CLOUD_PROJECT}",
        "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}"
      }
    }
  }
}
```

### Cline — `cline_mcp_settings.json`

Open via the Cline sidebar → MCP Servers → Edit.

```json
{
  "mcpServers": {
    "bigquery": {
      "command": "uvx",
      "args": [
        "mcp-server-bigquery"
      ],
      "env": {
        "GOOGLE_CLOUD_PROJECT": "${GOOGLE_CLOUD_PROJECT}",
        "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}"
      }
    }
  }
}
```

### Continue — `~/.continue/config.json`

Continue uses modelContextProtocolServers with a transport block.

```json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "uvx",
          "args": [
            "mcp-server-bigquery"
          ],
          "env": {
            "GOOGLE_CLOUD_PROJECT": "${GOOGLE_CLOUD_PROJECT}",
            "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}"
          }
        }
      }
    ]
  }
}
```

### Codex CLI — `~/.codex/config.toml`

Codex uses TOML. Each server is a [mcp_servers.<name>] subtable.

```shell
# ~/.codex/config.toml
[mcp_servers.bigquery]
command = "uvx"
args = [
  "mcp-server-bigquery",
]
env = { GOOGLE_CLOUD_PROJECT = "${GOOGLE_CLOUD_PROJECT}", GOOGLE_APPLICATION_CREDENTIALS = "${GOOGLE_APPLICATION_CREDENTIALS}" }
```

### Zed — `~/.config/zed/settings.json`

Zed calls them "context_servers". Settings live-reload on save.

```jsonc
{
  "context_servers": {
    "bigquery": {
      "command": {
        "path": "uvx",
        "args": [
          "mcp-server-bigquery"
        ]
      },
      "env": {
        "GOOGLE_CLOUD_PROJECT": "${GOOGLE_CLOUD_PROJECT}",
        "GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}"
      }
    }
  }
}
```

### ChatGPT — `ChatGPT → Apps directory`

BigQuery doesn't ship a hosted HTTPS endpoint today. ChatGPT supports remote MCP servers only — to use this server in ChatGPT you'll need to deploy it to a public HTTPS URL first (e.g. via Cloudflare Workers or Vercel) or wait for an official remote build.

```none

```

## At a glance

- **Maintainer:** Community
- **Transport:** stdio
- **Auth model:** OAuth 2.1
- **Required secrets:** GOOGLE_CLOUD_PROJECT, GOOGLE_APPLICATION_CREDENTIALS
- **Supported clients:** Claude, Cursor, VS Code, Windsurf, Any MCP-compatible client, Google Cloud project
- **License:** MIT
- **Language:** Python
- **Latest version:** latest
- **Last verified:** 2026-05-27
- **GitHub stars:** 126 (fetched 2026-06-02T11:55:52.278Z)
- **Score:** 70/100 (rubric 2026-04 — see https://top-mcps.com/about/methodology)
- **Source:** https://github.com/LucasHild/mcp-server-bigquery

## Tools & permissions

| Tool | Description | Args | Side effects |
|------|-------------|------|--------------|
| `list_datasets` | List BigQuery datasets in the active project. | `—` | read |
| `list_tables` | List tables in a dataset. | `dataset: string` | read |
| `describe_table` | Return schema + size estimates for a table. | `table: string` | read |
| `dry_run_query` | Return bytes-processed + cost estimate without executing. | `sql: string` | read |
| `query` | Execute a SELECT and return rows. | `sql: string` | read |

## Security & scope

- **Access scope:** read-only
- **Sandbox:** Authenticates via Google ADC — inherits the active gcloud identity or a service-account key in env. Read-only by default; DML must be explicitly enabled. Combine with IAM roles scoped to the smallest dataset and the smallest project that satisfies the workflow.
- **Gotchas:**
  - BigQuery is billed per byte scanned — always dry_run new SQL before running it.
  - Service-account keys in env vars persist in client config files. Prefer ADC + short-lived gcloud login.
  - Read-only is MCP-side, not IAM. Use a viewer-role service account as defence in depth.

## Quick answer

**What it does.** Connects to Google BigQuery, exposes dataset/table enumeration, schema inspection, dry-run cost estimates, and SELECT execution against your warehouse.

**Best for:**
- Schema exploration
- Analytical query drafting
- Dry-run cost estimation
- Cross-dataset joins
- Ad-hoc reporting

**Not for:**
- Workloads with strict per-query cost ceilings
- Streaming-insert workflows
- Procedure / scripting development

## Description

A community-maintained MCP that connects an AI agent to Google BigQuery. Inspect datasets, list tables, describe schemas, and run dry-run + live SQL against your warehouse. Authentication uses standard Application Default Credentials, so it inherits whatever your gcloud session is already authorised for.

## Why it matters

BigQuery is the default warehouse for many teams. An MCP turns "open the BigQuery console" into a conversational query, with the dry-run cost estimate before the agent burns a credit.

## Key features

- ADC auth (no key files in config)
- Dataset + table enumeration
- Schema inspection with column types
- Dry-run cost estimate before execution
- INFORMATION_SCHEMA introspection

## FAQ

### How does auth work?

Standard Google Application Default Credentials. Either run `gcloud auth application-default login` once, or set GOOGLE_APPLICATION_CREDENTIALS to a service-account key file path.

### Does it surface dry-run cost?

Yes — the dry_run_query tool returns bytes-processed and an estimated cost before you spend credits. Make a habit of running dry_run before query for any new SQL the agent writes.

### Can it scope to one dataset?

Yes via the BIGQUERY_DATASET env var; the MCP will only list and query inside that dataset. Combine with an IAM role scoped to that dataset for defence in depth.

### Does it support DML?

Only when explicitly enabled. Default is read-only — the MCP rejects INSERT/UPDATE/DELETE/MERGE unless you opt in.

## Changelog

- **2026-05-27** — Refreshed install snippets and fact sheet; verified for 2026.
- **2025-01-30** — Initial directory listing.
