Multi Database MCP Server is an MCP server that provides AI assistants with unified, structured access to multiple relational databases at the same time. Developed using the FreePeak/cortex Go framework, it connects directly to MySQL, PostgreSQL, SQLite, Oracle, and TimescaleDB instances within a single running process. AI engineers, software developers, and database administrators use this server to query schemas, inspect transaction lifecycles, run execution statements, and profile query performance using dedicated, auto-generated tools for each distinct database ID. To ensure enterprise-grade safety during agent sessions, the server integrates defense-in-depth guardrails including per-database read-only modes, regex-based column data masking, statement timeouts, row truncation limits, and JSONL audit logging. Deployment options span standard input/output for local desktop environments as well as Server-Sent Events and HTTP transports secured by bearer API keys, making it suitable for both local development tools and containerized environments.
Category: Databases & Data Stores
Tags: database-management, mysql, postgresql, SQL, sqlite
Visit Multi Database MCP Server
Follow these steps to set up and configure the server for your environment: 1. Prepare a config.json configuration file defining your target database connections and credentials. 2. To build from source, clone the repository using git clone https://github.com/FreePeak/db-mcp-server.git, navigate to the directory with cd db-mcp-server, and run make build. 3. Alternatively, pull and deploy via Docker using docker run -p 9092:9092 -v $(pwd)/config.json:/app/my-config.json -e TRANSPORT_MODE=sse -e CONFIG_PATH=/app/my-config.json freepeak/db-mcp-server. 4. For Cursor IDE integration in stdio mode, add the server to .cursor/mcp.json under mcpServers: json { "mcpServers": { "stdio-db-mcp-server": { "command": "/path/to/db-mcp-server/server", "args": ["-t", "stdio", "-c", "/path/to/config.json"] } } } 5. For SSE client integration, run ./bin/server -t sse -c config.json and connect to endpoint http://localhost:9092/sse.
Part of MCP Servers
The server provides native support for MySQL, PostgreSQL (versions 9.6 through 17), SQLite (including SQLCipher and in-memory databases), Oracle (10g through 23c, RAC, and Cloud Wallet), and TimescaleDB. Connections can be configured together inside a single JSON configuration file.
For each connection ID specified in your configuration, the server dynamically generates a dedicated suite of tools. For example, a database ID named mysql1 produces query_mysql1, execute_mysql1, transaction_mysql1, schema_mysql1, and performance_mysql1.
Multi Database MCP Server works with any MCP client supporting standard I/O (stdio) or Server-Sent Events (SSE). It integrates directly with developer environments like Cursor IDE through mcp.json and works with frameworks compatible with the OpenAI Agents SDK.
It provides a read_only configuration flag per database. When enabled, it blocks write statements across both query and execute tools using an application classifier, and enforces read-only session defaults directly at the database engine level on MySQL, PostgreSQL, and SQLite.
Yes, Multi Database MCP Server is an open source project released under the MIT license. You can view the source code, inspect architecture documentation, report issues, and contribute on its GitHub repository at FreePeak/db-mcp-server.