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_sql
toolDry-Run Analysis: Perform dry-run operations using the
bq_dry_run_sql
tool 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.json
- Windows:
%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 🛡️
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables validation and dry-run analysis of BigQuery SQL queries without execution. Provides cost estimates, schema previews, and syntax validation for BigQuery queries.
- 📌 What is this?
- 🚀 Quick Start (4 minutes)
- 🛠️ Available Tools
- 💡 Real-World Examples
- 🎨 How It Works
- ⚙️ Configuration
- 🔧 Troubleshooting
- 📚 Learn More
- 🚦 Project Status
- 🤝 Contributing
- 📄 License
- 🙏 Acknowledgments
Related Resources
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 -1
- -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 -
- -securityAlicense-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 -