io.github.SnowLeopard-AI/bigquery-mcp
数据与存储by snowleopard-ai
由 SnowLeopardAI 管理的 MCP server,提供对 Google BigQuery 数据的访问能力。
什么是 io.github.SnowLeopard-AI/bigquery-mcp?
由 SnowLeopardAI 管理的 MCP server,提供对 Google BigQuery 数据的访问能力。
README
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.
Snow Leopard BigQuery MCP Server Features
Resources
| Resource URI | Description |
|---|---|
bigquery://tables | List all tables available to the agent |
bigquery://tables/{table}/schema | Get the schema of a specific table |
Tools
| Tool | Description |
|---|---|
list_tables(table: str) (optional) | List available tables |
get_schema(table: str) (optional) | Get the schema of a given table |
query(sql: str) | 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 login
This 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 claude
After 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 --help
Usage: 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 uvx
Otherwise, 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 --help
Authenticate 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 tests
Note: 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_names
Contributing
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
常见问题
io.github.SnowLeopard-AI/bigquery-mcp 是什么?
由 SnowLeopardAI 管理的 MCP server,提供对 Google BigQuery 数据的访问能力。
相关 Skills
技术栈评估
by alirezarezvani
对比框架、数据库和云服务,结合 5 年 TCO、安全风险、生态活力与迁移复杂度做量化评估,适合技术选型、栈升级和替换路线决策。
✎ 帮你系统比较技术栈优劣,不只看功能,还把TCO、安全性和生态健康度一起量化,选型和迁移决策更稳。
资深数据科学家
by alirezarezvani
覆盖实验设计、特征工程、预测建模、因果推断与模型评估,适合用 Python/R/SQL 做 A/B 测试、时序分析和生产级 ML 落地,支撑数据驱动决策。
✎ 从 A/B 测试、因果分析到预测建模一条龙搞定,既有硬核统计方法也懂业务沟通,特别适合把数据结论真正落地。
资深架构师
by alirezarezvani
适合系统设计评审、ADR记录和扩展性规划,分析依赖与耦合,权衡单体或微服务、数据库与技术栈选型,并输出Mermaid、PlantUML、ASCII架构图。
✎ 搞系统设计、技术选型和扩展规划时,用它能更快理清架构决策与依赖关系,还能直接产出 Mermaid/PlantUML 图,方案讨论效率很高。
相关 MCP Server
SQLite 数据库
编辑精选by Anthropic
SQLite 是让 AI 直接查询本地数据库进行数据分析的 MCP 服务器。
✎ 这个服务器解决了 AI 无法直接访问 SQLite 数据库的问题,适合需要快速分析本地数据集的开发者。不过,作为参考实现,它可能缺乏生产级的安全特性,建议在受控环境中使用。
PostgreSQL 数据库
编辑精选by Anthropic
PostgreSQL 是让 Claude 直接查询和管理你的数据库的 MCP 服务器。
✎ 这个服务器解决了开发者需要手动编写 SQL 查询的痛点,特别适合数据分析师或后端开发者快速探索数据库结构。不过,由于是参考实现,生产环境使用前务必评估安全风险,别指望它能处理复杂事务。
Firecrawl 智能爬虫
编辑精选by Firecrawl
Firecrawl 是让 AI 直接抓取网页并提取结构化数据的 MCP 服务器。
✎ 它解决了手动写爬虫的麻烦,让 Claude 能直接访问动态网页内容。最适合需要实时数据的研究者或开发者,比如监控竞品价格或抓取新闻。但要注意,它依赖第三方 API,可能涉及隐私和成本问题。