LabscoMCP early access ↗
MoustenMCP SERVER

MCP BigQuery Server

Read-only BigQuery with a memory — ten tools that cache results, document columns, track schema changes and explain query performance.

by Mousten ↗Relational SQL DatabasesCommunity

LABSCO SUMMARY

Two servers in one, and you can stop at the first.

The BigQuery half works on its own: read-only queries with maximum_bytes_billed as a cost ceiling, and INSERT, UPDATE, DELETE, CREATE, DROP and ALTER blocked outright. Everything memorable — caching that invalidates on table changes, column documentation, performance history — depends on a Supabase project you set up with the README's schema, so decide up front whether you want that second dependency. Row Level Security and per-user cache isolation are there for multi-tenant use.

What it is

A FastMCP server over BigQuery with an optional Supabase knowledge base behind it. The core is read-only SQL and schema access; the Supabase half adds result caching with dependency-based invalidation, business context on columns, query history and schema-evolution tracking.

What you get

  • A read-only SQL query with caching and a cost ceiling — execute_bigquery_sql, taking sql, maximum_bytes_billed, use_cache, user_id and force_refresh
  • Dataset and table discovery with the documentation attached — get_datasets, get_tables, get_table_schema
  • Business context rather than just column types — explain_table, with usage statistics on request
  • Query recommendations drawn from past usage — get_query_suggestions
  • Performance analysis over query history, with recommendations — analyze_query_performance
  • Schema changes tracked over time, with impact analysis — get_schema_changes
  • Cache operations and a connectivity check — manage_cache with actions such as stats and cleanup, and health_check
  • Three transports from one binary — mcp-bigquery --transport http, --transport stdio, --transport sse
  • Server-Sent Events for live monitoring: system status, query execution and resource updates on separate streams

Requirements

Python with uv, installed from a clone as uv pip install -e ".[dev]". BigQuery configuration goes in .env as PROJECT_ID and LOCATION, with KEY_FILE pointing at a service-account key or Google Cloud SDK default credentials used instead. The enhanced features need a Supabase project — SUPABASE_URL plus SUPABASE_SERVICE_KEY or SUPABASE_ANON_KEY — and the tables the README's SQL creates: query_cache, table_dependencies, schema_snapshots, column_documentation, query_history, query_templates, event_log and user_preferences.

Setup effort

Build from source — git clone https://github.com/Mousten/mcp-bigquery-server.git