Executes a SQL query using BigQuery dialect
Lists all tables in the BigQuery database
Describes the schema of a specific table
A Model Context Protocol server that provides access to Google BigQuery. This server enables AI assistants to inspect database schemas and execute SQL queries against BigQuery datasets, making it easy to analyze and visualize data stored in Google Cloud.
BigQuery MCP server provides AI assistants with the ability to interact with Google BigQuery databases. This enables AI models to explore database schemas, execute SQL queries, and analyze data stored in Google Cloud Platform.
The easiest way to install the BigQuery MCP server is through Smithery:
npx -y @smithery/cli install mcp-server-bigquery --client claude
pip install mcp-server-bigquery
# or
uv pip install mcp-server-bigquery
For Claude Desktop, edit the configuration file:
~/Library/Application\ Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the following to your configuration:
"mcpServers": {
"bigquery": {
"command": "uvx",
"args": [
"mcp-server-bigquery",
"--project",
"YOUR_GCP_PROJECT_ID",
"--location",
"YOUR_GCP_LOCATION"
]
}
}
The server can be configured using either command-line arguments or environment variables:
| Argument | Environment Variable | Required | Description |
|----------|---------------------|----------|-------------|
| --project
| BIGQUERY_PROJECT
| Yes | The GCP project ID |
| --location
| BIGQUERY_LOCATION
| Yes | The GCP location (e.g., europe-west9
) |
| --dataset
| BIGQUERY_DATASETS
| No | Specific BigQuery datasets to use (can be repeated for multiple datasets) |
| --key-file
| BIGQUERY_KEY_FILE
| No | Path to a service account key file |
When using environment variables, you can specify multiple datasets by separating them with commas: BIGQUERY_DATASETS=dataset1,dataset2
.
Once configured, your AI assistant can use the BigQuery MCP server to:
The AI will automatically use the appropriate tool based on your requests. For example:
If you encounter issues, you can use the MCP Inspector for debugging:
npx @modelcontextprotocol/inspector uvx mcp-server-bigquery --project YOUR_PROJECT --location YOUR_LOCATION
This will provide a web interface for inspecting the communication between your AI assistant and the BigQuery server.