BigQuery MCP security: permissions, write access and how to lock it down

What an AI assistant can read and change through the official BigQuery remote MCP server or the open-source MCP Toolbox, and which IAM and read-only settings restrict it.

On this page

Can an AI agent write to BigQuery, and how do you stop it from doing so?

The answer depends on which server your team connects. The official BigQuery remote MCP server at can run queries, get metadata and list resources, so an AI client connected to it can issue SQL through the tools it exposes. The documented restriction points are Google Cloud IAM deny policies for the remote server and the writeMode setting in the open-source MCP Toolbox for the local option. IAM controls do not depend on an edition or plan: a deny policy can block MCP tool use for all users, block any tool that is not read-only, block MCP use by service, or allow only a specific OAuth client ID. For the Toolbox, read-only behavior depends entirely on how the team configures its BigQuery source, so the setting has to be checked in each deployment rather than assumed.

Before approving access, confirm three things in your own environment. First, whether the remote server, the Toolbox, or both are in use, since a control applied to one does not apply to the other. Second, which identities hold BigQuery roles and whether those roles allow writes, because IAM deny policies limit MCP tool calls but your data permissions still set the ceiling. Third, which tool names the connected clients can call, including execute_sql, which the Toolbox documents as a general SQL tool. Ask the platform team to show the deny policy in place and a denied call that fails with an HTTP client error for the permission mcp.googleapis.com/tools.call. Confirm the same behavior with a test identity before any staff member connects.

For the Toolbox, set writeMode to blocked if the use case is query-only. In that mode the BigQuery source allows only SELECT statements. The protected mode restricts writes in bigquery-execute-sql to the session temporary dataset and cannot be combined with useClientOAuth set to true, so teams that need per-user OAuth attribution must choose between that and the protected write mode. Advanced actions such as scheduling, permission management and reservation management are not in the BigQuery server, so they are outside this decision unless someone adds the run_bq_command tool from the Google Cloud CLI remote MCP server. Review that tool separately before enabling it. Plan for a periodic recheck, because tool sets and configuration keys change between releases.

Which BigQuery MCP control applies to which server

This table maps each BigQuery MCP control to the server it governs: the official remote server, the Google Cloud IAM layer, the open-source MCP Toolbox, Model Armor and the Google Cloud CLI server. Read each row across to see whether a control is built into the BigQuery server, sits in a separate component, or is absent. The main takeaway is that write limits on the remote server come from IAM, while the Toolbox enforces its own writeMode settings, and no paid-only tier was established for these controls, so confirm pricing with Google before approval.

ControlBuilt inOutside componentNot available
Official remote server at bigquery.googleapis.com/mcpRuns queries, gets metadata, lists resources; enabled when the BigQuery API is enabledNot applicableScheduling, permission management and reservation management
IAM deny on mcp.googleapis.com/tools.callBlocks all users, any non-read-only tool, a service, or all but one OAuth client IDNot applicableConfirm whether the deny also covers local Toolbox traffic
IAM allow and deny by tool name, service, OAuth client ID or read-only statusGrants or restricts tool calls for the remote server by tool, service, client or read-only statusNot applicableConfirm exact tool names in your project before relying on them
MCP Toolbox writeMode blockedNot applicableLocal Toolbox BigQuery source; strict read-only mode allowing only SELECT statementsNot available on the remote server
MCP Toolbox writeMode protectedNot applicableLocal Toolbox; writes in bigquery-execute-sql limited to the session temporary datasetCannot be used with useClientOAuth set to true
Model Armor scanning of MCP calls and responsesNot stated as built in; confirm enablement for BigQuery toolsSeparate Google Cloud control that scans MCP trafficConfirm coverage and any charges with Google
Advanced actions: scheduling, permissions, reservationsNot in the BigQuery serverrun_bq_command tool in the Google Cloud CLI remote MCP serverNot available in the BigQuery server
OAuth 2.0 with IAM for authentication and authorizationSupported on the remote server; all Google Cloud identities supportedNot applicableConfirm which identity types your policy allows

Where BigQuery MCP calls are authorized and where writes are blocked

Authorization for the official BigQuery remote MCP server sits in Google Cloud IAM, and every tool call is evaluated against allow and deny policies before it runs. Under the OAuth 2.0 with IAM model, the server authenticates the caller and then checks IAM, and Google documents that all Google Cloud identities are supported. IAM policies for MCP can match on the service, the tool name, the OAuth client ID, and whether a tool is read-only. Deny policies can block MCP use for all users, block any tool that is not read-only, block MCP use by service, or allow only one specific OAuth client ID. When a deny policy applies to the permission mcp.googleapis.com/tools.call, the denied call fails with an HTTP client error. Confirm in your own project which principals hold the BigQuery roles that remote tools rely on, because a broad grant elsewhere can still permit writes that a narrow MCP policy was meant to stop.

The open-source MCP Toolbox for Databases enforces writes in a different place, inside the BigQuery source configuration. In that source, writeMode set to blocked gives strict read-only behavior and allows only SELECT statements. Setting writeMode to protected restricts write operations in the bigquery-execute-sql tool to the session temporary dataset, and it cannot be combined with useClientOAuth set to true. That means the Toolbox cannot pass each developer's own identity through while also keeping the protected write mode, so reviewers should decide which identity model they accept before choosing a mode. Because the Toolbox runs locally between the IDE and BigQuery, its configuration file is a control that each workstation carries, and it should be managed and checked like any other developer tooling.

The two paths therefore need different checks. For the remote server, review IAM deny policies and the principals behind each OAuth session. For the Toolbox, review the writeMode value in every configuration file in use and confirm that no developer has changed it. Ask the vendor or your own test environment to show that a write attempt is refused under each setting you approve, and record the result, since a configuration that looks read-only on paper is the usual gap.

Decisions to make before restricting BigQuery MCP tools

Before restricting anything, the team has to decide which server path to allow, who may authenticate, and what the agent may change. Each choice below moves three things: what users can do, how actions are attributed in audit logs, and how much damage a misused or injected tool call can cause.

Remote server or local Toolbox

The official remote server at ` is enabled when the BigQuery API is enabled, and it authenticates through OAuth 2.0 with IAM. The open-source MCP Toolbox runs locally between the developer tool and BigQuery, so its write and credential behavior is set in its own configuration. Decide which path is permitted per team, since each path has different controls to review and different places where logs are produced. Confirm which path your security review covers before approving either.

Use the BigQuery MCP server

Which OAuth client IDs to allow

IAM can allow tool calls only from a specific OAuth client ID, so the choice of client directly limits which AI applications can reach BigQuery. Every client you allow is a trust decision about that application's consent flow and update path. Start from an explicit list of approved clients, record each client ID, and review the list when a tool is added or replaced. Ask your identity team how a new client is requested and who approves it.

Deny by default or grant by exception

IAM deny policies can block MCP tool use for all users, which gives a default-deny baseline. Granting by exception then means a short list of people, groups or services can use the server for named purposes. The trade-off is operational: a broad allow keeps developers productive but spreads risk across every identity in the project. Document who requests an exception, who approves it and when it expires.

Read-only policy or tool-name denies

IAM policies can restrict tool calls by whether a tool is read-only, or by tool name. A read-only condition is broader and follows the tool's classification, while a tool-name deny is precise but must be updated whenever Google adds or renames a tool. Many teams use both: a read-only rule as the floor and named denies for anything that must never run. Test each rule with a denied call so you know the failure mode, which is an HTTP client error when the deny applies to mcp.googleapis.com/tools.call.

Control MCP use with IAM

Toolbox writes limited to the temporary dataset

In the MCP Toolbox BigQuery source, writeMode set to blocked allows only SELECT statements, which is the strictest setting. The protected mode limits writes in bigquery-execute-sql to the session temporary dataset, but it cannot be combined with useClientOAuth set to true. Choosing protected therefore changes whether each user's own identity is used for queries, and so changes audit attribution. Decide whether analysts need persistent writes at all before choosing a mode.

BigQuery Source

Whether Model Armor scanning is in scope

Google states that Model Armor can scan MCP calls and responses to help protect against security risks and enforce AI security policies. Including it adds an inspection layer for prompt injection carried in query results or metadata, which matters when table content comes from outside parties. It is a separate control to configure, approve and monitor, so it needs an owner and a documented policy. Confirm with Google how Model Armor applies to the BigQuery remote server in your environment before listing it as a control.

Google Cloud MCP servers overview

How BigQuery MCP lockdown differs by team and data sensitivity

A single developer team using Cursor or another IDE usually connects through either the official remote server or the local MCP Toolbox, and the main risk is an agent that runs more statements than the developer expected. The team is small enough that identity and project ownership are easy to trace, so the first controls are about what the connected identity can change. Confirm the scope of the identity the developer signs in with, because the remote server acts with that identity's IAM permissions.

  • Identity scope: Confirm which Google Cloud identity the developer signs in with and whether it holds write roles on production datasets.
  • Read-only defaults: Use IAM deny policies to block tools that are not read-only, or configure the Toolbox source with writeMode set to blocked so only SELECT statements run.
  • Sandbox projects: Point the connection at a development project so an accidental write does not reach production tables.
  • Auto-approval: Check whether the IDE is set to approve tool calls automatically, since that removes the only human checkpoint on each query.
  • Logging: Confirm that audit logs record the identity behind each call so the team can trace unexpected activity.

Before rollout, ask the team lead to show which datasets the developer identity can reach and which tools the IDE will run without asking.

How a BigQuery MCP tool call is allowed or denied

The diagram starts with an AI client sending a tool call to the official BigQuery remote MCP server at the Google endpoint. Before any query runs, IAM deny policies are checked against the permission mcp.googleapis.com/tools.call, and a matching deny fails the call with an HTTP client error. Allowed calls reach BigQuery under the caller's IAM identity. The lower branch shows the open-source MCP Toolbox, where the writeMode setting decides whether writes are blocked or limited to the session temporary dataset. Check which branch your team uses, and confirm the deny rules before rollout.

Tool call paths through IAM deny checks and the Toolbox writeMode setting.

Order of work to lock down BigQuery MCP before production

This sequence moves from knowing who and what will connect, through the enforcement controls, to proof that denied calls fail and that the activity is visible in audit records. Each step ends with a check you can record before approving production use.

  1. Inventory identities, clients and tools

    The security or platform lead lists every human group, service account and AI client that will reach BigQuery through MCP, along with the OAuth client ID each client uses and the datasets it needs. Record which MCP tools each client is expected to call, such as running queries or getting metadata. Confirm with the team that owns each client which OAuth client IDs it presents. The step is done when this inventory is approved and every entry has an owner and a stated purpose.

  2. Enable the BigQuery API and confirm reachability

    The cloud administrator enables the BigQuery API in the project, which Google documents as the point where the remote BigQuery MCP server becomes available at the endpoint Confirm from the network side which egress paths can reach that endpoint, and whether clients on managed devices or in restricted networks are expected to connect at all. Treat reachability as a control to verify, not a default to assume. The step is done when the reachable clients match the inventory from the previous step and any unexpected path is documented or closed.

  3. Write IAM deny policies for risky tools and services

    The cloud security engineer writes IAM deny policies that block MCP use for all users where it is not needed, block any tool that is not read-only for populations that should only query data, and block MCP use for services that are not in scope. Google documents these deny options in the IAM control guidance for MCP. Review each policy in a non-production project first and confirm the principal and condition scope. The step is done when the policy set is saved, its owner is named, and the reviewer has signed off on which identities are affected.

  4. Allow only approved OAuth client IDs

    The administrator adds allow rules that permit MCP tool calls only from the specific OAuth client IDs recorded in the inventory, so that an unapproved client using a valid Google identity is refused. Confirm that each approved client is the exact application the team uses, and that no broad client is left open by default. Keep the list short and reviewed on a fixed cadence set by your governance team. The step is done when a test identity using a client not on the list is refused and an approved client continues to work.

  5. Set Toolbox writeMode for any local deployment

    If engineers also run the open-source MCP Toolbox for Databases locally, the platform engineer sets the BigQuery source to the strictest mode that fits the use case. The blocked setting enforces read-only operation and allows only SELECT statements. The protected setting limits writes in bigquery-execute-sql to the session temporary dataset, and Toolbox documents that it cannot be combined with useClientOAuth set to true. Review the Toolbox configuration file in version control. The step is done when the configuration shows the intended writeMode and a test write outside the allowed scope is rejected.

  6. Test that denied calls return the client error

    The security engineer runs a scripted set of test calls from an approved client and from an unapproved one, covering a read tool, a write-capable tool and a blocked service. Google documents that a denied tool call fails with an HTTP client error when the deny policy applies to the permission mcp.googleapis.com/tools.call. Record the status returned for each call and compare it to the expected result. Keep the test script so it can be rerun after any policy change. The step is done when every denied call returns the expected client error and every approved read succeeds.

  7. Confirm audit visibility before approval

    The compliance lead confirms that the calls made in the previous test are visible in the logs your organization relies on, including the identity, client and tool involved, and that denied attempts appear as well as successful ones. Confirm with the cloud team which log sinks, retention settings and access roles apply, because the details depend on your project configuration and should be checked in your own environment rather than assumed. Record which fields are present and which are missing. The step is done when the test activity is traceable end to end and the gaps have named owners before production approval.

What a security reviewer asks to see for BigQuery MCP controls

This table lists the artifacts a security reviewer should request before approving a BigQuery MCP connection, with the tool or setting each one comes from and who produces it. Read it as a request list for the platform team: each row names a control, the evidence an assessor expects, and the owner. The main takeaway is that IAM deny policies and Toolbox configuration are only as strong as the exported records and denial tests that prove they are in force.

Evidence requestedWhere it comes fromWho produces it
IAM deny policy exportGoogle Cloud IAM deny policies that block MCP tool use for all users, non-read-only tools, or specific servicesCloud administrator, exported from the project or organization
Allowed OAuth client ID listIAM policy restricting access to a specific OAuth client IDCloud administrator, with the approved client owner confirming each ID
Tool-name and read-only policy definitionsIAM policies granting or restricting tool calls by tool name or read-only statusCloud administrator, exported as policy definitions
Toolbox tools configuration with writeMode valueMCP Toolbox BigQuery source configuration, including the writeMode setting in usePlatform engineer, from the version-controlled config file
Test evidence of denied callsRecorded attempts to run a blocked tool, showing the HTTP client error for mcp.googleapis.com/tools.callSecurity team or independent tester, during a retest
Audit log samplesCloud audit log entries for MCP tool calls, showing identity, tool name and outcomeCloud administrator, from log queries scoped to the connected project

Questions buyers ask before approving BigQuery MCP access

Can we make the BigQuery MCP server read-only?

Yes, but the method depends on which server you run. For the official remote server, IAM deny policies can block any tool that is not read-only, so the server can still run queries and read metadata while write-capable tools are refused. For the open-source MCP Toolbox, the BigQuery source setting writeMode set to blocked enforces strict read-only mode and allows only SELECT statements. The protected mode is different: it limits writes in bigquery-execute-sql to the session temporary dataset and cannot be combined with useClientOAuth set to true. Test each control against the tools you expose, because read-only in one layer does not cover every tool in the other.

Is the BigQuery remote MCP server enabled just by enabling the BigQuery API?

Google documents that the remote server is enabled when the BigQuery API is enabled, which means enabling the API can expose the server to users who hold access to the project. Treat the API enablement as a change that needs review, not a background step. Before enabling it, confirm which projects are in scope, who holds BigQuery roles there, and whether deny policies are already in place to block MCP tool calls. Ask your Google Cloud administrator to document the enablement path so the change shows up in your change records.

Does IAM stop an AI agent from scheduling queries or changing permissions?

Not by itself. The official BigQuery remote server does not include advanced actions such as scheduling, permission management and reservation management. Google points to the run_bq_command tool in the Google Cloud CLI remote MCP server for those tasks, so if you enable that server, those actions come back into scope. Use IAM deny policies to block the tools you do not want, and check the tool list of every MCP server connected to the same client. The IAM control that denies MCP tool calls applies to the permission mcp.googleapis.com/tools.call, and a denied call returns an HTTP client error.

What does restricting BigQuery MCP access cost, and who pays for it?

Neither the remote server nor the MCP Toolbox has a price in the sources we rely on, so the cost depends on your existing Google Cloud agreement, the query charges your users generate, and the labor to design and test the policies. The MCP Toolbox is published under the Apache-2.0 license, so the software itself carries no license fee, but running it means hosting and maintaining it. Ask for a quote that separates one-time work (policy design, testing, documentation) from recurring work (policy reviews, tool list changes, upgrades), and ask who pays for BigQuery query usage under each option.

Can our own team configure these restrictions without outside help?

Often yes, if you have staff who know Google Cloud IAM, BigQuery roles and the MCP Toolbox configuration format. The work breaks into four parts: deciding which tools each user group may call, writing IAM deny policies with the correct conditions, setting the Toolbox source options, and proving that a denied call fails. The hard part is usually the testing and the evidence, since you must show that restricted tools stay blocked after each change. A fixed-scope engagement can cover that design and testing work in writing, and DeployOpen's security testing and rollout review can check the setup. Ask any outside party to state the scope, deliverables and timeline in writing before work starts.

How does the official server authenticate users and align with MCP authorization?

The BigQuery remote MCP server uses OAuth 2.0 with IAM for authentication and authorization, and Google documents that all Google Cloud identities are supported. Google also states that its remote MCP servers comply with the MCP authorization specification. Map each user group to the IAM roles they actually need, and do not rely on a shared credential. Check the identity types in your organization, such as user accounts and service accounts, because the access each one gets follows from IAM rather than from the AI client.

Can Model Armor help screen BigQuery MCP calls and responses?

Google documents that Model Armor can scan MCP calls and responses to help protect against security risks and enforce AI security policies. It is a screening layer, not a substitute for IAM deny policies or read-only settings, so keep the permission controls as the primary limit. Confirm with Google which Model Armor settings apply to your BigQuery MCP traffic and whether they are enabled in your projects, since the sources we rely on do not state how it is configured for this server. Ask for the screening rules and the logs they produce as part of your review.

How DeployOpen tests and locks down a BigQuery MCP rollout

DeployOpen approaches BigQuery MCP security as an access question first: which identities, tools and datasets an AI client may reach, and which controls enforce that limit. We test the setup against those answers, then deliver written fixes and documentation your security and data teams can review.

How we scope

  • We agree a written scope that names the BigQuery projects, datasets and identities in question before work starts.
  • The scope lists whether the official remote server, the MCP Toolbox or both are in review.
  • Engagements are fixed-scope, and ongoing support is available as a retainer after handover.

How we build

  • We review IAM roles, deny policies and read-only settings against the tools each client is allowed to call.
  • We test risky tools such as write-capable SQL and check whether denied calls fail as intended.
  • We check Toolbox writeMode settings, credential handling and whether Model Armor screening is in use.

How we hand over

  • You receive a findings report with each gap, the fix applied or recommended, and the reasoning behind it.
  • A retest confirms that the restricted tools stay blocked and that audit logging captures MCP activity.
  • Configuration notes and evidence are written so your compliance and security teams can review them independently.

How we support

  • Ongoing support covers upgrades, changes to IAM policy and new BigQuery datasets added to the rollout.
  • Continuous testing can be added through a retainer so access rules are rechecked as clients and tools change.
  • Questions about audit results or certification evidence are routed to your independent auditor, since DeployOpen does not issue attestations.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.