BigQuery MCP
Enables AI agents to interact with Google BigQuery databases, including listing tables, retrieving schemas, and executing SQL queries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BigQuery MCP What are the top 10 most popular names in 2020?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A Model Context Protocol (MCP) server for Google BigQuery that enables AI agents to interact with BigQuery databases through natural language queries and schema exploration.
This project was developed by Snow Leopard AI as a benchmarking tool for our platform, and we're making it publicly available for the community to use and build upon.
What is MCP?
The Model Context Protocol (MCP) is an open standard that allows AI applications to securely connect to external data sources and tools. This BigQuery MCP server acts as a bridge between AI agents and your BigQuery datasets.
Related MCP server: BigQuery MCP server
Snow Leopard BigQuery MCP Server Features
Resources
Resource URI | Description |
| List all tables available to the agent |
| Get the schema of a specific table |
Tools
Tool | Description |
| List available tables |
| Get the schema of a given table |
| Execute BigQuery SQL and return results |
Quick Start: Claude Desktop
Prerequisites
Before getting started, ensure you have:
Claude Desktop: Download here
Google Cloud Project with BigQuery enabled: Setup guide
Google Cloud CLI (gcloud): Installation guide
UV Package Manager: Installation guide
1. Setup Google Cloud
First, we need to authenticate with Google.
gcloud auth application-default loginThis opens your browser to authenticate your local machine with Google Cloud.
2. Configure Claude Desktop
Edit your claude_desktop_config.json file to add the BigQuery MCP server.
Application: Claude > Settings > Developer > Edit Config
Mac: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\\Claude\\claude_desktop_config.json
You will need to set your project to a Google Cloud project with permissions to submit bigquery jobs. If you do not have a project that you can run bigquery jobs on, create and test one by following Google's BigQuery Quickstart Guide Create a project and follow the instructions to query a public dataset.
{
"mcpServers": {
"bigquery": {
"command": "uvx",
"args": [
"sl-bigquery-mcp",
"--dataset",
"bigquery-public-data.usa_names",
"--project",
"๐จ <projectName> ๐จ"
]
}
}
}3. Close Claude Desktop and Launch it from the terminal
Depending on how you have installed uv, the uvx executable may not be in Claude Desktop's PATH if it is launched from the GUI. To be sure uvx is accessible from Claude Desktop, let's run it in the terminal.
open -a claudeAfter saving the configuration, restart Claude Desktop. You should now be able to ask Claude questions about your BigQuery data!
Example Query
What are the top 10 most popular names in 2020?Configuration Options
To see a complete list of parameters:
uvx sl-bigquery-mcp --helpUsage: sl-bigquery-mcp [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --mode [stdio|sse|streamable-http] MCP transport protocol [default: stdio] โ
โ --dataset TEXT Dataset(s) for mcp resources. Will create resources for all tables. โ
โ --table TEXT Table(s) for mcp resources. Can be specified as project.dataset.table or dataset.table โ
โ --enable-list-tables-tool --no-enable-list-tables-tool Registers list_resources tool [default: enable-list-tables-tool] โ
โ --enable-schema-tool --no-enable-schema-tool Registers get_schema tool [default: enable-schema-tool] โ
โ --project TEXT BigQuery project [env var: BQ_PROJECT] [default: None] โ
โ --api-method [INSERT|QUERY] BigQuery client api_method [default: QUERY] โ
โ --port INTEGER [default: 8000] โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏTroubleshooting / FAQ
An MCP Error has occurred
First, check out your Claude Desktop app logs (in the same directory as the config file) for more verbose errors / logging
On Startup
This usually means Claude is having issues starting the mcp server. Frequently this is due to uvx being inaccessible from
the application. In this case, use the full path to your uvx executable instead of just uvx in claude_desktop_config.json.
To find your uv executable, run
which uvxOtherwise, this may be caused by bad arguments, dependency version incompatibilities, or bugs. If you run into the last two, please file an issue describing the problem.
On Resource / Tool Usage
This may be a misconfiguration mcp server, authentication issues, the llm getting too much data, or of course, product bugs. After checking the logs, consider using the MCP Inspector to debug your issue. And of course, file any bugs you find on our issue board.
Local Development & Testing
Setup Development Environment
Clone the repository
Setup virtual environment and install dependencies
Verify installation
git clone https://github.com/SnowLeopard-AI/bigquery-mcp.git
cd bigquery-mcp
uv sync
source .venv/bin/activate
sl-bigquery-mcp --helpAuthenticate with Google Cloud
The following command will launch a browser for you to login to your google cloud account. You must have a Google Cloud
project with BigQuery enabled. If you don't, see Google's bigquery setup guide.
gcloud auth application-default login
gcloud config set project <projectName>
gcloud auth application-default set-quota-project <projectName>Running Tests
Run the tests to make sure your dev environment is properly configured.
pytest testsNote: the tests run actual BigQuery queries against public datasets and require authentication.
Local MCP Inspector
For hands-on testing and development, use the MCP Inspector tool:
npx @modelcontextprotocol/inspector uv run sl-bigquery-mcp --dataset bigquery-public-data.usa_namesContributing
We welcome contributions! Please coordinate with us on discord to ensure your changes can quicly make it into the repo. Communicating before coding always saves time.
For logistics of contributing to an open source project, see the first contributions repository.
Support
Issues: GitHub Issues
Documentation: BigQuery Documentation
MCP Protocol: Model Context Protocol
Contact: Discord Server
Available Tools
3 toolsget_schemaC
Get the schema for a given table
Inputs: table (required).
list_tablesA
List the tables available
Inputs: no named parameters.
queryC
Executes the provided BigQuery sql statement and returns the results
Inputs: sql (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 3 tools
Each tool has a distinct and clear purpose: query executes SQL, list_tables enumerates tables, and get_schema describes table structure. There is little risk of an agent selecting the wrong tool for a task.
list_tables and get_schema follow a consistent verb_noun snake_case pattern. The lone tool 'query' is a simple verb without a noun object, which is a minor deviation but still clear and natural for the operation.
Three tools is on the minimal side but reasonable for a focused BigQuery read/query server. Each tool serves a distinct need, though the server could support a slightly broader set without feeling bloated.
The query tool can execute arbitrary SQL, including DDL/DML, so most BigQuery operations are reachable indirectly. The main gaps are convenience features like listing datasets or managing query jobs, but agents can work around these with SQL and INFORMATION_SCHEMA queries.
Maintenance
Related MCP Connectors
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze dataโenabling direct access to enterprise analytics data without requiring manual SQL coding.
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Connect an AI assistant to your Google Sheets, Drive, Docs, PDFs, BigQuery and Gmail.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables LLMs to inspect database schemas, list tables, and execute SQL queries against BigQuery.-
- FlicenseNot gradedqualityAmaintenanceEnables LLMs to inspect database schemas, list tables, describe table schemas, and execute SQL queries against BigQuery.-
- FlicenseNot gradedqualityAmaintenanceEnables LLMs to inspect database schemas, list and describe tables, and execute SQL queries against BigQuery using BigQuery dialect.-
- FlicenseNot gradedqualityAmaintenanceEnables LLMs to inspect database schemas, list and describe tables, and execute SQL queries against BigQuery.-