Multi Database
๐๏ธ ๐ โ A high-performance multi-database MCP server built with Golang, supporting MySQL & PostgreSQL (NoSQL coming soon). Includes built-in tools for query execution, transaction management, schema exploration, query building, and performance analysi
What is Multi Database?
Multi Database is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐๏ธ ๐ โ a high-performance multi-database mcp server built with golang, supporting mysql & postgresql (nosql coming soon). includes built-in tools for query execution, transaction management, schema ...
๐๏ธ ๐ โ A high-performance multi-database MCP server built with Golang, supporting MySQL & PostgreSQL (NoSQL coming soon). Includes built-in tools for query execution, transaction management, schema exploration, query building, and performance analysi
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ๐๏ธ ๐ โ A high-performance multi-database MCP server built wi
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx multi-database-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Multi Database
The Multi Database MCP server is a high-performance database gateway built in Go that connects AI agents to MySQL, PostgreSQL, SQLite, Oracle, and TimescaleDB databases through a unified MCP interface. For each configured database connection it generates a dedicated set of tools for query execution, DML operations, transaction management, schema exploration, and query performance analysis โ giving AI assistants the ability to interact with multiple databases simultaneously in a single session. It supports both stdio and SSE transport modes and can be deployed as a standalone binary or a Docker container, making it suitable for local development as well as production environments where database introspection is needed.
Prerequisites
- Go 1.19+ (for building from source) or Docker (for containerized deployment)
- Access credentials for at least one supported database: MySQL, PostgreSQL, SQLite, Oracle, or TimescaleDB
- A JSON configuration file describing your database connections
- An MCP-compatible client such as Claude Desktop or Claude Code
Clone and build the server
Clone the repository and use make to build the binary. The resulting binary will be at ./bin/server.
git clone https://github.com/FreePeak/db-mcp-server.git
cd db-mcp-server
make buildCreate a database configuration file
Create a config.json file listing each database connection. Each entry needs an id (used as the tool name suffix), type, host, port, user, and password.
{
"databases": [
{
"id": "mydb",
"type": "mysql",
"host": "localhost",
"port": 3306,
"name": "myapp",
"user": "root",
"password": "secret",
"query_timeout": 30,
"max_open_conns": 10,
"max_idle_conns": 5
}
]
}Run the server in stdio mode
Start the server in stdio mode (default for MCP desktop clients) pointing at your config file.
./bin/server -t stdio -c config.jsonOr run in SSE mode for network access
Start the server in SSE mode if you need to connect from a remote client or want to run it as a background service.
./bin/server -t sse -c config.json -p 9092Or deploy with Docker
Pull the pre-built Docker image and run it, mounting your config file into the container.
docker pull freepeak/db-mcp-server:latest
docker run -p 9092:9092 \
-v $(pwd)/config.json:/app/my-config.json \
-e TRANSPORT_MODE=sse \
freepeak/db-mcp-serverMulti Database Examples
Client configuration
Claude Desktop configuration for the Multi Database MCP server running in stdio mode with a local config file. Replace the path with the actual location of your config.json.
{
"mcpServers": {
"multi-database": {
"command": "/path/to/db-mcp-server/bin/server",
"args": ["-t", "stdio", "-c", "/path/to/config.json"]
}
}
}Prompts to try
Example prompts for querying and managing databases through the MCP server. Tool names include the database ID suffix you configured (e.g. mydb).
- "List all tables in the mydb database"
- "Run a SELECT on the users table in mydb and show me the first 10 rows"
- "Explain the query performance of: SELECT * FROM orders WHERE created_at > '2024-01-01'"
- "Show me the schema for the products table in mydb"
- "Start a transaction in mydb, insert a test row, then roll it back"Troubleshooting Multi Database
Connection refused or authentication failed for the database
Verify the host, port, user, and password in your config.json. For MySQL ensure the user has GRANT privileges from the connecting host. For PostgreSQL check pg_hba.conf if connecting remotely.
Tools are not appearing in the client after startup
Check the server logs with -log-level debug to confirm it successfully connected to each database. Tools are only registered for databases that successfully connect at startup. Fix connection issues and restart the server.
Queries time out for large result sets
Increase query_timeout in the database configuration entry (value in seconds). Also consider using LIMIT clauses in your queries to reduce result set sizes when exploring data.
Frequently Asked Questions about Multi Database
What is Multi Database?
Multi Database is a Model Context Protocol (MCP) server that ๐๏ธ ๐ โ a high-performance multi-database mcp server built with golang, supporting mysql & postgresql (nosql coming soon). includes built-in tools for query execution, transaction management, schema exploration, query building, and performance analysi It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Multi Database?
Follow the installation instructions on the Multi Database GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Multi Database?
Multi Database works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Multi Database free to use?
Yes, Multi Database is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Multi Database Alternatives โ Similar Databases Servers
Looking for alternatives to Multi Database? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
โ 20.6kGo language library for reading and writing Microsoft Excelโข (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
โ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
โ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
โ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
โ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
โ 1.7k๐๏ธ ๐ โ๏ธ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Multi Database in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Multi Database?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.