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.
- 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.)
- Google Cloud SDK (
gcloudandbqcommands) installed and configured - Python 3.13+
uvpackage manager
For setup instructions, see: https://docs.anthropic.com/en/docs/claude-code/mcp
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"
]
}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
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