Skip to main content
Glama
aicayzer

bigquery-mcp

by aicayzer

BigQuery MCP Server

MCP server for secure BigQuery access across multiple Google Cloud projects.

Features

  • Multi-Project Access - Query across BigQuery projects with pattern matching

  • Advanced Analytics - Column analysis, data quality checks, schema exploration

  • Security Controls - SQL validation, query limits, read-only operations

  • CLI Configuration - Command-line arguments with config file fallback

  • Docker Support - Containerized deployment for easy integration

Related MCP server: bq-readonly-mcp

Documentation

Full documentation available at aicayzer.github.io/bigquery-mcp

Quick Start

Prerequisites

  • Python 3.11+

  • Google Cloud SDK

  • Docker (optional)

Authentication

gcloud auth application-default login

Installation

git clone https://github.com/aicayzer/bigquery-mcp.git
cd bigquery-mcp
pip install -r requirements.txt

MCP Client Setup

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "bigquery": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--volume", "/Users/YOUR_USERNAME/.config/gcloud:/home/mcpuser/.config/gcloud:ro",
        "--volume", "/ABSOLUTE/PATH/TO/bigquery-mcp/logs:/app/logs",
        "bigquery-mcp:latest",
        "python", "src/server.py",
        "--project", "your-project:*",
        "--billing-project", "your-project"
      ]
    }
  }
}

Cursor IDE

Add to MCP settings:

{
  "bigquery": {
    "command": "docker",
    "args": [
      "run", "--rm", "-i",
      "--volume", "/Users/YOUR_USERNAME/.config/gcloud:/home/mcpuser/.config/gcloud:ro",
      "bigquery-mcp:latest",
      "python", "src/server.py",
      "--project", "your-project:*",
      "--billing-project", "your-project"
    ]
  }
}

Usage

CLI

# Single project
python src/server.py --project "your-project:*" --billing-project "your-project"

# Multiple projects with patterns
python src/server.py \
  --project "analytics-prod:user_*,session_*" \
  --project "logs-prod:application_*" \
  --billing-project "my-billing-project"

Docker

docker build -t bigquery-mcp .
docker run -v ~/.config/gcloud:/home/mcpuser/.config/gcloud:ro bigquery-mcp \
  python src/server.py --project "your-project:*" --billing-project "your-project"

Tools

  • list_projects() - List configured BigQuery projects

  • list_datasets(project) - List datasets in a project

  • list_tables(dataset, table_type) - List tables in a dataset

  • analyze_table(table) - Get table structure and statistics

  • analyze_columns(table, columns, sample_size) - Deep column analysis

  • execute_query(query, format, limit, timeout) - Execute SELECT queries

Configuration

CLI Arguments

python src/server.py \
  --project "analytics-prod:user_*,session_*" \
  --project "logs-prod:application_*" \
  --billing-project "my-billing-project" \
  --log-level INFO \
  --timeout 20 \
  --max-limit 50000

Config File (Optional)

bigquery:
  billing_project: "your-project"
  location: "EU"

projects:
  - project_id: "analytics-prod"
    datasets: ["user_*", "session_*"]
  - project_id: "logs-prod"  
    datasets: ["application_*"]

Contributing

  1. Fork the repository

  2. Create a feature branch from develop

  3. Make your changes with tests

  4. Submit a pull request to develop

License

MIT License - see LICENSE file.

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    B
    maintenance
    Enterprise-grade MCP server for Google Cloud BigQuery with keyless Workload Identity Federation authentication, enabling secure SQL query execution, dataset management, and schema inspection with comprehensive audit logging and encryption.
    Last updated
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    A read-only BigQuery MCP server with auto-LIMIT injection, dry-run cost guard, and ADC authentication. Allows safe SQL querying of BigQuery by LLMs without risk of data modification or unexpected costs.
    Last updated
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    A Python MCP server that retrieves and caches BigQuery metadata (datasets, tables, columns) and enables secure SQL query execution with cost control, file export, and keyword search.
    Last updated
    6
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for interacting with the Supabase platform

  • A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud

  • Official Microsoft MCP Server to query Microsoft Entra data using natural language

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aicayzer/bigquery-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server