otheroauth2

Google BigQuery

Google BigQuery is a fully managed data warehouse for large-scale data analytics, offering fast SQL queries and machine learning capabilities on massive datasets

Verdict

The Google BigQuery MCP lets your team query massive datasets directly from Switchy Spaces. @mention it to run SQL against your warehouse tables — useful for analysts pulling metrics during planning sessions, engineers debugging production data, or anyone who needs quick answers from petabyte-scale tables without switching to the console. Queries run in your authenticated project, so results respect your existing access controls. The tool requires single-line SQL (no newlines), which can feel awkward for complex queries but keeps prompts readable.

Common use cases

  • Pull weekly active users during sprint planning
  • Debug production errors by querying logs table
  • Compare revenue metrics across quarters in chat
  • Validate data pipeline outputs before release
  • Generate ad-hoc reports for stakeholder questions

Integration

Vendor
Google BigQuery
Category
other
Auth
OAUTH2
Tools
1
Composio slug
googlebigquery

Tools

  • Query

    Query tool will run a sql query in bigquery. note: make sure the query being input in a single line format. for example, select * from sample dataset.sample table where column name = 'value'

Setup

Setup guide

  1. 11. In your Switchy workspace, navigate to Settings > Integrations and select Google BigQuery from the MCP directory. 2. Click Connect and you'll be redirected to Google's OAuth consent screen. 3. Sign in with the Google account that has BigQuery access in your GCP project. 4. Grant the requested scopes — typically bigquery.readonly for querying data and bigquery.jobs.create for running queries. 5. After authorizing, you'll return to Switchy and see a green Connected status next to BigQuery. 6. Open any Space and type '@Google BigQuery run a query: SELECT * FROM `project.dataset.table` LIMIT 10' (replace with your actual table path). 7. The MCP will execute the query and return results inline. 8. If you see an authentication error, verify your Google account has the BigQuery User role in the target GCP project.

What teammates see: by default, memories from Google BigQuery are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.

Works well with

Top models

Compatibility data appears once enough Spaces have used this MCP together with a given model.

How Switchy teams use it

Not enough Spaces yet to publish anonymised usage stats (we require ≥ 50 Spaces per week).

Starter prompts

Weekly Active Users

@Google BigQuery run this query: SELECT COUNT(DISTINCT user_id) AS weekly_active_users FROM `myproject.analytics.events` WHERE event_name = 'login' AND event_timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
Open in a Space →

Top Error Messages

@Google BigQuery find the top 10 error messages: SELECT error_message, COUNT(*) AS occurrences FROM `myproject.logs.app_errors` WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY) GROUP BY error_message ORDER BY occurrences DESC LIMIT 10
Open in a Space →

Revenue by Product

@Google BigQuery show me revenue by product this month: SELECT product_name, SUM(amount) AS total_revenue FROM `myproject.sales.transactions` WHERE transaction_date >= DATE_TRUNC(CURRENT_DATE(), MONTH) GROUP BY product_name ORDER BY total_revenue DESC
Open in a Space →

Pipeline Row Counts

@Google BigQuery compare row counts: SELECT 'staging' AS table_name, COUNT(*) AS row_count FROM `myproject.staging.users` UNION ALL SELECT 'production', COUNT(*) FROM `myproject.prod.users`
Open in a Space →

Customer Churn Rate

@Google BigQuery calculate churn rate last quarter: SELECT COUNT(DISTINCT CASE WHEN cancellation_date IS NOT NULL THEN customer_id END) / COUNT(DISTINCT customer_id) AS churn_rate FROM `myproject.subscriptions.customers` WHERE subscription_start_date < DATE_TRUNC(CURRENT_DATE(), QUARTER) AND (cancellation_date IS NULL OR cancellation_date >= DATE_SUB(DATE_TRUNC(CURRENT_DATE(), QUARTER), INTERVAL 1 QUARTER))
Open in a Space →

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

@Google BigQuery run a query to show the top 5 products by revenue from our sales table this quarter

Output

The query returned five rows from your `sales.products_summary` table. The top product generated $847,320 in Q1 revenue, followed by four others ranging from $612,450 to $498,100. Each row includes product_id, product_name, total_revenue, and units_sold. This example assumes your BigQuery project contains a table with those columns and recent transaction data.

Notes

This read-heavy example demonstrates basic SELECT queries with aggregation and filtering. You'll need OAuth scopes that grant read access to the specific BigQuery datasets and tables you reference. Query costs depend on the amount of data scanned—preview your table schema to estimate bytes processed before running large queries.

Prompt

@Google BigQuery create a new table called `user_cohorts` in the analytics dataset with columns user_id, cohort_month, and first_purchase_date

Output

A CREATE TABLE statement was executed successfully in your `analytics` dataset. The new `user_cohorts` table now exists with three columns: user_id (STRING), cohort_month (DATE), and first_purchase_date (TIMESTAMP). This example illustrates a write operation—no rows were inserted yet, but the schema is ready for subsequent INSERT or MERGE queries.

Notes

This write example shows DDL (Data Definition Language) capability. You must have BigQuery Data Editor or Owner permissions on the target dataset. Be cautious: CREATE TABLE will fail if the table already exists unless you add IF NOT EXISTS. Consider using CREATE OR REPLACE TABLE if you want to overwrite existing schemas during iterative development.

Prompt

@Google BigQuery analyze our event logs from the past week and summarize which feature flags correlate with the highest session duration

Output

The query joined your `events.sessions` and `events.feature_flags` tables, filtering to the last seven days. Results show that users with the 'new_checkout_flow' flag enabled averaged 8.2 minutes per session, compared to 5.1 minutes for the control group. Two other flags ('dark_mode', 'recommendations_v2') showed smaller positive correlations. This synthesis pairs BigQuery's aggregation with AI interpretation to surface actionable insights from raw event data.

Notes

This synthesis example demonstrates how the AI can construct multi-table JOIN queries and interpret statistical patterns. Accuracy depends on your schema design—ensure foreign keys and timestamps are indexed for performance. Large event tables may incur significant query costs; consider partitioning by date and clustering by user_id to reduce bytes scanned and speed up analysis.

Use-case deep-dives

Ad-hoc revenue analysis for exec reviews

When BigQuery MCP beats exporting CSVs for finance teams

A 6-person finance team runs weekly revenue reviews where the CFO asks follow-up questions that weren't in the pre-built dashboard. Instead of waiting for the data analyst to export new CSVs, the team uses Switchy with BigQuery MCP to query transaction tables directly during the meeting. The OAuth2 flow means everyone authenticates once with their Google Workspace account and inherits the same row-level security their org already configured. This works when your queries are straightforward aggregations or filters—if you need complex joins across 8 tables or window functions, you're better off pre-building those in dbt and querying the mart. The single-line query constraint is annoying for readability but doesn't block real work. If your exec reviews involve live data questions and your source of truth is already in BigQuery, this MCP closes the loop without leaving the conversation.

Customer support tier-2 escalation lookup

Why BigQuery MCP works for support teams with data in warehouses

A 12-person support team handles tier-2 escalations where the answer isn't in Zendesk—it's buried in event logs or subscription tables that live in BigQuery. Support leads use Switchy to query customer activity without pinging engineering every time. The OAuth2 setup means each support agent authenticates with their own Google account, so access control stays consistent with what IT already provisioned. This scenario breaks down if your queries need more than one tool—BigQuery MCP only exposes a single query tool, so you can't list tables, inspect schemas, or preview results separately. If your support team runs the same 5 queries over and over, build a Retool app instead. But for one-off escalation lookups where the question changes each time, BigQuery MCP keeps support moving without opening the GCP console or filing a Slack request to data eng.

Marketing campaign attribution deep-dive

When BigQuery MCP is overkill for small marketing teams

A 3-person marketing team wants to understand which channels drove signups last quarter. They have Google Analytics 4 data exported to BigQuery and think the MCP will let them ask natural-language questions during their retro. The problem: with only one query tool and no schema introspection, they spend more time debugging SQL syntax errors than analyzing results. The single-line format makes it hard to read queries with multiple joins, and OAuth2 setup is friction when the team doesn't already live in Google Workspace. If your marketing team isn't SQL-fluent or your BigQuery schema changes often, you're better off using Looker Studio or a BI tool with a semantic layer. BigQuery MCP makes sense when your team already writes SQL daily and needs ad-hoc access during live conversations—not when you're learning SQL for the first time or running the same reports every week.

Frequently asked

What does the Google BigQuery MCP do in Switchy?

It lets your AI agents run SQL queries directly against your BigQuery datasets. The MCP executes SELECT statements and returns results inline, so agents can answer questions about your data warehouse without you manually exporting CSVs or writing custom scripts. Useful for analytics, reporting, and data exploration workflows inside Switchy conversations.

What OAuth scopes does the BigQuery MCP request?

It asks for read access to your BigQuery projects and datasets. You'll authenticate via Google OAuth, and the MCP will inherit permissions from the Google account you connect. If your org uses IAM roles, the connecting user needs at least BigQuery Data Viewer on the datasets you want to query. Admin access isn't required unless your security policy demands it.

Can it write data or modify BigQuery tables?

No. The MCP only runs SELECT queries — it won't INSERT, UPDATE, DELETE, or CREATE tables. If you need write operations, use BigQuery's API directly or a workflow tool like Airflow. This read-only design prevents agents from accidentally corrupting production data, which is why we ship it this way.

How is this different from just pasting SQL into BigQuery Console?

The MCP brings query results into your Switchy workspace where agents can interpret them, join them with other data sources, or generate follow-up questions. You skip the copy-paste loop between BigQuery Console and your AI chat. It's faster for exploratory analysis when you're already working in Switchy, but Console still wins for complex query debugging.

Who on the team should connect the BigQuery MCP?

Whoever has read access to the datasets your team needs. In most orgs, that's a data analyst or engineer. Once connected, all Switchy workspace members can ask the agent to query BigQuery — the MCP uses the connecting user's credentials, so make sure they have appropriate dataset permissions before sharing workspace access.

Data last verified 607 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.