ergut/mcp-bigquery-server logo

ergut/mcp-bigquery-server

Free

Google BigQuery 集成的服务器实现,支持直接访问和查询。

FreeFree tier
Type
Open Source

About ergut/mcp-bigquery-server

A Model Context Protocol (MCP) server that provides secure, read-only access to Google BigQuery datasets. It enables Large Language Models (LLMs) such as Claude to query and analyze BigQuery data through a standardized interface without writing SQL manually. The server is read-only by design — only SELECT statements are allowed, and every query is validated by BigQuery's dry-run planner before execution to prevent any mutations. It supports access to tables and materialized views, schema exploration, configurable safe limits (via --maximum-bytes-billed), and field-level access restrictions to protect sensitive data like PII, PHI, and financial information. An auto-discovery feature scans the entire warehouse for columns matching sensitive patterns (names, emails, SSNs, medical records, API keys) and automatically adds them to the restricted list. Configuration is driven by a config.json file, allowing custom detection patterns, scan frequency, billing limits, and per-table field restrictions.

Key Features

Read-only design prevents any data mutation (only SELECT statements allowed)
Run SQL queries by asking questions in plain English
Access both tables and materialized views in BigQuery datasets
Explore dataset schemas with clear labeling of resource types (tables vs views)
Configurable safe limits via --maximum-bytes-billed
Field-level access restrictions to protect sensitive data (PII, PHI, financial data, secrets)
Auto-discover sensitive fields by scanning entire warehouse for patterns (names, emails, SSNs, etc.)
New tables and columns are automatically protected on each scan
Fully configurable via config.json with custom detection patterns, scan frequency, billing limits, and per-table field restrictions

Pros & Cons

Pros
  • Read-only safety ensures no data mutations can occur
  • Natural language interface eliminates need to write SQL manually
  • Field-level restrictions protect sensitive data from AI agents
  • Auto-discovery of sensitive columns reduces manual maintenance
  • Configurable limits prevent runaway queries and cost overruns
Cons
  • Limited to SELECT queries only, not suitable for data modification tasks
  • Requires Google Cloud BigQuery setup and authentication
  • Only works with MCP-compatible clients (e.g., Claude Desktop, Claude Code)

Best For

Enabling natural language querying of BigQuery data through AI assistants like ClaudeProviding LLMs with secure, read-only access to data warehouses for analysisAllowing non-technical users to explore data without writing SQLIntegrating AI-driven analytics into applications using MCP-compatible clients

FAQ

What is this?
A Model Context Protocol (MCP) server that provides secure, read-only access to BigQuery datasets, enabling LLMs like Claude to query data naturally without writing SQL.
How does it work?
It uses the Model Context Protocol (MCP) as a universal translator for AI-database communication. After setting up authentication and adding project details to your MCP client's config file, you can chat with BigQuery data naturally.
What can it do?
It allows running SQL queries via plain English, accessing tables and materialized views, exploring schemas, analyzing data within configurable safe limits, and protecting sensitive data with field-level restrictions and auto-discovery.