BigQuery 分析 MCP 服务器
概述
该服务器是针对 Google BigQuery 执行 SQL 查询的 MCP 服务器,提供以下功能:
查询验证(试运行):验证查询是否有效并估计其处理大小
安全查询执行:仅运行 1TB 以下的 SELECT 查询(防止数据修改)
JSON格式的结果:以结构化的JSON格式返回查询结果
特征
工具
dry_run_query- 执行 BigQuery 查询的试运行验证查询并估计其处理大小
检查查询大小是否符合 1TB 的限制
run_query_with_validation- 运行带有验证的 BigQuery 查询检测并拒绝 DML 语句(数据修改查询)
拒绝处理超过 1TB 的数据
执行通过验证的查询并返回结果
发展
先决条件
Node.js(v16 或更高版本)
Google Cloud 身份验证设置(gcloud CLI 或服务帐户)
安装依赖项
建造
开发模式(自动重建)
安装
要与 Claude Desktop 一起使用,请添加服务器配置:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
调试
由于 MCP 服务器通过 stdio 进行通信,因此调试可能具有挑战性。我们建议使用MCP 检查器:
检查器将提供一个 URL 来访问浏览器中的调试工具。
身份验证设置
该服务器使用 Google Cloud 身份验证。使用以下方法之一设置身份验证:
使用 gcloud CLI 登录:
gcloud auth application-default login使用服务帐户密钥:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
使用示例
试运行查询:
dry_run_query("SELECT * FROM `bigquery-public-data.samples.shakespeare` LIMIT 10")运行带有验证的查询:
run_query_with_validation("SELECT word, word_count FROM `bigquery-public-data.samples.shakespeare` WHERE corpus='hamlet' LIMIT 10")
BigQuery 分析 MCP 服务器
概述
用于在 BigQuery 上执行 SQL 查询的 MCP 服务器。它验证(试运行)并执行查询,并具有防止超过 1TB 的数据处理和修改查询(DML)的安全功能。
功能
该服务器是针对 Google BigQuery 执行 SQL 查询的 MCP 服务器,并提供以下功能:
查询验证(试运行):检查查询是否有效并估计处理大小
安全查询执行:仅执行 1TB 或更少的 SELECT 查询(防止数据修改)
JSON格式返回结果:以结构化的JSON形式返回查询结果。
功能
工具
dry_run_query- 执行 BigQuery 查询的试运行验证查询并估计处理大小
检查查询大小是否符合 1TB 的限制
run_query_with_validation- 运行带有验证的 BigQuery 查询检测并拒绝 DML 语句(数据修改查询)
拒绝处理超过 1TB 的数据
执行通过验证的查询并返回结果
开发方法
先决条件
Node.js(v16 及以上版本)
Google Cloud 身份验证设置(gcloud CLI 或服务帐户)
安装依赖项
建造
开发模式(自动重建)
安装
要与 Claude Desktop 一起使用,请添加您的服务器配置:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
调试
MCP 服务器通过标准输入/输出 (stdio) 进行通信,因此调试起来比较困难���我们建议使用MCP Inspector :
Inspector 提供了一个 URL 来访问浏览器中的调试工具。
身份验证设置
该服务器使用 Google Cloud 凭证。请通过以下方式之一设置身份验证:
使用 gcloud CLI 登录:
gcloud auth application-default login使用服务帐户密钥:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
使用示例
试运行查询:
dry_run_query("SELECT * FROM `bigquery-public-data.samples.shakespeare` LIMIT 10")带验证的查询执行:
run_query_with_validation("SELECT word, word_count FROM `bigquery-public-data.samples.shakespeare` WHERE corpus='hamlet' LIMIT 10")
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
该服务器支持针对 Google BigQuery 执行和验证 SQL 查询,并具有防止数据修改和过度处理的安全功能。
Related MCP Servers
- -security-license-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
- -security-license-qualityThis is a server that lets your LLMs (like Claude) talk directly to your BigQuery data! Think of it as a friendly translator that sits between your AI assistant and your database, making sure they can chat securely and efficiently.Last updated -120122MIT License
- -security-license-qualityA Model Context Protocol server that enables LLMs to understand BigQuery dataset structures and execute SQL queries.Last updated -243MIT License
- Asecurity-licenseAqualityA server that connects to PostgreSQL databases and provides tools for safely exploring schemas, running read-only SQL queries, and performing data analysis with pre-built templates.Last updated -64871MIT License