
mcp bigquery
一个用于查询 BigQuery 数据的 MCP 服务器,允许 AI 助手直接访问数据。
Repository Info
About This Server
一个用于查询 BigQuery 数据的 MCP 服务器,允许 AI 助手直接访问数据。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
BigQuery MCP Server
Read this in other languages: 日本語
An MCP (Model Context Protocol) server for querying BigQuery data. This allows AI assistants like Claude to directly access your BigQuery data.
Features
- Execute SQL queries to BigQuery using natural language
- List datasets and tables
- View table schemas
- Execute read-only queries with security controls
Usage
Prerequisites
- Google Cloud project with BigQuery enabled
- Locally configured authentication credentials
gcloud auth application-default login
Local Execution
- Install dependencies:
npm install
- Build the project:
npm run build
- Start the server:
npm start -- --project-id YOUR_PROJECT_ID --location YOUR_LOCATION
Installation in Claude Desktop
Add the following entry to your Claude Desktop configuration file (typically ~/.config/Claude Desktop/claude_desktop_config.json):
{
"mcpServers": {
"bigquery": {
"command": "node",
"args": [
"/absolute/path/to/dist/index.js",
"--project-id",
"YOUR_PROJECT_ID",
"--location",
"us" // For US multi-region datasets
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/your/credentials.json"
}
}
}
}
Connectivity Test
To verify that the server is working correctly, run:
npm test
This test uses a configuration file for test settings. Follow these steps:
-
Copy the sample configuration file:
cp config.sample.json config.json -
Edit
config.jsonto match your project settings:{ "projectId": "YOUR_PROJECT_ID", "location": "us", "testQuery": "SELECT 1", "resourceUri": "bigquery://YOUR_PROJECT_ID/YOUR_DATASET/YOUR_TABLE/schema" } -
Run the test:
npm test
The test will run the following checks:
- Retrieving resource list
- Retrieving tool list
- Executing SQL query
- Reading resource schema
Configuration
The server accepts the following command line arguments:
--project-id: (Required) Google Cloud project ID--location: (Optional) BigQuery location, defaults to 'us-central1'- Use 'us' for US multi-region datasets
Limitations
- Only read-only queries are allowed
- Default query limit is 1GB of processed data
Quick Start
Clone the repository
git clone https://github.com/atamaplus-public/mcp-bigqueryInstall dependencies
cd mcp-bigquery
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.