CentralMind Gateway
Create an API or MCP Server for structured databases in minutes.
Key Features
Use Cases
README
🚀 Interactive Demo avialable here: https://centralmind.ai
What is Centralmind/Gateway
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.18 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.
Why Centralmind/Gateway
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.
Features
- ⚡ 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
- 🔐 Authentication Options – Built-in support for API keys and OAuth
- 🔒 PII Protection – Implements regex plugin or Microsoft Presidio plugin for PII and sensitive data redaction
- 👀 Comprehensive Monitoring – Integration with OpenTelemetry (OTel) for request tracking and audit trails
- 📦 Local & On-Premises – Support for self-hosted LLMs through configurable AI endpoints and models
- 🤖 Multiple AI Providers Support - Support for OpenAI, Anthropic, Amazon Bedrock, Google Gemini & Google VertexAI
- ⚡ Flexible Configuration – Easily extensible via YAML configuration and plugin system
- 📜 API Documentation – Auto-generated Swagger documentation and OpenAPI 3.1.0 specification
- 🔑 Row-Level Security (RLS) – Fine-grained data access control using Lua scripts
- 🏎️ Performance Optimization – Implements time-based and LRU caching strategies
How it Works
1. Connect & Discover
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.
2. Deploy
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.
3. Use & Integrate
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.
Documentation
Getting Started
- Quickstart Guide
- Installation Instructions
- API Generation Guide
- API Launch Guide
Additional Resources
- ChatGPT Integration Guide
- Database Connector Documentation
- Plugin Documentation
How to Build
# 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 .
API Generation
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 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'
- 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
Running the API
Run locally
./gateway start --config gateway.yaml
Docker Compose
docker compose -f ./example/simple/docker-compose.yml up
MCP Protocol Integration
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"]
}
}
}
Roadmap
It is always subject to change, and the roadmap will highly depend on user feedback. At this moment, we are planning the following features:
Database and Connectivity
- 🗄️ Extended Database Integrations - Databricks, Redshift, S3 (Iceberg and Parquet), Oracle DB, Microsoft SQL Server, Elasticsearch
- 🔑 SSH tunneling - ability to use jumphost or ssh bastion to tunnel connections
Enhanced Functionality
- 🔍 Advanced Query Capabilities - Complex filtering syntax and Aggregation functions as parameters
- 🔐 Enhanced MCP Security - API key and OAuth authentication
Platform Improvements
- 📦 Schema Management - Automated schema evolution and API versioning
- 🚦 Advanced Traffic Management - Intelligent rate limiting, Request throttling
- ✍️ Write Operations Support - Insert, Update operations
Database Gateway in MCP Registries
Star History
Repository Owner
Organization
Repository Details
Programming Languages
Tags
Topics
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
Multi Database MCP Server
A unified server for structured, multi-database access via the Model Context Protocol.
Multi Database MCP Server provides a standardized interface for AI assistants to access and manage multiple databases concurrently through the Model Context Protocol. It supports automatic tool generation for SQL queries, transactions, schema exploration, and performance analysis for each connected database. Built using Clean Architecture, it is fully compatible with OpenAI Agents SDK, enabling seamless integration. The platform simplifies configuration and interaction with MySQL and PostgreSQL databases in a robust, modular environment.
- ⭐ 304
- MCP
- FreePeak/db-mcp-server
MCP Toolbox for Databases
Open source MCP server for secure and efficient Gen AI database integrations.
MCP Toolbox for Databases is an open source server that implements the Model Context Protocol (MCP) for database interactions in Gen AI workflows. It manages core complexities such as connection pooling, authentication, and tool integration, enabling developers to create and deploy database tools with ease and enhanced security. The toolbox supports streamlined connections between development environments and databases, offering observability, context-aware code generation, and automation features. Its design emphasizes rapid integration, reusable tools, and compatibility with AI assistants.
- ⭐ 11,412
- MCP
- googleapis/genai-toolbox
Multi-Database MCP Server (by Legion AI)
Unified multi-database access and AI interaction server with MCP integration.
Multi-Database MCP Server enables seamless access and querying of diverse databases via a unified API, with native support for the Model Context Protocol (MCP). It supports popular databases such as PostgreSQL, MySQL, SQL Server, and more, and is built for integration with AI assistants and agents. Leveraging the MCP Python SDK, it exposes databases as resources, tools, and prompts for intelligent, context-aware interactions, while delivering zero-configuration schema discovery and secure credential management.
- ⭐ 76
- MCP
- TheRaLabs/legion-mcp
PGMCP
Natural language PostgreSQL interface via the Model Context Protocol.
PGMCP enables seamless interaction with any PostgreSQL database through natural language queries, translating user intent into structured SQL results. It acts as a Model Context Protocol (MCP) server, connecting AI assistants and MCP-compatible clients to databases with features like streaming, robust error handling, and optional AI-powered SQL generation. The tool ensures secure, read-only access to existing databases using HTTP/MCP protocol. Compatibility includes tools such as Cursor, Claude Desktop, and VS Code extensions.
- ⭐ 499
- MCP
- subnetmarco/pgmcp
MCP 数据库工具 (MCP Database Utilities)
A secure bridge enabling AI systems safe, read-only access to multiple databases via unified configuration.
MCP Database Utilities provides a secure, standardized service for AI systems to access and analyze databases like SQLite, MySQL, and PostgreSQL using a unified YAML-based configuration. It enforces strict read-only operations, local processing, and credential protection to ensure data privacy and integrity. The tool is suitable for entities focused on data privacy and minimizes risks by isolating database connections and masking sensitive data. Designed for easy integration, it supports multiple installation options and advanced capabilities such as schema analysis and table browsing.
- ⭐ 85
- MCP
- donghao1393/mcp-dbutils
Prisma MCP
Bridging LLMs and databases through standardized API protocols
Prisma MCP provides local and remote MCP servers that enable large language models (LLMs) to access and manage Prisma Postgres databases using the Model Context Protocol. It exposes a suite of structured tools for database operations like creation, backup, recovery, introspection, and executing SQL queries. The platform enables secure, permissioned interactions and integrates seamlessly with development workflows and AI platforms.
- ⭐ 32
- MCP
- prisma/mcp
Didn't find tool you were looking for?