Handing an agent a raw SQL connection means the schema is the permission model. Here the LLM writes a named set of endpoints once, at build time, and that file is what gets served — you can read it, edit it and commit it before anything runs. The plugin layer is what makes it deployable rather than a demo: PII redaction and Lua row-level security both execute in the gateway, so the model receives filtered data instead of being asked to behave. Raw mode is there when you want exploration instead, and its validate-before-execute step is a sensible middle ground.
A Go binary that reads your database schema, samples the data, and uses an LLM to generate an API configuration — a gateway.yaml describing endpoints per table. It then serves that configuration as an MCP server or as REST with OpenAPI. There is also a raw mode that skips generation entirely.
- Generated mode: a tool per generated endpoint, written from your actual schema and sample data rather than from a generic query interface
- Raw mode, started with --raw, which gives four tools instead: list the tables, examine their structure with samples, validate a SQL query and see its output schema before running it, then execute it
- PostgreSQL, MySQL, ClickHouse, Snowflake, MSSQL, BigQuery, Oracle, SQLite and Elasticsearch
- Three ways to serve the same configuration — REST with auto-generated Swagger and an OpenAPI 3.1.0 spec, MCP over SSE, or MCP over stdio for a desktop client
- PII redaction before data leaves the gateway, through a regex plugin or Microsoft Presidio
- Row-level security written as Lua scripts, so which rows a caller sees is decided at the gateway rather than trusted to the model
- API keys or OAuth in front of it, OpenTelemetry behind it for request tracking and an audit trail, and time-based or LRU caching
- Generation can run on OpenAI, Anthropic, Amazon Bedrock, Google Gemini or Vertex AI — or on a self-hosted model, so your schema need not leave your network
A single Go binary — build it with go build or take a release, and run it in Docker or Kubernetes if you prefer. Database credentials, and an LLM provider for the generation step only; once gateway.yaml exists, serving it needs no model. Configuration supports ${VARIABLE_NAME} substitution so secrets stay out of the file. Start it with ./gateway start --config gateway.yaml, adding --raw for raw mode, mcp-stdio for a desktop client, or --addr to move it off the default port.
One command plus a key — docker run --platform linux/amd64 -p 9090:9090 \ ghcr.io/centralmind/gateway:v0.2.18 start \ --connection-string "postgres://db-user:db-password@db-host/db-name?sslmode=require", then supply credentials
