The BigQuery Validator server provides tools for validating and analyzing BigQuery SQL queries without executing them.
SQL Validation: Check BigQuery SQL syntax for correctness using the
bq_validate_sqltoolDry-Run Analysis: Perform dry-run operations using the
bq_dry_run_sqltool to obtain:Cost estimates in USD based on bytes processed (customizable price per TiB)
Referenced tables identification
Output schema preview
Parameter Support: Both validation and dry-run tools support parameterized queries with key-value pairs
Safe Operation: All operations are dry-run only - no queries are executed or data modified
Provides tools for validating BigQuery SQL syntax and performing dry-run analysis to get cost estimates, schema previews, and metadata without executing queries
mcp-bigquery
Safe BigQuery exploration through Model Context Protocol
Documentation | Quick Start | Tools | Examples
π What is this?
mcp-bigquery is an MCP (Model Context Protocol) server that enables AI assistants like Claude to safely interact with Google BigQuery.
π― Key Features
π‘οΈ 100% Safe: All operations are dry-run only (never executes queries)
π° Cost Transparency: See costs before running any query
π Complete Analysis: Analyze SQL structure, dependencies, and performance
π Schema Explorer: Browse datasets, tables, and columns with ease
β‘ Why use mcp-bigquery?
Problem | Solution with mcp-bigquery |
πΈ Accidentally running expensive queries | Check costs before execution |
π Wasting time on SQL errors | Detect syntax errors before running |
πΊοΈ Unknown table structures | Easily explore schemas |
β οΈ AI executing dangerous operations | Everything is read-only and safe |
π Quick Start (4 minutes)
Step 1: Install (1 minute)
Step 2: Authenticate with Google Cloud (2 minutes)
Step 3: Configure Claude Desktop (1 minute)
Open your Claude Desktop config:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
Step 4: Test It!
Restart Claude Desktop and try these questions:
π οΈ Available Tools
π SQL Validation & Analysis
Tool | Purpose | When to Use |
bq_validate_sql | Check SQL syntax | Before running any query |
bq_dry_run_sql | Get cost estimates & metadata | π° To check costs |
bq_analyze_query_structure | Analyze query complexity | To improve performance |
bq_extract_dependencies | Extract table dependencies | To understand data lineage |
bq_validate_query_syntax | Detailed error analysis | To debug SQL errors |
π Schema Discovery
Tool | Purpose | When to Use |
bq_list_datasets | List all datasets | To explore your project |
bq_list_tables | List tables with partitioning info | To browse a dataset |
bq_describe_table | Get detailed table schema | To understand columns |
bq_get_table_info | Complete table metadata | To get statistics |
bq_query_info_schema | Query INFORMATION_SCHEMA | For advanced metadata queries |
β‘ Performance Optimization
Tool | Purpose | When to Use |
bq_analyze_query_performance | Analyze performance | To optimize queries |
π‘ Real-World Examples
Example 1: Check Costs Before Running
Example 2: Understand Table Structure
Example 3: Get Optimization Suggestions
Example 4: Track Data Dependencies
π¨ How It Works
βοΈ Configuration
Environment Variables
Full Claude Desktop Configuration
π§ Troubleshooting
Common Issues & Solutions
β Authentication Error
Solution:
β Permission Error
Solution: Grant BigQuery Data Viewer role
β Project Not Set
Solution: Set BQ_PROJECT in your configuration
Debug Mode
If issues persist, enable debug mode:
π Learn More
Getting Started
For Developers
π¦ Project Status
Version | Release Date | Key Features |
v0.4.1 | 2025-01-22 | Better error handling, debug logging |
v0.4.0 | 2025-01-22 | Added 6 schema discovery tools |
v0.3.0 | 2025-01-17 | SQL analysis engine |
v0.2.0 | 2025-01-16 | Basic validation & dry-run |
π€ Contributing
Pull requests are welcome! See our Contributing Guide.
π License
MIT License - see LICENSE for details.
π Acknowledgments
Google BigQuery team for the excellent API
Anthropic for the MCP protocol
All contributors and users
Built for safe BigQuery exploration π‘οΈ
Related MCP Servers
- -securityFlicense-qualityA server that enables executing and validating SQL queries against Google BigQuery with safety features that prevent data modifications and excessive processing.Last updated -2
- -securityFlicense-qualityA tool that provides simple API to execute SQL queries and manage MySQL databases, designed to integrate with Cursor IDE for AI assistants to directly perform database operations.Last updated -1
- -security-license-qualityHandles SQL query execution for a natural language interface to SQLite databases, enabling users to interact with databases using plain English rather than writing SQL manually.Last updated -1MIT License
- -securityFlicense-qualityManages query validation, database connection, and security for a system that transforms SQL databases into interactive dashboards using natural language queries.Last updated -1