Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,33 @@
"shared/**"
]
},
"google-bigquery-official": {
"site": "google-bigquery-official",
"entrypoint": "./dist/server/main.js",
"platformName": "kubernetes-bun",
"watch": [
"google-bigquery-official/**",
"shared/**"
]
},
"google-gke-official": {
"site": "google-gke-official",
"entrypoint": "./dist/server/main.js",
"platformName": "kubernetes-bun",
"watch": [
"google-gke-official/**",
"shared/**"
]
},
"google-maps-official": {
"site": "google-maps-official",
"entrypoint": "./dist/server/main.js",
"platformName": "kubernetes-bun",
"watch": [
"google-maps-official/**",
"shared/**"
]
},
"google-calendar-sa": {
"site": "google-calendar-sa",
"entrypoint": "./dist/server/main.js",
Expand Down
10 changes: 9 additions & 1 deletion google-bigquery-official/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Google BigQuery MCP Server Official

This is the **official Google BigQuery MCP Server**, provided directly by the Google Cloud team for integration with BigQuery.
Thin wrapper around Google's official BigQuery MCP server (`bigquery.googleapis.com/mcp`). The wrapper holds the Google OAuth client credentials server-side and proxies JSON-RPC `tools/call` to the upstream — Google's MCP doesn't support Dynamic Client Registration, so this layer is needed to integrate it into mesh.

See [`TOOLS.md`](./TOOLS.md) for the catalog (auto-generated via `bun run generate-tools`). Refresh after Google updates the upstream tools/list.

The OAuth + proxy plumbing lives in `@decocms/mcps-shared/google-mcp` — same code path used by `google-workspace` and the other `google-*-official` wrappers.

---

The upstream **Google BigQuery MCP Server** is provided directly by the Google Cloud team for integration with BigQuery.

## About Google BigQuery

Expand Down
18 changes: 18 additions & 0 deletions google-bigquery-official/TOOLS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Google BigQuery — Tool Catalog

_Auto-generated by `bun run generate-tools`. Do not edit by hand._

6 tools across 1 backend, gated behind 1 OAuth scope.

**Endpoint:** `https://bigquery.googleapis.com/mcp`

**Scopes:**
- `https://www.googleapis.com/auth/bigquery`

**Tools (6):**
- `list_dataset_ids` — List BigQuery dataset IDs in a Google Cloud project.
- `get_dataset_info` — Get metadata information about a BigQuery dataset.
- `list_table_ids` — List table ids in a BigQuery dataset.
- `get_table_info` — Get metadata information about a BigQuery table.
- `execute_sql_readonly` — Run a read-only SQL query in the project and return the result. Prefer this tool over
- `execute_sql` — Run a SQL query in the project and return the result. Prefer the `execute_sql_readonly`
4 changes: 2 additions & 2 deletions google-bigquery-official/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"friendlyName": "Google BigQuery",
"connection": {
"type": "HTTP",
"url": "https://bigquery.googleapis.com/mcp"
"url": "https://sites-google-bigquery-official.decocache.com/mcp"
},
"description": "Analyze massive datasets with Google BigQuery serverless data warehouse. Run SQL queries, manage datasets, and perform analytics through natural language.",
"icon": "https://www.gstatic.com/images/branding/product/2x/bigquery_64dp.png",
"unlisted": false,
"metadata": {
"categories": ["Data Analysis"],
"official": true,
"mesh_unlisted": true,
"mesh_unlisted": false,
"tags": ["data-warehouse", "sql", "analytics", "bigdata", "google-cloud", "machine-learning", "bi", "data-science", "petabyte-scale"],
"short_description": "Analyze massive datasets with Google BigQuery serverless data warehouse",
"mesh_description": "Google BigQuery is a fully managed, serverless data warehouse that enables super-fast SQL queries using the processing power of Google's infrastructure. This official MCP provides natural language access to BigQuery's powerful analytics capabilities, allowing you to analyze petabytes of data in seconds. Create and manage datasets, tables, and views with schema definition and partitioning strategies. Run complex SQL queries with support for standard SQL, geographic functions, machine learning functions, and user-defined functions (UDFs). Load data from various sources including Cloud Storage, Cloud SQL, Sheets, and streaming inserts. Execute federated queries that can join BigQuery data with external data sources like Cloud Storage, Bigtable, or Cloud SQL. Use BigQuery ML to create and execute machine learning models directly in SQL for tasks like classification, regression, forecasting, and recommendation. Access real-time analytics with streaming inserts and automatic table updates. Optimize costs with automatic query caching, materialized views, and partitioned tables. Monitor query performance with execution plans, slot usage, and cost estimates. Set up scheduled queries for automated data refreshes, configure access controls with IAM policies, and export results to various formats for further analysis or visualization."
Expand Down
32 changes: 32 additions & 0 deletions google-bigquery-official/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "google-bigquery-official",
"version": "1.0.0",
"description": "Wrapper around Google's official BigQuery MCP server (bigquery.googleapis.com/mcp)",
"private": true,
"type": "module",
"scripts": {
"dev": "bun run --hot server/main.ts",
"build:server": "NODE_ENV=production bun build server/main.ts --target=bun --outfile=dist/server/main.js",
"build": "bun run build:server",
"publish": "cat app.json | deco registry publish -w /shared/deco -y",
"check": "tsc --noEmit",
"generate-tools": "bun run server/scripts/generate-tools.ts"
},
"exports": {
"./tools": "./server/tools/index.ts",
"./constants": "./server/constants.ts"
},
"dependencies": {
"@decocms/runtime": "^1.2.6",
"zod": "^4.0.0"
},
"devDependencies": {
"@decocms/mcps-shared": "workspace:*",
"@modelcontextprotocol/sdk": "1.25.1",
"deco-cli": "^0.28.0",
"typescript": "^5.7.2"
},
"engines": {
"node": ">=22.0.0"
}
}
15 changes: 15 additions & 0 deletions google-bigquery-official/server/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import snapshot from "./tools/generated/bigquery.json" with { type: "json" };
import type { BackendToolDefinition } from "@decocms/mcps-shared/google-mcp";

export const BACKEND_URL = "https://bigquery.googleapis.com/mcp";

export interface BackendSnapshot {
service: string;
url: string;
scopes: string[];
tools: BackendToolDefinition[];
}

export const TOOL_SNAPSHOT = snapshot as BackendSnapshot;

export const SCOPES: string[] = TOOL_SNAPSHOT.scopes;
11 changes: 11 additions & 0 deletions google-bigquery-official/server/lib/env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Env } from "../../shared/deco.gen.ts";

export const getGoogleAccessToken = (env: Env): string => {
const authorization = env.MESH_REQUEST_CONTEXT?.authorization;
if (!authorization) {
throw new Error(
"Not authenticated. Please authorize Google BigQuery first.",
);
}
return authorization;
};
21 changes: 21 additions & 0 deletions google-bigquery-official/server/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { withRuntime } from "@decocms/runtime";
import type { Registry } from "@decocms/mcps-shared/registry";
import { serve } from "@decocms/mcps-shared/serve";
import { createGoogleOAuth } from "@decocms/mcps-shared/google-oauth";

import { tools } from "./tools/index.ts";
import { SCOPES } from "./constants.ts";
import { type Env, StateSchema } from "../shared/deco.gen.ts";

export type { Env };

const runtime = withRuntime<Env, typeof StateSchema, Registry>({
configuration: {
scopes: [],
state: StateSchema,
},
tools: (env: Env) => tools.map((createTool) => createTool(env)),
oauth: createGoogleOAuth({ scopes: SCOPES }),
});

serve(runtime.fetch);
16 changes: 16 additions & 0 deletions google-bigquery-official/server/scripts/generate-tools.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { generateSnapshots } from "@decocms/mcps-shared/google-mcp/generate-snapshot";
import { BACKEND_URL } from "../constants.ts";

const HERE = dirname(fileURLToPath(import.meta.url));
const OUT_DIR = join(HERE, "..", "tools", "generated");
const PACKAGE_ROOT = join(HERE, "..", "..");
const TOOLS_MD_PATH = join(PACKAGE_ROOT, "TOOLS.md");

await generateSnapshots({
title: "Google BigQuery — Tool Catalog",
outDir: OUT_DIR,
toolsMarkdownPath: TOOLS_MD_PATH,
backends: [{ service: "bigquery", url: BACKEND_URL }],
});
15 changes: 15 additions & 0 deletions google-bigquery-official/server/tools/generated/_index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"bigquery": {
"scopes": [
"https://www.googleapis.com/auth/bigquery"
],
"toolNames": [
"list_dataset_ids",
"get_dataset_info",
"list_table_ids",
"get_table_info",
"execute_sql_readonly",
"execute_sql"
]
}
}
Loading
Loading