Universal MCP-Server for your Databases optimized for LLMs and AI-Agents.
🚀 Interactive Demo avialable here: https://centralmind.ai
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.
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.
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 AI Providers to generate the API configuration while ensuring security through PII detection.
Gateway supports multiple deployment options from standalone binary, docker or Kubernetes. Check our launching guide for detailed instructions. The system uses YAML configuration and plugins for easy customization.
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 LangChain, OpenAI and Claude Desktop using function calling or Cursor through MCP. You can also setup telemetry to local or remote destination in otel format.
# 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:
Google Gemini provides a generous free tier. You can obtain an API key by visiting 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'
./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"
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
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 Claude integration guide.
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:
No configuration available
This service may require manual configuration, please check the details on the left
Related projects feature coming soon
Will recommend related projects based on sub-categories