Case study · Analytics SaaS · Model Context Protocol · 2026

BigQuery analytics inside Claude

Users of a business analytics platform ask Claude about their company data. An MCP connector hands each question to the platform's own AI engine, which plans, checks and writes the SQL for that specific user.

Role

LLM engineer: built the connector end to end, including channel handling, data-API integrations and test modes

Stack

MCP · LangGraph · Cloud Run (VPC) · BigQuery · FastAPI · Postgres · Qdrant · sqlglot · GPT · Vertex AI Gemini · LangSmith

The problem

What we built: how it works

Each request moves left to right through these stages.

Step 1

Claude

Desktop or Code

Step 2

MCP server

Named tools: briefing, about, usage

Step 3

AI engine

LangGraph: router → planner → plan judge → SQL composer

Step 4

Data API

Service key + the acting user

Step 5

BigQuery

Query runs within cost limits

Key design decisions

People see only what they're allowed to

Every data request carries the platform's key plus the person asking, so each user sees only the data they're allowed to see.

Figures masked from the model

Customer numbers are masked before a model writes, and sensitive answers run on a separate Vertex AI route.

No surprise query bills

A plan of each query is shown before anything runs, and a query over the cost limit is stopped with a clear message Claude can explain.

Three safe test modes

Dry runs with a stand-in model, plan-only runs that validate SQL without running it, and consent runs where a person approves each query.

Results

  • Live for customers: answers that took a day or more through an analyst now arrive in seconds (est.)
  • Every customer question was tested end to end without running a single paid warehouse query
  • Users only ever see data they're allowed to see
  • Routing, channel, memory and refusal rules all have unit tests

Have a process like this? Let's talk.

Book a free 30-minute call. We'll go through your workflows and tell you honestly whether AI is worth building.

Book a call