Is the BigQuery MCP server safe? What it can reach
What the BigQuery MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.
Google runs an official remote BigQuery MCP server at bigquery.googleapis.com/mcp, enabled with the BigQuery API and signed in with OAuth 2.0 and IAM. It lists datasets and tables and runs SQL. execute_sql can change data, and execute_sql_readonly cannot. The control that matters most is an IAM deny policy on the read-write tool.
Who maintains it
| Implementation | Kind | Status |
|---|---|---|
| BigQuery remote MCP server (Google Cloud, official) | Official | active |
It runs as a hosted remote server. The documented endpoint is https://bigquery.googleapis.com/mcp.
How it signs in
OAuth 2.0 with Google Cloud IAM. The server acts with the rights of the identity you sign in with, and Google recommends a separate identity for agents.
| Scope or permission | Access |
|---|---|
https://www.googleapis.com/auth/bigquery | write |
roles/mcp.toolUser | read |
roles/bigquery.jobUser | write |
roles/bigquery.dataViewer | read |
What its tools can do
| Kind | Tools |
|---|---|
| Read | list_dataset_ids, list_table_ids, get_dataset_info, get_table_info, execute_sql_readonly |
| Write | none documented |
| Can’t be undone | execute_sql |
Google marks execute_sql as the only tool that is not read-only. execute_sql_readonly rejects DML, DDL and Python UDFs. Both cancel queries after three minutes by default and return at most 3,000 rows. The roles listed are IAM roles the docs say are required on the project, not OAuth scopes.
Built-in limits
| Option | What it does |
|---|---|
IAM deny policy | Google says you can deny read-write tool use, which blocks execute_sql, using criteria such as the tool’s read-only attribute, tool name, principal and OAuth client ID. |
Separate agent identity | Google recommends a dedicated identity for agents so you can control and monitor its access. |
Model Armor floor settings | Project-level settings can inspect and block MCP traffic for prompt injection and sensitive data. |
IAM roles | Grant roles/bigquery.dataViewer and roles/bigquery.jobUser only on the projects and datasets the agent needs. |
The risks
- Table contents and column text can hold attacker-written strings, so an injected instruction could make an agent call execute_sql to alter or drop data the identity can write to.
- execute_sql runs DML and DDL, so a bad statement can overwrite or delete tables, and BigQuery charges for the bytes each query scans.
- Query results, up to 3,000 rows per call, go to your LLM provider, and Google warns that Model Armor logging can capture the full payload including sensitive data.
- The agent reaches every dataset the signed-in identity can read, which for a human account is often wider than one project.
Limit it in Claude Code
Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:
claude mcp add --transport http bigquery https://bigquery.googleapis.com/mcpClaude Code names MCP tools mcp__bigquery__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:
{
"permissions": {
"deny": [
"mcp__bigquery__execute_sql"
]
}
}Limit it in Codex
Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:
[mcp_servers.bigquery]
url = "https://bigquery.googleapis.com/mcp"
disabled_tools = ["execute_sql"]Checklist
- Use a dedicated service identity with dataViewer on only the datasets needed.
- Add an IAM deny policy for read-write MCP tools.
- Use execute_sql_readonly for analysis work.
- Set a per-project or per-query bytes billed limit in BigQuery.
Checked against the vendor documentation on November 25, 2026. Use the BigQuery remote MCP server (Google Cloud) · Google Cloud MCP servers overview
What Excellent covers
Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing