SuperAPI AI Directory

mcp-bigquery-server

mcp-bigquery-server is a Model Context Protocol (MCP) server that provides LLMs with read-only, secure access to BigQuery datasets, allowing AI clients such as Claude to query and analyze data through natural language, and supports field-level sensitive data protection and query byte limit configuration.

Open website

About this tool

Purpose: To serve as a secure translation layer between AI assistants and BigQuery, allowing LLMs to query and analyze data warehouses in a read-only manner without writing SQL by hand.

Main capabilities: Only SELECT statements are allowed, validated by a BigQuery dry-run before execution, rejecting write operations such as INSERT, UPDATE, DELETE, DROP, TRUNCATE, EXPORT DATA, MERGE, etc.; supports querying tables and materialized views, can explore dataset schemas and annotate resource types; sets query billing limits via config.json or --maximum-bytes-billed; supports preventedFields field-level restrictions to prevent AI from reading PII, PHI, financial data, and keys; automatically scans the entire warehouse for columns matching sensitive patterns and adds them to the restriction list, and supports custom detection patterns.

Usage: Requires Node.js 14+, a Google Cloud project with BigQuery enabled, gcloud CLI or a service account key file, and any MCP-compatible client. For authentication, run gcloud auth application-default login, or use --key-file to specify a service account key. Add the following to the MCP client configuration: {"mcpServers":{"bigquery":{"command":"npx","args":["-y","@ergut/mcp-bigquery-server","--project-id","your-project-id"]}}}. For protected mode, additional parameters such as --location, --config-file, and --key-file can be appended. Command-line parameters include --project-id (required), --location (default US), --key-file, --config-file, and --maximum-bytes-billed. When --config-file is not passed, it runs in simple mode, with a default 1GB query limit and no field restrictions.

Use cases: Teams that need to let AI safely explore and analyze BigQuery data while preventing sensitive fields from entering the LLM context.

Limitations: Field restrictions are collaborative guardrails for AI agents, not a hard SQL firewall against malicious attackers; some complex view types may have limitations; processing limits can be configured per query.