LM

lucashild/mcp-server-bigquery

数据库管理

本页由 AI 翻译,技术细节请以原文为准。 查看原文

131 stars 41 forks 质量 75 趋势 16MIT

lucashild/mcp-server-bigquery 是从 https://github.com/lucashild/mcp-server-bigquery. 导入的 MCP 服务器候选

概览

lucashild/mcp-server-bigquery 是从 https://github.com/lucashild/mcp-server-bigquery. 导入的 MCP 服务器候选

概述(AI 翻译)

一个提供访问BigQuery的模型上下文协议服务器。该服务器使LLM能够检查数据库模式并执行查询。

组成部分

工具

服务器实现了一个工具:

  • execute-query:使用BigQuery方言执行SQL查询
  • list-tables:列出BigQuery数据库中的所有表
  • describe-table:描述特定表的模式

配置

服务器可以通过命令行参数或环境变量进行配置。

参数 环境变量 必需 描述
--project BIGQUERY_PROJECT 是的 GCP项目ID。
--location BIGQUERY_LOCATION 是的 GCP位置(例如europe-west9)。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

BigQuery MCP server

A Model Context Protocol server that provides access to BigQuery. This server enables LLMs to inspect database schemas and execute queries.

Components

Tools

The server implements one tool:

  • execute-query: Executes a SQL query using BigQuery dialect
  • list-tables: Lists all tables in the BigQuery database
  • describe-table: Describes the schema of a specific table

Configuration

The server can be configured either with 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 Only take specific BigQuery datasets into consideration. Several datasets can be specified by repeating the argument (e.g. --dataset my_dataset_1 --dataset my_dataset_2) or by joining them with a comma in the environment variable (e.g. BIGQUERY_DATASETS=my_dataset_1,my_dataset_2). If not provided, all datasets in the project will be considered.
在 GitHub 查看完整 README

安装

uvx mcp-server-bigquery
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "bigquery": { "command": "uvx", "args": ["mcp-server-bigquery"], "env": { "BIGQUERY_PROJECT": "{{GCP_PROJECT_ID}}", "BIGQUERY_LOCATION": "{{GCP_LOCATION}}" } } } }