MCP server for database connectivity. Multi-DB (PostgreSQL, MySQL, SQLite), 19 tools.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"database": {
"args": [
"-y",
"@cocaxcode/database-mcp@latest"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
33 tools · PostgreSQL · MySQL · SQLite · Connection Groups · Rollback · Dump/Restore · Schema auto-discovery
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@cocaxcode/database-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @cocaxcode/database-mcp against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in data
Query and manage PostgreSQL databases directly from AI assistants
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Manage Supabase projects — databases, auth, storage, and edge functions
Real-time financial market data: stocks, forex, crypto, commodities, and economic indicators
MCP Security Weekly
Get CVE alerts and security updates for io.github.cocaxcode/database-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.
> "Connect to my local PostgreSQL on port 5432, database myapp, user admin"
> "Create a group called backend and add this directory"
> "Connect to my PostgreSQL on localhost, put it in the backend group"
> "Set local-pg as the default connection"
> "Show me all tables"
> "What columns does the users table have?"
> "Show me the last 10 orders with the customer name"
-> AI reads FKs from schema, builds the JOIN, applies LIMIT 10
> "Insert a test user called Alice"
-> Snapshot captured for rollback
> "Oops, undo that"
-> Rows restored via reverse SQL
> "Switch to the production database for this session"
-> Instant context change, all queries now go to prod
> "Delete all inactive users"
-> "This will affect N rows. Call again with confirm=true to proceed."
> "What did I run today?"
-> Full query history with timestamps and execution times
> "Dump the database — structure and data"
-> SQL file generated, ready for restore
The AI already kn