debitCredit/bq-mcp-py
If you are the rightful owner of bq-mcp-py and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A minimal MCP server providing passthrough access to Google Cloud BigQuery commands using existing gcloud CLI authentication.
BigQuery MCP Server
A minimal MCP (Model Context Protocol) server that provides passthrough access to Google Cloud BigQuery commands. This server uses your existing gcloud CLI authentication and provides tools for querying BigQuery table schemas, routine information, and executing BigQuery queries with safety checks.
Features
- Minimal setup: Uses your existing
gcloudCLI authentication - Schema inspection: Get BigQuery table and view schemas in JSON format
- Routine information: Get BigQuery routine (TVF, stored procedure, function) details
- Query execution: Execute BigQuery queries with safety checks requiring user approval for dangerous operations (DELETE, DROP, TRUNCATE, etc.)
Prerequisites
- Google Cloud SDK (
gcloudandbqcommands) installed and configured - Python 3.13+
uvpackage manager
Installation for coding agents
Claude Code
For setup instructions, see: https://docs.anthropic.com/en/docs/claude-code/mcp
VS Code
For setup instructions, see: https://code.visualstudio.com/docs/copilot/chat/mcp-servers
Use this server configuration:
"bq-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/bq-mcp-py",
"run",
"bq-mcp.py"
]
}
Usage
Once installed, the server provides the following tools:
get_bq_schema(table_id): Get the schema for a BigQuery table or view inproject.dataset.tableformatget_bq_routine(routine_id): Get information about a BigQuery routine (TVF, stored procedure, function) inproject.dataset.routine_nameformatexecute_bq_query(query, project_id): Execute BigQuery queries with safety checks and user approval prompts for dangerous operations
Authentication
This server uses your existing gcloud CLI authentication. Make sure you're authenticated with Google Cloud:
gcloud auth login
gcloud config set project YOUR_PROJECT_ID