MCP server for database connectivity. Multi-DB (PostgreSQL, MySQL, SQLite), 19 tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Your databases, one conversation away.
33 tools Β· PostgreSQL Β· MySQL Β· SQLite Β· Connection Groups Β· Rollback Β· Dump/Restore Β· Schema auto-discovery
Overview Β· Just Talk to It Β· Connection Groups Β· Installation Β· Features Β· Tool Reference Β· Storage Β· Architecture
The most complete MCP server for databases. 33 tools across 3 engines (PostgreSQL, MySQL, SQLite), with connection groups, named connection management, automatic rollback, dump/restore, schema auto-discovery via MCP Resources, and full query history β all from natural language.
This is not just a query runner. It is a full database workbench: organize connections into groups scoped to your project directories, set defaults that persist between sessions, introspect schemas at three levels of detail, get pre-mutation snapshots on every write, undo mistakes with reverse SQL, dump and restore entire databases, and track every query you run β per project, per connection.
Every connection belongs to a group. Groups have scopes (directories), a default connection, and an active connection. When you work inside a scoped directory, you only see that group's connections β no clutter, no confusion.
You describe what you need. The AI reads your schema, writes the SQL, and executes it safely β with automatic LIMIT injection, pre-mutation snapshots, and confirmation before destructive operations. No cloud accounts, no ORMs, no config files. Credentials never leave your machine. Everything runs locally.
Works with Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex CLI, Gemini CLI, and any MCP-compatible client.
You don't need to memorize tool names or SQL syntax. Just say what you want.
The AI already knows your schema through MCP Resources. It reads db://schema to discover tables and db://tables/{name}/schema for columns, foreign keys, and indexes. When you ask for data across tables, it builds correct JOINs automatically.
Every connection belongs to a group. Groups are the organizing unit for your database connections β they keep things scoped, clean, and automatic.
A group has three key concepts:
Here is a practical workflow:
The first connection added to a group becomes the default automatically. Switching connections only changes the active for the current session β restart and you are back to the default. If you want the change to stick, set a new default explicitly.
This means you can safely switch to production for a quick query and know that next time you open the project, you will be back on your development database.
Add to your config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
Add to .cursor/mcp.json or .windsurf/mcp.json in your project root:
Add to .vscode/mcp.json:
Or add to ~/.codex/config.toml:
Add to ~/.gemini/settings.json:
Install only the driver(s) you need β they load dynamically at runtime:
Note: When using
npx, drivers must be installed globally. If you install the server globally (npm install -g @cocaxcode/database-mcp), drivers can be local or global.
Most database MCP servers make you reconfigure credentials every session. This one does not. Named connections persist inside groups β create them once, use them forever.
Named connections work like git branches. You create dev, staging, prod once inside a group and they are always there. Switching is instant β one command, zero reconfiguration:
Group-scoped connections mean different projects see different databases automatically. Working on project A? You see project A's group and connections. Switch to project B's directory and it picks up project B's group with its own default. No manual switching, no interference between projects:
Now each directory has its own isolated set of connections.
100% local credentials. Every connection is stored as a JSON file in ~/.database-mcp/connections/. Passwords never leave your machine. Nothing is sent to the cloud. Nothing is committed to git. Your credentials are yours.
Live management. Create, duplicate, rename, test, export, and switch connections mid-conversation. No restart needed, no config file editing, no context loss.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/database-mcp)<a href="https://allmcps.com/mcp/database-mcp"><img src="https://allmcps.com/api/badge/database-mcp?style=directory" alt="Database MCP on AllMCPs" /></a>