bigquery-data-science
Provides Agent Skills, CLI, and stdio MCP tooling for BigQuery ML and BigQuery AI on Google Cloud, enabling task triage, exact syntax lookup for models and ML./AI. functions, search across reference guides and narratives, and access to live-verified notebooks, SQL scripts, workflows, and pipelines.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bigquery-data-scienceshow me the exact syntax for ML.PREDICT in BigQuery"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bigquery-data-science
Production Agent Skills, zero-dependency CLI & stdio MCP server for BigQuery ML and BigQuery AI — distilled directly from 104 live-executed notebooks and 87 SQL scripts in Google Cloud.
104 live-verified notebooks · 87 SQL scripts · 3 Agent Skills · 137 <25 KB syntax cards · zero-dependency CLI & stdio MCP
flowchart LR
subgraph GT["1. Ground-Truth Notebooks & SQL (GitHub)"]
direction TB
BQML["bigquery-ml/ (61 Notebooks · 58 SQL)<br/>23 Models · 12 Functions<br/>18 Workflows · 8 Pipelines"]
BQAI["bigquery-ai/ (43 Notebooks · 29 SQL)<br/>29 AI.* & ML.* Functions<br/>14 Multi-Function Workflows"]
REFS["13 Deep Reference Guides<br/>bigquery-ml/reference/ (5) · bigquery-ai/reference/ (8)<br/>Options · Gotchas · Pinned Models"]
BQML --- BQAI --- REFS
end
subgraph SYNC["2. Distillation & Verification"]
direction TB
SWEEP["bigquery-data-science sweep<br/>sync-syntax (H2 Slicer)<br/>convert-notebook (Clean MD)<br/>6-Gate CI & Link Audit"]
CLI["Zero-Dependency CLI & MCP<br/>uvx bigquery-data-science<br/>install · triage · lookup · search · mcp"]
SWEEP --> CLI
end
subgraph LENS["3. 4-Lens Progressive Disclosure (skills/)"]
direction TB
L1["Lens 1: 3 SKILL.md Routers (~8 KB)<br/>bigquery-data-science · bigquery-ml · bigquery-ai"]
L2["Lens 2: Reference Guides (14 files)<br/>Decision Matrices · Empirical Gotchas"]
L3["Lens 3: 137 Syntax Cards (< 25 KB)<br/>Surgical CREATE MODEL & AI.*/ML.* Cards"]
L4["Lens 4: 104 Narratives (~20 KB)<br/>Full Setup · IAM · SQL · BigFrames"]
L1 --> L2 --> L3 --> L4
end
GT --> SYNC --> LENS
classDef data fill:#E8F0FE,stroke:#4285F4,stroke-width:2px,color:#174EA6
classDef config fill:#FEF7E0,stroke:#F9AB00,stroke-width:2px,color:#7A5A00
classDef route fill:#FCE8E6,stroke:#EA4335,stroke-width:2px,color:#A50E0E
classDef compute fill:#E6F4EA,stroke:#34A853,stroke-width:2px,color:#0D652D
class BQML,BQAI,CLI data
class REFS,L2 config
class SWEEP,L1 route
class L3,L4 computeWhat you just found
This repository pairs two complementary layers that stay synchronized through automated tooling (bigquery-data-science sweep):
Ground-Truth Notebooks, SQL & Reference Guides (
bigquery-ml/&bigquery-ai/): Every model type,ML.*function,AI.*function, composed workflow, and orchestration pipeline is validated end-to-end in a live-executed Jupyter notebook (.ipynbwith stored execution outputs and one-click Colab / Vertex AI Workbench / BigQuery Studio headers) paired with a pure SQL companion script (.sql) and 13 exhaustive domain reference guides.4-Lens Agent Skills, CLI & Stdio MCP Server (
skills/&src/bigquery_data_science/): Instead of dumping 24 MB of raw notebooks or 200+ KB monolithic reference files into an AI coding agent's context window,bigquery-data-sciencecompiles the ground-truth notebooks and references into 4 progressive lenses — routing agents from an~8 KBSKILL.mddecision tree to a surgical<25 KBsyntax card (syntax/*.md) or a clean markdown walkthrough (narrative/*.md) only when needed.
Related MCP server: Engineering Knowledge Graph MCP Server
Three ways to start
Journey 1 — Equip your AI coding agent (uvx, uv, pip, pipx, npx skills, or MCP)
The core bigquery-data-science package has zero third-party runtime dependencies (< 1.5 MB wheel) and installs the 3 skills (bigquery-data-science, bigquery-ml, bigquery-ai) into .agents/skills/ and .claude/skills/:
# Option A — Zero-install ephemeral CLI via uvx (recommended for instant setup):
uvx bigquery-data-science install # installs into ./.agents/skills & ./.claude/skills
uvx bigquery-data-science install --global # installs into ~/.agents/skills & ~/.claude/skills
uvx bigquery-data-science install --target agents # only .agents/skills (Antigravity, Cursor, Codex, Windsurf)
uvx bigquery-data-science install --target claude # only .claude/skills (Claude Code)
# Option B — Persistent CLI install via uv tool, pipx, or pip:
uv tool install bigquery-data-science && bigquery-data-science install
pipx install bigquery-data-science && bigquery-data-science install
pip install bigquery-data-science && bigquery-data-science install
# Option C — Add to an existing Python project (uv or pip):
uv add bigquery-data-science && uv run bigquery-data-science install
pip install bigquery-data-science && python3 -m bigquery_data_science.cli install
# Option D — skills.sh CLI (installs all 3 skills or an individual skill from GitHub):
npx skills add statmike/bigquery-data-science
npx skills add statmike/bigquery-data-science --skill bigquery-ml
# Option E — Claude Code plugin marketplace & stdio MCP server:
# In Claude Code: /plugin marketplace add statmike/bigquery-data-science
# /plugin install bigquery-data-science
claude mcp add bigquery-data-science -- uvx bigquery-data-science mcp
# Or with a local pip/uv install:
claude mcp add bigquery-data-science -- python3 -m bigquery_data_science.cli mcpJourney 2 — Triage tasks & look up exact BigQuery syntax from the terminal
Run any catalog command directly with uvx bigquery-data-science ... (zero install) or bigquery-data-science ... (after uv tool install or pip install):
# 1. List bundled skills and lens counts:
uvx bigquery-data-science list
# 2. Triage an ambiguous BigQuery ML vs BigQuery AI task (10 empirical head-to-head comparisons):
uvx bigquery-data-science triage "forecast daily retail sales with holiday promotions"
# 3. Fetch the surgical syntax card (< 25 KB) for any model or function:
uvx bigquery-data-science lookup ARIMA_PLUS
uvx bigquery-data-science lookup AI.FORECAST
uvx bigquery-data-science lookup ML.ENTITY_FEATURES_AT_TIME
# 4. Search across all 137 syntax cards, 14 reference guides, and 104 narratives:
uvx bigquery-data-science search "point-in-time feature leakage"Journey 3 — Run the 104 ground-truth notebooks & SQL scripts (uv or pip)
Every notebook in bigquery-ml/ and bigquery-ai/ includes committed outputs for immediate reading on GitHub and one-click launch links for Colab, Colab Enterprise, Vertex AI Workbench, and BigQuery Studio.
To run notebooks locally, choose the dependency extra that matches the folders you want to execute:
Extra | Scope | With | With |
| Skills, CLI ( |
|
|
| Core runtime for all 104 notebooks ( |
|
|
| Adds causal inference, survival analysis, and ONNX/XGBoost import/export ( |
|
|
| Adds GCP orchestration SDKs for |
|
|
| Complete notebook, workflow, and pipeline suite |
|
|
git clone https://github.com/statmike/bigquery-data-science.git
cd bigquery-data-science
# With uv (recommended — uses the locked uv.lock environment):
uv sync --extra all
uv run bigquery-data-science kernel --user
# Or with standard Python venv + pip:
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[all]"
bigquery-data-science kernel --userFront Door 1 — Agent Skills & 4-Lens Progressive Disclosure (skills/)
The 3 Bundled Skills
Skill | Canonical Role | What It Covers | Entry Point |
Umbrella Router & Namespace Decoder ( | Routes between trained | ||
Trained Models, Preprocessing & Pipelines ( | 23 | ||
Foundation Models, Embeddings, Search & Document AI ( | 29 SQL functions across |
How the 4 Progressive Lenses Prevent Context Bloat
Lens | Skill Path | Typical Size | When the Agent Loads It |
Lens 1 — Router & Guardrails |
|
| Always first. Task routing tree, critical SQL generation rules, cross-cutting empirical gotchas, and pre-delivery verification checklist. |
Lens 2 — Decision & Gotcha Guide |
|
| When comparing options within a family (e.g., choosing among forecasting models, orchestration engines, or |
Lens 3 — Surgical Syntax Card |
| When writing SQL for a specific model or function. Sliced automatically by H2 ( | |
Lens 4 — Worked Textbook Narrative |
|
| Only when building a full end-to-end pipeline (including GCP IAM, Cloud Resource Connections, reservations, and multi-step SQL / BigFrames choreography). Never loads raw |
Front Door 2 — Ground-Truth Notebooks, SQL & Reference Hubs (bigquery-ml/ & bigquery-ai/)
Decoding BigQuery's ML.* vs AI.* SQL Namespaces
BigQuery exposes machine learning and generative AI across two SQL prefixes (ML.* and AI.*) that reflect when a function was introduced and whether it requires a CREATE MODEL DDL object. Full matrix: skills/bigquery-data-science/reference/namespace-matrix.md.
Pattern | SQL Prefix | Requires | Requires Cloud Resource Connection? | Representative Examples | Primary Hub |
1. Customer-Trained Models & Lifecycle |
| Yes (trained on your table) | Only for |
| |
2. Model-Free Feature Engineering, Drift & Point-in-Time Joins |
| No (operates directly on tables/queries) | No |
| |
3. Zero-Training Foundation Model Functions (Gemini, TimesFM, TabFM) |
| No ( | For multimodal |
| |
4. Remote Cloud AI APIs & First-Gen Vertex Wrappers |
| Yes (thin metadata pointer to Vertex / Cloud AI API) | Yes ( |
|
Navigate the Notebook & Reference Hubs
Instead of scrolling through 104 individual rows here, jump directly into the domain hubs and category indexes below:
Domain Hub | Sub-Folder / Resource | Count | What You Will Find Inside | Direct Entry Points |
BigQuery ML ( | Start Here & Reference Index |
| Interactive tour of all BigQuery ML capabilities, environment setup, and the complete |
|
| Every |
| ||
|
|
| ||
| End-to-end applied ML workflows: customer LTV, churn & survival analysis, demand forecasting at scale, fraud detection, propensity scoring, price elasticity, A/B uplift & causal inference, recommendation systems, anomaly detection, and model monitoring. |
| ||
| Production MLOps orchestration: Scheduled Queries, Dataform SQLX, Google Cloud Workflows, Cloud Composer (Airflow), Vertex AI Pipelines (KFP), Vertex AI Model Registry & online endpoints, and Vertex AI Feature Store. |
| ||
BigQuery AI ( | Start Here & Reference Index |
| Interactive tour of BigQuery AI functions, synthetic multimodal/PDF dataset generator ( |
|
| General-purpose generation ( |
| ||
| Composed multi-function pipelines: semantic search, RAG, hybrid catalog search (BM25 + vector + RRF + |
|
Contributing, Pre-Commit & CI/CD
Contributions are welcome — see CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
GitHub Actions CI & Release Workflows:
.github/workflows/ci.ymlrunsruff,mypy,pytest,bigquery-data-science sweep,sync_headers.py --check, and./scripts/check_install.shacross Python 3.11, 3.12, and 3.13 on every push and pull request..github/workflows/release.ymlpublishes release candidates (v*rc*) to TestPyPI and production tags (v*) to PyPI via OIDC Trusted Publishing.Local Pre-Commit Hooks (
.pre-commit-config.yaml): Install withuv run pre-commit installto runruff,mypy,bigquery-data-science sweep, andsync_headers.py --checkautomatically before each commit.
Run the complete local verification and cold-install gate before submitting a pull request:
uv run ruff check src tests && \
uv run mypy src && \
uv run pytest -q && \
uv run bigquery-data-science sweep && \
python3 architectures/headers/sync_headers.py --check && \
./scripts/check_install.shLicense
Apache-2.0 — see LICENSE.
This is not an officially supported Google product. It is built on Google products and is neither endorsed nor supported by Google.
This server cannot be deployed
Maintenance
Related MCP Connectors
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
Search GitHub, npm, PyPI, StackOverflow, ArXiv from one MCP — built for coding agents.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Knowledge base MCP for AI agents on iknow.dev. Search, read, and maintain via OAuth.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProduction-ready MCP server for BigQuery that translates natural language questions to SQL, executes queries securely, and delivers results via stdio or HTTP for integration with GitHub Copilot, Power BI, and web applications.996 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides a stdio MCP bridge for coding agents to query and record engineering knowledge locally, preserving debugging history, failed attempts, and verified solutions.0MIT
- AlicenseAqualityCmaintenanceEnables AI coding agents to intelligently index and search codebases with sub-20ms retrieval, 8x memory compression, and cross-encoder reranking via MCP stdio.5MIT
- FlicenseNot gradedqualityCmaintenanceEnables natural language interaction with BigQuery, providing tools to list tables, fetch schemas, and generate/execute queries via MCP.-