bigquery-mcp-server
1
BigQuery MCP Server is a solution that facilitates the interaction between Large Language Models and Google BigQuery. It enables models to not only comprehend dataset structures but also execute SQL queries securely and efficiently.
BigQuery MCP Server
A Model Context Protocol (MCP) server for accessing Google BigQuery. This server allows Large Language Models to understand BigQuery dataset structures and execute SQL queries.
Features
- Authentication and Connection Management: Supports Application Default Credentials or service account key files with configurable project ID and location.
- Tools:
- Execute read-only BigQuery SQL queries
- List all datasets and tables with schemas
- Get table schema and sample data
- Perform dry run of queries for validation
Security Features
- Only read-only queries allowed
- Default limit on query processing costs
- Secure handling of authentication credentials
Installation
Local Installation
- Clone the repository and install dependencies.
- Build the server executable.
Docker Installation
- Build and run the Docker image.
- Use Docker Compose for alternative setup.
Usage
- Run the server with helper scripts or manually.
Required Permissions
roles/bigquery.user
orroles/bigquery.dataViewer
androles/bigquery.jobUser
are required.
Error Handling
Provides detailed error messages for authentication, permission issues, and excessive data processing requests.
Code Structure
- Organized into source directories for different tools and utilities.
License
MIT License