BigQuery MCP Server
List datasets and tables and run SQL in Google BigQuery through Google's official BigQuery MCP server.
What is the BigQuery MCP Server?
The BigQuery MCP server gives AI agents structured, permission-aware access to BigQuery through the Model Context Protocol. With 9 pre-built actions, agents can read, create, and update BigQuery data on behalf of authorized users.
Willow ships the BigQuery MCP server as part of an enterprise control plane. Every call runs behind SSO (Okta, Azure AD), enforces RBAC and least-privilege at runtime, writes to a full audit trail, and integrates with Splunk and Loki for SIEM visibility. Connect from Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code, n8n, or any custom agent. Install once, distribute org-wide, and see exactly how BigQuery is being used by every AI agent in your stack.
Tools
list_dataset_ids
List BigQuery dataset IDs and BigLake namespaces in a Google Cloud project. Supports pagination. Use `page_size` to limit results and `page_token` to retrieve next page.
get_dataset_info
Get metadata information about a BigQuery dataset or BigLake namespace.
list_table_ids
List table ids in a BigQuery dataset or BigLake namespace. Supports pagination. Use `page_size` to limit results and `page_token` to retrieve next page.
get_table_info
Get metadata information about a BigQuery table or BigLake table.
execute_sql_readonly
Run a read-only SQL query in the project and return the result. Prefer this tool over `execute_sql` if possible. This tool is restricted to only `SELECT` statements. `INSERT`, `UPDATE`, and `DELETE` statements and stored procedures aren't allowed. If the query doesn't include a `SELECT` statement, an error is returned. For information on creating queries, see the [GoogleSQL documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax). IMPORTANT: For predictive and analytical tasks (forecasting, anomaly detection, key driver / root cause analysis, classification, churn prediction, or text generation), ALWAYS execute computation in-warehouse using BigQuery native AI/ML functions (`AI.FORECAST`, `AI.DETECT_ANOMALIES`, `AI.KEY_DRIVERS`, `AI.CLASSIFY`, `AI.GENERATE`) rather than exporting raw rows to a local Python sandbox. In-warehouse execution scales to billions of rows, preserves governance, and eliminates data egress latency. Example Queries: ```sql -- Count the number of penguins in each island. SELECT island, COUNT(*) AS population FROM bigquery-public-data.ml_datasets.penguins GROUP BY island -- Forecast data using AI.FORECAST SELECT * FROM AI.FORECAST(TABLE `project.dataset.my_table`, data_col => 'num_trips', timestamp_col => 'date', id_cols => ['usertype'], horizon => 30) -- Detect anomalies in time series data using AI.DETECT_ANOMALIES SELECT * FROM AI.DETECT_ANOMALIES( TABLE `project.dataset.historical_metrics`, TABLE `project.dataset.recent_metrics`, data_col => 'num_requests', timestamp_col => 'timestamp' ) -- Identify key drivers of metric changes using AI.KEY_DRIVERS SELECT * FROM AI.KEY_DRIVERS( TABLE `project.dataset.sales_summary`, metric_col => 'total_revenue', dimension_cols => ['region', 'product_category'], interest_label_col => 'is_current_quarter' ) -- Classify text into categories using AI.CLASSIFY SELECT ticket_id, AI.CLASSIFY(ticket_text, ['Billing', 'Technical Support', 'Feature Request']) AS category FROM `project.dataset.support_tickets` -- Generate text or summaries using AI.GENERATE SELECT review_id, AI.GENERATE(CONCAT('Summarize this customer review: ', review_text)).result AS summary FROM `project.dataset.reviews` ``` Queries executed using the `execute_sql_readonly` tool will always have the job label `goog-mcp-server: true` automatically set in addition to any custom `labels` provided in the request. Queries are charged to the project specified in the `project_id` field. Query Execution Behavior: * If the query completes within the synchronous timeout (default 20 seconds or custom `timeout_ms`), the tool returns `job_complete: true` and the result rows directly. For fast queries, `job_id` may be omitted as no persistent background job is created; no further action or polling is needed. * If the query takes longer than `timeout_ms`, the tool returns `job_complete: false` and a `job_id`. In this case, use the `get_query_results` tool with `job_id` to poll until `job_complete: true`, or use `cancel_job` to abort the running query. * You can optionally specify `timeout_ms` to configure the maximum synchronous wait time in milliseconds (defaults to 20,000 ms), and `job_timeout_ms` to enforce a hard server-side timeout after which BigQuery automatically terminates the job.
execute_sql
Run a SQL query in the project and return the result. Prefer the `execute_sql_readonly` tool if possible. This tool can execute any query that bigquery supports including: * SQL Queries (`SELECT`, `INSERT`, `UPDATE`, `DELETE`, `CREATE`, etc.) * AI/ML functions like `AI.FORECAST`, `AI.KEY_DRIVERS`, `ML.EVALUATE`, `ML.PREDICT` * Any other query that bigquery supports. Example Queries: ```sql -- Insert data into a table. INSERT INTO `my_project.my_dataset`.my_table (name, age) VALUES ('Alice', 30); -- Create a table. CREATE TABLE `my_project.my_dataset`.my_table ( name STRING, age INT64); -- DELETE data from a table. DELETE FROM `my_project.my_dataset`.my_table WHERE name = 'Alice'; -- Create Dataset CREATE SCHEMA `my_project.my_dataset` OPTIONS (location = 'US'); -- Drop table DROP TABLE `my_project.my_dataset`.my_table; -- Drop dataset DROP SCHEMA `my_project.my_dataset`; -- Create Model CREATE OR REPLACE MODEL `my_project.my_dataset.my_model` OPTIONS ( model_type = 'LINEAR_REG' LS_INIT_LEARN_RATE=0.15, L1_REG=1, MAX_ITERATIONS=5, DATA_SPLIT_METHOD='SEQ', DATA_SPLIT_EVAL_FRACTION=0.3, DATA_SPLIT_COL='timestamp') AS SELECT col1, col2, timestamp, label FROM `my_project.my_dataset.my_table`; ``` Queries executed using the `execute_sql` tool will always have the default job label `goog-mcp-server: true` automatically set in addition to any custom `labels` provided in the request. Queries are charged to the project specified in the `project_id` field. Query Execution Behavior: * If the query completes within the synchronous timeout (default 20 seconds or custom `timeout_ms`), the tool returns `job_complete: true` and the initial result rows directly. For fast queries, `job_id` may be omitted as no persistent background job is created; no further action or polling is needed. * If the query takes longer than `timeout_ms`, the tool returns `job_complete: false` and a `job_id`. In this case, use the `get_query_results` tool with `job_id` to poll until `job_complete: true`, or use `cancel_job` to abort the running query. * You can optionally specify `timeout_ms` to configure the maximum synchronous wait time in milliseconds (defaults to 20,000 ms), and `job_timeout_ms` to enforce a hard server-side timeout after which BigQuery automatically terminates the job.
get_query_results
Get the results of a BigQuery SQL query job. Use this tool ONLY when: 1. A previous `execute_sql` or `execute_sql_readonly` call returned `job_complete: false` with a `job_id` (poll with this tool until `job_complete: true`), OR 2. You need to paginate through additional rows using `page_token` or `start_index` for a previously completed job. Do NOT call this tool if the query already returned `job_complete: true` with all rows. Supports pagination. Use `max_results` to limit results and `page_token` to retrieve the next page of results.
cancel_job
Cancel a running BigQuery job. Use this tool to cancel a query job that is currently executing (i.e. returned `job_complete: false` with a `job_id` from `execute_sql` or `execute_sql_readonly`). Specify the `job_id` to abort.
get_job
Get information and status about a BigQuery job. Use this tool to check the status, statistics, or configuration of a job using its `job_id`.
Customize Tools
Edit descriptions, modify arguments, select tools, or add new ones
Set Up Your BigQuery MCP Server in Minutes
Add the following configuration to your MCP client. Authentication is handled via OAuth. Compatible with Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code, n8n, and any MCP-compatible agent.
Claude Desktop
{
"mcpServers": {
"willow-bigquery-official": {
"type": "http",
"url": "https://<org>.mcp-s.com/mcp/mcp/bigquery-official"
}
}
}Cursor
{
"mcpServers": {
"willow-bigquery-official": {
"type": "http",
"url": "https://<org>.mcp-s.com/mcp/mcp/bigquery-official"
}
}
}Claude Code
claude mcp add willow-bigquery-official --transport http https://<org>.mcp-s.com/mcp/mcp/bigquery-officialn8n
{
"url": "https://<org>.mcp-s.com/mcp/mcp/bigquery-official",
"method": "POST"
}Or click "Install with Willow" above to set up automatically with SSO and RBAC preconfigured.
Enterprise Governance for BigQuery
Willow adds the layer BigQuery and every other SaaS doesn't ship out of the box: every call runs behind SSO (Okta, Azure AD), enforces RBAC and least-privilege at runtime, writes to full audit logs, and detects shadow AI usage across your stack. One MCP gateway. Any agent. Every tool.
BigQuery MCP Server FAQ
What is the BigQuery MCP server?
The BigQuery MCP server is a Model Context Protocol implementation that lets AI agents like Claude, Cursor, and ChatGPT read and write BigQuery data through a standardized interface. Willow hosts and governs this server so enterprises can roll it out without a security review backlog.
How is Willow's BigQuery MCP server different from the official one?
The official BigQuery MCP server is scoped to a single user's account and does not include enterprise governance. Willow's version adds SSO, RBAC, audit logging, shadow AI detection, and centralized control over which actions agents can take across the entire org.
Which AI clients work with the BigQuery MCP server?
Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code with MCP support, n8n, and any custom agent built with OpenAI Agents SDK, LangChain, Vercel AI SDK, or Anthropic SDK.
Is the BigQuery MCP server secure? How does Willow handle authentication?
Every call runs behind your existing SSO (Okta, Azure AD). Per-user OAuth scopes the agent to exactly what that user can do in BigQuery, nothing more. No credentials reach the LLM. Every action writes to an audit trail.
Can I limit which BigQuery actions agents can take?
Yes. Willow lets you scope agents to specific actions, specific projects, or specific environments. Toggle actions on or off in the dashboard, or enforce policy via infrastructure-as-code through GitHub.
How do I detect shadow BigQuery MCP servers in my org?
Willow's browser extension and discovery service surface unmanaged MCP servers, skills, and AI agents across the org. If a developer installed an unapproved BigQuery MCP locally, you'll see it.
What does the BigQuery MCP server cost?
Pricing depends on org size and deployment model (SaaS, dedicated cloud, self-host). See withwillow.ai/pricing or contact sales for a quote.
How do I install the BigQuery MCP server with Willow?
Install via the Willow Connect Panel in one click, or paste the JSON snippet above into your Claude Desktop, Cursor, or Claude Code config. SSO and RBAC inherit from your existing Willow setup.
Compare Willow MCP Gateway
See how Willow stacks up against other MCP platforms on governance, security, and enterprise readiness.
Related databases-data-warehouses MCP Servers
Your agents are already in the wild.
Give them a Basecamp. Go from AI chaos to AI work, in minutes.