mcp-server
v2.0.0BIQ BLUE MCP Server - BigQuery cost optimization for coding agents: savings opportunities, playbooks, code tracing and impact verification
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
biqblue_init
Connect to BIQ BLUE (device-flow sign-in on first use, credentials saved in ~/.biq/mcp-config.json) and check connectivity. Call it first, or again when another tool reports an authentication error. SCOPE: This MCP server covers Google BigQuery exclusively (queries, costs, slots, reservations, BI Engine, BigQuery Storage, table/dataset schemas). It does NOT cover other GCP services such as Cloud Run, Cloud Storage, GKE, Pub/Sub, etc.
| Parameter | Type | Description |
|---|---|---|
app_url | string | Your instance to connect to (e.g. https://customer.biq.blue). Leave empty to use your default instance. |
biqblue_overview
START HERE. High-level brief of the BigQuery bill: compute spend over the last 30 days vs the 30 days before (by pricing model: on-demand, slot reservations, BI Engine), storage cost, top projects and users, and the realistic monthly savings with the top opportunities (overlapping optimizations counted once). Then use biqblue_opportunities / biqblue_plan to act.
biqblue_opportunities
Ranked list of BigQuery savings opportunities (same rules as the BIQ BLUE savings page) with their targets: projects / users to move to autoscaling or on-demand, reservations to switch to fluid scaling, recurring queries to fix (with query_hash), datasets to switch billing model, unused tables, BI Engine candidates. Each opportunity has a change_type — "code" (SQL in the applications → pull request), "infra" (BigQuery reservations / datasets / tables → IaC PR or console commands), "config" (BIQ BLUE alerting). Opportunities in the same group or overlapping are alternatives: counted_in_to…
| Parameter | Type | Description |
|---|---|---|
category | string | |
change_type | string | Only opportunities fixed this way (e.g. "code" for what can be fixed by a PR in the application repositories) |
min_savings | number | Minimum monthly savings |
biqblue_plan
Step-by-step playbook to apply one savings opportunity, written for a coding agent: evidence and estimated savings, how to locate the code, exact SQL / DDL / bq commands, validation (dry run) and safety checks, what goes in a pull request vs what needs the user's approval. Use the id and target from biqblue_opportunities (target is required for per-target opportunities: project / user id, reservation name, query_hash, BI Engine project).
| Parameter | Type | Description |
|---|---|---|
id * | string | Opportunity id, e.g. "recurring-queries", "easy-autoscaling", "storage-billing" |
target | string | Target of the opportunity (see targets[].target in biqblue_opportunities) |
biqblue_query_sources
Fingerprint of a recurring query (by query_hash, from biqblue_opportunities / biqblue_jobs) to find which code sends it: likely origin (application, dbt, scheduled job, Looker Studio, Sheets, human), service accounts, projects, job labels (repository, dbt, topic…), run frequency and hours, sample job ids, and distinctive SQL fragments to grep in the repositories.
| Parameter | Type | Description |
|---|---|---|
query_hash * | string | SHA-256 hex of the SQL text |
when | string | Time range (default: last30) |
biqblue_jobs
Search BigQuery jobs enriched by BIQ BLUE (cost, pricing model, detected improvements such as missing partition / cluster filters, tables used, query_hash). Filter by project, user, table, improvement or SQL text — e.g. find the jobs reading a table used in the code you are changing. Max 100 jobs.
| Parameter | Type | Description |
|---|---|---|
cost_min | number | |
improvement | string | Comma-separated: partitioning, clustering, bi-engine, flex, on-demand |
limit | number | Default 20, max 100 |
project | string | |
query_like | string | Case-insensitive text contained in the SQL |
service | string | Pricing model (flex = slot reservation) |
sort | string | e.g. cost:desc (default), start_time:desc, duration_ms:desc |
table_reference | string | project.dataset.table read by the job |
user | string | user_email / service account |
when | string | Time range (default: last30) |
biqblue_verify
Measure the real impact of an optimization once deployed: daily cost, jobs, bytes and slot-hours before vs after a date, for a project, a user (service account), a reservation or a single recurring query (query_hash). Use it a few days after the change to report the achieved savings (e.g. as a PR comment).
| Parameter | Type | Description |
|---|---|---|
since * | string | Date of the change (YYYY-MM-DD) |
days | number | Days compared on each side (default 14, max 90) |
project | string | |
query_hash | string | SHA-256 hex of the SQL text |
reservation | string | reservation_id |
user | string | user_email / service account |