The `mcp-bigquery-server` package provides a server implementation for the Model Context Protocol (MCP), specifically designed to enable Large Language Models (LLMs) to interact securely and efficiently with Google BigQuery datasets. Introduced in November 2024, the MCP is an open standard that facilitates standardized communication between AI systems and external data sources or tools. This server acts as an intelligent intermediary, allowing LLMs (e.g., through interfaces like Augment Code or Cursor IDE) to perform natural-language queries, inspect database schemas, list tables, and execute SQL queries against BigQuery, without direct database access. The current stable version is 1.0.5. As a relatively new and evolving standard, the project is active, with potential for feature enhancements and protocol refinements, though a strict release cadence isn't published. A key differentiator is its focus on providing secure, read-only access to BigQuery data for AI agents, streamlining data analysis workflows within development environments.
npm install mcp-bigquery-serverVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically start the MCP BigQuery server using a generated configuration file. It includes essential BigQuery project and dataset settings, along with a placeholder for authentication, and ensures the necessary environment variables are noted.
Consult the official GitHub repository's release notes or changelog for specific version upgrade instructions. Test thoroughly in non-production environments.
Implement strict `allowedDatasets` and `queryLimits` in your `config.json`. Educate LLM users on responsible querying. Monitor BigQuery usage in your Google Cloud console.
Ensure the service account configured via `GOOGLE_APPLICATION_CREDENTIALS` (or GKE Workload Identity, etc.) has at least the `BigQuery User` role on the project and `BigQuery Data Viewer` roles on specific datasets/tables it needs to access. Grant least privilege.
Design LLM interactions and application logic to respect the read-only nature of the server. If write operations are needed, consider a separate service or a different BigQuery integration approach.
Visit the provided URL in the Google Cloud Console to enable the BigQuery API for your project. Ensure the correct project ID is configured.
Change the `port` in your `config.json` file or pass a different port via command-line argument (`--port <new-port>`) when starting the server. Alternatively, stop the conflicting application.
Verify that the `GOOGLE_APPLICATION_CREDENTIALS` environment variable points to a valid service account key.json file, and that the associated service account has at least `BigQuery User` and `BigQuery Data Viewer` roles on the target project and datasets.
Carefully review your `config.json` for typos, missing commas, unclosed brackets, or other JSON formatting issues. Use a JSON validator to check its correctness.