CentralMind Gateway: Create API or MCP Server in Minutes ๐ Interactive Demo avialable here: https://centralmind.ai Simple way to expose your database to AI-Agent via MCP or OpenAPI 3.1 protocols. This will run for you an API: Which you can use inside your AI Agent: Gateway will generate AI optimized API. AI agents and LLM-powered applications need fas
Add this skill
npx mdskills install centralmind/gatewayComprehensive database-to-API gateway with MCP support, strong security features, and multi-provider LLM integration
1<div align="center">23 <a href="https://discord.gg/XFhaUG4F5x"><img src="https://dcbadge.limes.pink/api/server/https://discord.gg/XFhaUG4F5x" height="20"></a> <a href="https://t.me/+TM3T1SikjzA4ZWVi"><img src="https://img.shields.io/badge/telegram-%E2%9D%A4%EF%B8%8F-252850?style=plastic&logo=telegram" height=20></a> <a href="https://docs.centralmind.ai"><img src="https://img.shields.io/badge/Full%20Documentation-blue?style=for-the-badge&logo=rocket&logoColor=white" height="20"></a> <a href="https://cursor.com/install-mcp?name=CentralMind%20Database%20Gateway&config=eyJjb21tYW5kIjoiZG9ja2VyIHJ1biAtaSAtLXBsYXRmb3JtIGxpbnV4L2FtZDY0IGdoY3IuaW8vY2VudHJhbG1pbmQvZ2F0ZXdheTp2MC4yLjE4IC0tY29ubmVjdGlvbi1zdHJpbmcgcG9zdGdyZXNxbDovL215X3VzZXI6bXlfcGFzc0Bsb2NhbGhvc3Q6NTQzMi9teWRiIHN0YXJ0IHN0ZGlvIn0%3D"><img height="21" src="https://cursor.com/deeplink/mcp-install-dark.svg"></a>456</div>789<h2 align="center">CentralMind Gateway: Create API or MCP Server in Minutes</h2>1011๐ Interactive Demo avialable here: https://centralmind.ai1213## What is Centralmind/Gateway1415Simple way to expose your database to AI-Agent via MCP or OpenAPI 3.1 protocols.1617```bash18docker run --platform linux/amd64 -p 9090:9090 \19 ghcr.io/centralmind/gateway:v0.2.18 start \20 --connection-string "postgres://db-user:db-password@db-host/db-name?sslmode=require"21```2223This will run for you an API:2425```shell26INFO Gateway server started successfully!27INFO MCP SSE server for AI agents is running at: http://localhost:9090/sse28INFO REST API with Swagger UI is available at: http://localhost:9090/29```3031Which you can use inside your AI Agent:32333435Gateway will generate AI optimized API.363738## Why Centralmind/Gateway3940AI 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.41- Quickly start with MCP or OpenAPI, or use Direct/Raw SQL APIs42- Filters out PII and sensitive data to ensure compliance with GDPR, CPRA, SOC 2, and other regulations43- Adds traceability and auditing capabilities, ensuring AI applications aren't black boxes and allowing security teams to maintain control44- 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 features4546It can be useful during development, when an LLM needs to create, adjust, or query data from your database.47In analytical scenarios, it enables you to chat with your database or data warehouse.48Enrich your AI agents with data from your database using remote function/tool calling.49505152## Features5354- โก **Automatic API Generation** โ Creates APIs automatically using LLM based on table schema and sampled data55- ๐๏ธ **Structured Database Support** โ Supports <a href="https://docs.centralmind.ai/connectors/postgres/">PostgreSQL</a>, <a href="https://docs.centralmind.ai/connectors/mysql/">MySQL</a>, <a href="https://docs.centralmind.ai/connectors/clickhouse/">ClickHouse</a>, <a href="https://docs.centralmind.ai/connectors/snowflake/">Snowflake</a>, <a href="https://docs.centralmind.ai/connectors/mssql/">MSSQL</a>, <a href="https://docs.centralmind.ai/connectors/bigquery/">BigQuery</a>, <a href="https://docs.centralmind.ai/connectors/oracle/">Oracle Database</a>, <a href="https://docs.centralmind.ai/connectors/sqlite/">SQLite</a>, <a href="https://docs.centralmind.ai/connectors/sqlite/">ElasticSearch</a>56- ๐ **Multiple Protocol Support** โ Provides APIs as REST or MCP Server including SSE mode57- ๐ **Authentication Options** โ Built-in support for <a href="https://docs.centralmind.ai/plugins/api_keys/">API keys</a> and <a href="https://docs.centralmind.ai/plugins/oauth/">OAuth</a>58- ๐ **PII Protection** โ Implements <a href="https://docs.centralmind.ai/plugins/pii_remover/">regex plugin</a> or <a href="https://docs.centralmind.ai/plugins/presidio_anonymizer/">Microsoft Presidio plugin</a> for PII and sensitive data redaction59- ๐ **Comprehensive Monitoring** โ Integration with <a href="https://docs.centralmind.ai/plugins/otel/">OpenTelemetry (OTel)</a> for request tracking and audit trails60- ๐ฆ **Local & On-Premises** โ Support for <a href="https://docs.centralmind.ai/providers/local-models/">self-hosted LLMs</a> through configurable AI endpoints and models61- ๐ค **Multiple AI Providers Support** - Support for [OpenAI](https://docs.centralmind.ai/providers/openai), [Anthropic](https://docs.centralmind.ai/providers/anthropic), [Amazon Bedrock](https://docs.centralmind.ai/providers/bedrock), [Google Gemini](https://docs.centralmind.ai/providers/gemini) & [Google VertexAI](https://docs.centralmind.ai/providers/anthropic-vertexai)62- โก **Flexible Configuration** โ Easily extensible via YAML configuration and plugin system63- ๐ **API Documentation** โ Auto-generated Swagger documentation and OpenAPI 3.1.0 specification64- ๐ **Row-Level Security (RLS)** โ Fine-grained data access control using <a href="https://docs.centralmind.ai/plugins/lua_rls/">Lua scripts</a>65- ๐๏ธ **Performance Optimization** โ Implements time-based and <a href="https://docs.centralmind.ai/plugins/lru_cache/">LRU caching</a> strategies6667## How it Works6869<div align="center">70717273</div>7475### 1. Connect & Discover7677Gateway connects to your structured databases like PostgreSQL and automatically analyzes the schema and data samples78to generate an optimized API structure based on your prompt. LLM is used only on discovery stage to produce API configuration.79The tool uses [AI Providers](https://docs.centralmind.ai/providers) to generate the API configuration while ensuring security80through PII detection.8182### 2. Deploy8384Gateway supports multiple deployment options from standalone binary, docker or <a href="https://docs.centralmind.ai/example/k8s/">Kubernetes</a>.85Check our <a href="https://docs.centralmind.ai/docs/content/getting-started/launching-api/">launching guide</a> for detailed86instructions. The system uses YAML configuration and plugins for easy customization.8788### 3. Use & Integrate8990Access your data through REST APIs or Model Context Protocol (MCP) with built-in security features.91Gateway seamlessly integrates with AI models and applications like <a href="https://docs.centralmind.ai/docs/content/integration/langchain/">LangChain</a>,92<a href="https://docs.centralmind.ai/docs/content/integration/chatgpt/">OpenAI</a> and93<a href="https://docs.centralmind.ai/docs/content/integration/claude-desktop/">Claude Desktop</a> using function calling94or <a href="https://docs.centralmind.ai/docs/content/integration/cursor/">Cursor</a> through MCP. You can also <a href="https://docs.centralmind.ai/plugins/otel/">setup telemetry</a> to local or remote destination in otel format.9596## Documentation9798### Getting Started99100- <a href="https://docs.centralmind.ai/docs/content/getting-started/quickstart/">Quickstart Guide</a>101- <a href="https://docs.centralmind.ai/docs/content/getting-started/installation/">Installation Instructions</a>102- <a href="https://docs.centralmind.ai/docs/content/getting-started/generating-api/">API Generation Guide</a>103- <a href="https://docs.centralmind.ai/docs/content/getting-started/launching-api/">API Launch Guide</a>104105### Additional Resources106107- <a href="https://docs.centralmind.ai/docs/content/integration/chatgpt/">ChatGPT Integration Guide</a>108- <a href="https://docs.centralmind.ai/connectors/">Database Connector Documentation</a>109- <a href="https://docs.centralmind.ai/plugins/">Plugin Documentation</a>110111## How to Build112113```shell114# Clone the repository115git clone https://github.com/centralmind/gateway.git116117# Navigate to project directory118cd gateway119120# Install dependencies121go mod download122123# Build the project124go build .125```126127## API Generation128129Gateway uses LLM models to generate your API configuration. Follow these steps:130131132Choose one of our supported AI providers:133- [OpenAI](https://docs.centralmind.ai/providers/openai) and all OpenAI-compatible providers134- [Anthropic](https://docs.centralmind.ai/providers/anthropic)135- [Amazon Bedrock](https://docs.centralmind.ai/providers/bedrock)136- [Google Vertex AI (Anthropic)](https://docs.centralmind.ai/providers/anthropic-vertexai)137- [Google Gemini](https://docs.centralmind.ai/providers/gemini)138139Google Gemini provides a generous **free tier**. You can obtain an API key by visiting Google AI Studio:140141- [Google AI Studio](https://aistudio.google.com/apikey)142143Once 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.144145Configure AI provider authorization. For Google Gemini, set an API key.146147```bash148export GEMINI_API_KEY='yourkey'149```1501512. Run the discovery command:152153```shell154./gateway discover \155 --ai-provider gemini \156 --connection-string "postgresql://neondb_owner:MY_PASSWORD@MY_HOST.neon.tech/neondb?sslmode=require" \157 --prompt "Generate for me awesome readonly API"158```1591603. Enjoy the generation process:161162```shell163INFO ๐ API Discovery Process164INFO Step 1: Read configs165INFO โ Step 1 completed. Done.166167INFO Step 2: Discover data168INFO Discovered Tables:169INFO - payment_dim: 3 columns, 39 rows170INFO - fact_table: 9 columns, 1000000 rows171INFO โ Step 2 completed. Done.172173# Additional steps and output...174175INFO โ All steps completed. Done.176177INFO --- Execution Statistics ---178INFO Total time taken: 1m10s179INFO Tokens used: 16543 (Estimated cost: $0.0616)180INFO Tables processed: 6181INFO API methods created: 18182INFO Total number of columns with PII data: 2183```1841854. Review the generated configuration in `gateway.yaml`:186187```yaml188api:189 name: Awesome Readonly API190 description: ''191 version: '1.0'192database:193 type: postgres194 connection: YOUR_CONNECTION_INFO195 tables:196 - name: payment_dim197 columns: # Table columns198 endpoints:199 - http_method: GET200 http_path: /some_path201 mcp_method: some_method202 summary: Some readable summary203 description: 'Some description'204 query: SQL Query with params205 params: # Query parameters206```207208## Running the API209210### Run locally211212```shell213./gateway start --config gateway.yaml214```215216### Docker Compose217218```shell219docker compose -f ./example/simple/docker-compose.yml up220```221222### MCP Protocol Integration223224Gateway implements the MCP protocol for seamless integration with Claude and other tools. For detailed setup instructions, see our <a href="https://docs.centralmind.ai/docs/content/integration/claude-desktop/">Claude integration guide</a>.225226To add MCP Tool to Claude Desktop just adjust Claude's config :227228```json229{230 "mcpServers": {231 "gateway": {232 "command": "PATH_TO_GATEWAY_BINARY",233 "args": ["start", "--config", "PATH_TO_GATEWAY_YAML_CONFIG", "mcp-stdio"]234 }235 }236}237```238239## Roadmap240241It is always subject to change, and the roadmap will highly depend on user feedback. At this moment,242we are planning the following features:243244#### Database and Connectivity245- ๐๏ธ **Extended Database Integrations** - Databricks, Redshift, S3 (Iceberg and Parquet), Oracle DB, Microsoft SQL Server, Elasticsearch246- ๐ **SSH tunneling** - ability to use jumphost or ssh bastion to tunnel connections247248#### Enhanced Functionality249- ๐ **Advanced Query Capabilities** - Complex filtering syntax and Aggregation functions as parameters250- ๐ **Enhanced MCP Security** - API key and OAuth authentication251252#### Platform Improvements253- ๐ฆ **Schema Management** - Automated schema evolution and API versioning254- ๐ฆ **Advanced Traffic Management** - Intelligent rate limiting, Request throttling255- โ๏ธ **Write Operations Support** - Insert, Update operations256257## Database Gateway in MCP Registries258- https://mcpreview.com/mcp-servers/centralmind/gateway259- https://mcp.so/server/gateway/centralmind260- https://smithery.ai/server/@centralmind/gateway261- https://www.pulsemcp.com/servers/centralmind-database-gateway262
Full transparency โ inspect the skill content before installing.