Initial commit: gp-mcp server

MCP stdio server for Greenplum 6.x query plan evaluation:
- explain_sql / explain_dbt_model tools
- read-only session enforcement + statement_timeout
- dbt compile integration
- all settings via env vars (no hardcoded defaults)
This commit is contained in:
2026-05-31 14:06:21 +03:00
commit 7c9487e0f9
10 changed files with 843 additions and 0 deletions

26
.env.example Normal file
View File

@@ -0,0 +1,26 @@
# Greenplum connection (required)
GP_HOST=
GP_PORT=
GP_USER=
GP_PASSWORD=
GP_DATABASE=
# Greenplum schema search_path (optional, comma-separated)
GP_SCHEMA=
# dbt project (required for explain_dbt_model)
DBT_PROJECT_DIR=
DBT_PROFILES_DIR=
DBT_TARGET=
# Path to dbt executable (optional, defaults to "dbt" on PATH)
DBT_EXECUTABLE=
# Statement timeout in milliseconds.
# STATEMENT_TIMEOUT_MS = default applied to every EXPLAIN ANALYZE.
# MAX_STATEMENT_TIMEOUT_MS = upper bound; per-call override cannot exceed this.
STATEMENT_TIMEOUT_MS=
MAX_STATEMENT_TIMEOUT_MS=
# Logging: DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=