# ergut/mcp-bigquery-server [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/ergut/mcp-bigquery-server  
**GitHub Stars:** 148  
**npm Downloads (last month):** 8038  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ergut-mcp-bigquery-server

## Description
Server implementation for Google BigQuery integration that enables direct BigQuery database access and querying capabilities

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-bigquery-server": {
    "command": "npx",
    "args": ["-y","@ergut/mcp-bigquery-server"]
  }
}
```

## Documentation

## What ergut/mcp-bigquery-server does

The ergut/mcp-bigquery-server MCP server lets an MCP-compatible AI client work with data stored in Google BigQuery. It supports natural-language requests that are translated into read-only queries, along with dataset and schema exploration. Tables and materialized views are identified as separate resource types so an agent can understand what it is inspecting.

Read-only behavior is enforced at the query level. Only SELECT statements are accepted; mutation and data-export statements such as INSERT, UPDATE, DELETE, DROP, TRUNCATE, EXPORT DATA, and MERGE are rejected. Before execution, queries are checked with BigQuery’s dry-run planner.

This project belongs in the 🗄️ Databases category and is suited to analytics assistants that need access to warehouse data without permission to change it.

## How it works

The server communicates through the Model Context Protocol and can be launched from an MCP client with npx. The client configuration supplies a Google Cloud project ID and starts the package as a local process. Authentication uses Google Cloud Application Default Credentials or, optionally, a service-account key file.

Each query can be constrained by a maximum billed-byte value. The server uses a default one-gigabyte limit when no configuration file is supplied, and a command-line value can override the configured limit. BigQuery location can also be specified; the default location is US.

Two operating modes are described. Simple Mode provides read-only querying and schema access without field restrictions. Protected Mode adds manually configured restrictions and optional automatic discovery of sensitive fields.

## Setup and configuration

The prerequisites are Node.js 14 or newer, an enabled Google Cloud project with BigQuery, and either the Google Cloud CLI or a service-account key. Authenticate with `gcloud auth application-default login`, then add an MCP entry that runs `npx -y @ergut/mcp-bigquery-server --project-id your-project-id`.

Protected deployments can add `--config-file` and optionally `--key-file` and `--location`. The JSON configuration supports `maximumBytesBilled`, a `preventedFields` mapping of tables to restricted columns, SQL LIKE patterns for sensitive-field detection, and `sensitiveFieldScanFrequencyDays`. A scan frequency of zero disables automatic scanning.

## Tools and capabilities

The ergut/mcp-bigquery-server MCP server supports:

- Running read-only BigQuery SQL through natural-language requests.
- Inspecting dataset schemas.
- Accessing tables and materialized views.
- Rejecting non-SELECT statements before execution.
- Applying per-query maximum billed-byte limits.
- Blocking configured columns from agent-accessible results.
- Detecting sensitive column names across datasets using configurable patterns.

Field restrictions can cover categories such as names, email addresses, medical information, financial data, and secrets when matching fields are configured or discovered. The server can provide guidance for reformulating requests with aggregates or excluded columns rather than exposing restricted individual values.

## Limitations and notes

Query results are sent to the connected LLM provider for processing, so field restrictions address what enters the model context; BigQuery IAM addresses who can reach the data. The README recommends local deployment and service-account authentication for sensitive-data scenarios, but this server does not make the LLM provider’s processing local.

Without `--config-file`, the server runs in Simple Mode with no field restrictions. Automatic sensitive-field scanning is available only in Protected Mode. The material describes read access and query controls, not write operations, and explicitly prevents warehouse mutation through the listed statement checks.

_Full upstream README: https://allmcps.com/mcp/ergut-mcp-bigquery-server/readme_

