BigQuery MCP 服务器
这是什么?🤔
这是一个服务器,可以让你的法学硕士(比如 Claude)直接与你的 BigQuery 数据对话!你可以把它想象成一个友好的翻译器,位于你的 AI 助手和数据库之间,确保它们能够安全高效地进行对话。
快速示例
不再需要手动编写 SQL 查询 - 只需与您的数据自然聊天!
它是如何工作的?🛠️
该服务器使用模型上下文协议 (MCP),它就像一个用于 AI 与数据库通信的通用转换器。虽然 MCP 的设计目标是兼容任何 AI 模型,但它目前在 Claude Desktop 中以开发者预览版的形式提供。
您需要做的就是:
设置身份验证(见下文)
将您的项目详细信息添加到 Claude Desktop 的配置文件中
开始自然地与您的 BigQuery 数据聊天!
它能做什么?📊
只需用简单的英语提问即可运行 SQL 查询
访问数据集中的表和物化视图
探索具有清晰资源类型标签(表与视图)的数据集模式
在安全范围内分析数据(默认查询限制为 1GB)
保证数据安全(只读访问)
快速入门🚀
先决条件
Node.js 14 或更高版本
启用 BigQuery 的 Google Cloud 项目
安装了 Google Cloud CLI 或服务帐户密钥文件
Claude Desktop(目前唯一支持的LLM界面)
选项 1:通过 Smithery 快速安装(推荐)
要通过Smithery自动为 Claude Desktop 安装 BigQuery MCP Server,请在终端中运行以下命令:
安装程序将提示您:
您的 Google Cloud 项目 ID
BigQuery 位置(默认为 us-central1)
配置完成后,Smithery 将自动更新您的 Claude Desktop 配置并重新启动应用程序。
选项 2:手动设置
如果您更喜欢手动配置或需要更多控制:
使用 Google Cloud 进行身份验证(选择一种方法):
使用 Google Cloud CLI(非常适合开发):
gcloud auth application-default login使用服务帐户(建议用于生产):
# Save your service account key file and use --key-file parameter # Remember to keep your service account key file secure and never commit it to version control
添加到您的 Claude Desktop 配置将其添加到您的
claude_desktop_config.json
:基本配置:
{ "mcpServers": { "bigquery": { "command": "npx", "args": [ "-y", "@ergut/mcp-bigquery-server", "--project-id", "your-project-id", "--location", "us-central1" ] } } }使用服务帐户:
{ "mcpServers": { "bigquery": { "command": "npx", "args": [ "-y", "@ergut/mcp-bigquery-server", "--project-id", "your-project-id", "--location", "us-central1", "--key-file", "/path/to/service-account-key.json" ] } } }
**开始聊天!**打开 Claude Desktop 并开始询问有关您的数据的问题。
命令行参数
服务器接受以下参数:
--project-id
:(必填)您的 Google Cloud 项目 ID--location
:(可选)BigQuery 位置,默认为“us-central1”--key-file
:(可选)服务帐户密钥 JSON 文件的路径
使用服务帐户的示例:
所需权限
您需要以下其中之一:
roles/bigquery.user
(推荐)或两者:
roles/bigquery.dataViewer
roles/bigquery.jobUser
开发人员设置(可选)🔧
想要自定义或贡献代码?以下是如何在本地进行设置:
然后更新您的 Claude Desktop 配置以指向您的本地构建:
当前限制⚠️
MCP 支持目前仅在 Claude Desktop(开发者预览版)中提供
连接仅限于在同一台机器上运行的本地 MCP 服务器
查询是只读的,处理限制为 1GB
虽然表和视图都受支持,但某些复杂的视图类型可能会有限制
支持与资源💬
许可证📝
MIT 许可证 - 有关详细信息,请参阅LICENSE文件。
作者✍️
萨利赫·埃尔古特
赞助
该项目由以下机构赞助:
版本历史📋
请参阅CHANGELOG.md了解更新和版本历史记录。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
这是一个服务器,可以让你的法学硕士(比如 Claude)直接与你的 BigQuery 数据对话!你可以把它想象成一个友好的翻译器,位于你的 AI 助手和数据库之间,确保它们能够安全高效地进行对话。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that provides access to BigQuery. This server enables LLMs to inspect database schemas and execute queries.Last updated -120MIT License
- -securityFlicense-qualityA TypeScript-based server that provides a memory system for Large Language Models (LLMs), allowing users to interact with multiple LLM providers while maintaining conversation history and offering tools for managing providers and model configurations.Last updated -27
- -securityFlicense-qualityThis server provides an API to query Large Language Models using context from local files, supporting various models and file types for context-aware responses.Last updated -1
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to understand BigQuery dataset structures and execute SQL queries.Last updated -243MIT License