[Integration] feat(tools): add BigQuery MCP tool for SQL querying and data analysis (#3350)

* feat(tools): add BigQuery MCP tool for SQL querying and data analysis

- Add run_bigquery_query tool for executing read-only SQL queries
- Add describe_dataset tool for exploring dataset schemas
- Implement safety features: read-only enforcement, row limits (max 10k)
- Add comprehensive unit tests (27 tests passing)
- Follow CredentialStoreAdapter pattern from email tool
- Support ADC and service account authentication

Fixes #3067

* fix(bigquery): address PR review feedback

- Add credential_id and api_key_instructions to CredentialSpec
- Fix credential key name from 'bigquery_credentials' to 'bigquery'
- Pass credential path to BigQuery client via environment variable
- Fix ADC error message detection for both error variants
- Move google-cloud-bigquery to optional dependencies
- Update tests to use correct credential key names

All 27 tests passing

* fix(bigquery): return {error, help} when dependency missing

* fix(bigquery): return full ImportError message for missing dependency

* fix(bigquery): include 'help' key when dependency missing
This commit is contained in:
Emmanuel Nwanguma
2026-02-14 12:48:03 +01:00
committed by GitHub
parent 93c026fe31
commit 3502f25048
8 changed files with 1102 additions and 13 deletions
+5
View File
@@ -31,6 +31,7 @@ dependencies = [
"litellm>=1.81.0",
"resend>=2.0.0",
"framework",
]
[project.optional-dependencies]
@@ -51,12 +52,16 @@ excel = [
sql = [
"duckdb>=1.0.0",
]
bigquery = [
"google-cloud-bigquery>=3.0.0",
]
all = [
"RestrictedPython>=7.0",
"pytesseract>=0.3.10",
"pillow>=10.0.0",
"duckdb>=1.0.0",
"openpyxl>=3.1.0",
"google-cloud-bigquery>=3.0.0",
]
[tool.uv.sources]