π Interactive Demo avialable here:
Simple way to expose your database to AI-Agent via MCP or OpenAPI 3.1 protocols.
docker run --platform linux/amd64 -p 9090:9090 \
ghcr.io/centralmind/gateway:v0.2.14 start \
--connection-string "postgres://db-user:db-password@db-host/db-name?sslmode=require"
This will run for you an API:
INFO Gateway server started successfully!
INFO MCP SSE server for AI agents is running at: http://localhost:9090/sse
INFO REST API with Swagger UI is available at: http://localhost:9090/
Which you can use inside your AI Agent:
Gateway will generate AI optimized API.
AI agents and LLM-powered applications need fast, secure access to data. We're building an API layer that automatically generates secure, LLM-optimized APIs for your structured data.
- Quickly start with MCP or OpenAPI, or use Direct/Raw SQL APIs
- Filters out PII and sensitive data to ensure compliance with GDPR, CPRA, SOC 2, and other regulations
- Adds traceability and auditing capabilities, ensuring AI applications aren't black boxes and allowing security teams to maintain control
- Optimized for AI workloads: supports the Model Context Protocol (MCP) with enhanced metadata to help AI agents understand APIs, along with built-in caching and security features
It can be useful during development, when an LLM needs to create, adjust, or query data from your database. In analytical scenarios, it enables you to chat with your database or data warehouse. Enrich your AI agents with data from your database using remote function/tool calling.
- β‘ Automatic API Generation β Creates APIs automatically using LLM based on table schema and sampled data
- ποΈ Structured Database Support β Supports
PostgreSQL, MySQL, ClickHouse, Snowflake, MSSQL, BigQuery, Oracle Database, SQLite, ElasticSearch - π Multiple Protocol Support β Provides APIs as REST or MCP Server including SSE mode
- π API Documentation β Auto-generated Swagger documentation and OpenAPI 3.1.0 specification
- π PII Protection β Implements
regex plugin or Microsoft Presidio plugin for PII and sensitive data redaction - β‘ Flexible Configuration β Easily extensible via YAML configuration and plugin system
- π³ Deployment Options β Run as a binary or Docker container with ready-to-use
Helm chart - π€ Multiple AI Providers Support - Support for
OpenAI, Anthropic, Amazon Bedrock, Google Gemini & Google VertexAI - π¦ Local & On-Premises β Support for
self-hosted LLMs through configurable AI endpoints and models - π Row-Level Security (RLS) β Fine-grained data access control using
Lua scripts - π Authentication Options β Built-in support for
API keys and OAuth - π Comprehensive Monitoring β Integration with
OpenTelemetry (OTel) for request tracking and audit trails - ποΈ Performance Optimization β Implements time-based and
LRU caching strategies
Gateway connects to your structured databases like PostgreSQL and automatically analyzes the schema and data samples
to generate an optimized API structure based on your prompt. LLM is used only on discovery stage to produce API configuration.
The tool uses
Gateway supports multiple deployment options from standalone binary, docker or
Access your data through REST APIs or Model Context Protocol (MCP) with built-in security features.
Gateway seamlessly integrates with AI models and applications like
Quickstart Guide Installation Instructions API Generation Guide API Launch Guide
ChatGPT Integration Guide Database Connector Documentation Plugin Documentation
# Clone the repository
git clone https://github.com/centralmind/gateway.git
# Navigate to project directory
cd gateway
# Install dependencies
go mod download
# Build the project
go build .
Gateway uses LLM models to generate your API configuration. Follow these steps:
- Choose one of our supported AI providers:
OpenAI and all OpenAI-compatible providers Anthropic Amazon Bedrock Google Vertex AI (Anthropic) Google Gemini
Google AI Studio
Once logged in, you can create an API key in the API section of AI Studio. The free tier includes a generous monthly token allocation, making it accessible for development and testing purposes.
Configure AI provider authorization. For Google Gemini, set an API key.
export GEMINI_API_KEY='yourkey'
- Run the discovery command:
./gateway discover \
--ai-provider gemini \
--connection-string "postgresql://neondb_owner:MY_PASSWORD@MY_HOST.neon.tech/neondb?sslmode=require" \
--prompt "Generate for me awesome readonly API"
- Enjoy the generation process:
INFO π API Discovery Process
INFO Step 1: Read configs
INFO β
Step 1 completed. Done.
INFO Step 2: Discover data
INFO Discovered Tables:
INFO - payment_dim: 3 columns, 39 rows
INFO - fact_table: 9 columns, 1000000 rows
INFO β
Step 2 completed. Done.
# Additional steps and output...
INFO β
All steps completed. Done.
INFO --- Execution Statistics ---
INFO Total time taken: 1m10s
INFO Tokens used: 16543 (Estimated cost: $0.0616)
INFO Tables processed: 6
INFO API methods created: 18
INFO Total number of columns with PII data: 2
- Review the generated configuration in
gateway.yaml
:
api:
name: Awesome Readonly API
description: ''
version: '1.0'
database:
type: postgres
connection: YOUR_CONNECTION_INFO
tables:
- name: payment_dim
columns: # Table columns
endpoints:
- http_method: GET
http_path: /some_path
mcp_method: some_method
summary: Some readable summary
description: 'Some description'
query: SQL Query with params
params: # Query parameters
./gateway start --config gateway.yaml
docker compose -f ./example/simple/docker-compose.yml up
Gateway implements the MCP protocol for seamless integration with Claude and other tools. For detailed setup instructions, see our
To add MCP Tool to Claude Desktop just adjust Claude's config :
{
"mcpServers": {
"gateway": {
"command": "PATH_TO_GATEWAY_BINARY",
"args": ["start", "--config", "PATH_TO_GATEWAY_YAML_CONFIG", "mcp-stdio"]
}
}
}
It is always subject to change, and the roadmap will highly depend on user feedback. At this moment, we are planning the following features:
- ποΈ Extended Database Integrations - Redshift, S3 (Iceberg and Parquet), Oracle DB, Microsoft SQL Server, Elasticsearch
- π SSH tunneling - ability to use jumphost or ssh bastion to tunnel connections
- π Advanced Query Capabilities - Complex filtering syntax and Aggregation functions as parameters
- π Enhanced MCP Security - API key and OAuth authentication
- π¦ Schema Management - Automated schema evolution and API versioning
- π¦ Advanced Traffic Management - Intelligent rate limiting, Request throttling
- βοΈ Write Operations Support - Insert, Update operations