MCP Database Server V2 is an MCP server that provides data tools to AI agents. Its tool list has not been published yet over stdio and http, requires no API key, and scores 79/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcp-server-db": {
"env": {
"LDAP_URL": "ldap://localhost:389",
"REDIS_URL": "redis://localhost:6379",
"MONGODB_URL": "mongodb://localhost:27017",
"LDAP_BIND_DN": "cn=admin,dc=example,dc=com",
"POSTGRES_URL": "postgresql://user:password@localhost:5432/mydb",
"LDAP_BIND_PASSWORD": "admin-password"
},
"args": [
"-y",
"mcp-server-db"
],
"type": "stdio",
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
mcp-server-db is a universal, production-grade Model Context Protocol (MCP) server that empowers AI assistants to interact with Postgres, Redis, Elasticsearch, MySQL, MongoDB, and LDAP through a unified suite of 113+ high-performance tools.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'mcp-server-db' 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 mcp-server-db 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
Manage Supabase projects — databases, auth, storage, and edge functions
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
DataForSEO API modelcontextprotocol server
The Apify MCP server enables your AI agents to extract data from social media, search engines, maps, e-commerce sites, or any other website using thousands of ready-made scrapers, crawlers, and automation tools available on the Apify Store.
MCP Security Weekly
Get CVE alerts and security updates for MCP Database Server V2 and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
mcp-server-db is a universal, production-grade Model Context Protocol (MCP) server that empowers AI assistants to interact with Postgres, Redis, Elasticsearch, MySQL, MongoDB, and LDAP through a unified suite of 113+ high-performance tools.
Built with resilience in mind, it features background lazy connection management, exponential backoff retries, circuit breaker patterns, strict read-only security enforcement, and on-demand dynamic driver loading.
pg, ioredis, mongodb, mysql2, @elastic/elasticsearch, ldapts) are dynamically loaded only when a connection to that database engine is initialized.| Database Engine | Default Driver | Supported Versions | Key Features & Guardrails |
|---|---|---|---|
| PostgreSQL | pg (optional) | 10+ | Table/Index stats, Health diagnostics, Session-level read_only, Statement timeouts |
| Redis | ioredis (optional) | 5+ | Key/String/Hash/Set/List operations, Automatic 1000-item result truncation cap |
| Elasticsearch | @elastic/elasticsearch / es7-client | 7.x, 8.x, 9.x | Dual-API version facade (v7 legacy & v8/v9 modern), Cluster health, Query DSL |
| MySQL / MariaDB | mysql2 (optional) | 5.7+, 8.0+ | DDL extraction (SHOW CREATE), Processlist management, Indexes & Triggers, Session read-only |
| MongoDB | mongodb (optional) | 4.4+ | Aggregation pipelines, Distinct queries, Index management, Execution plan explain |
| LDAP | ldapts (optional) | v3 directories (OpenLDAP, AD, etc.) | Search/compare, Add/modify/delete entries, Bulk entry seeding |
When installed globally (npm install -g mcp-server-db) or run via npx -y mcp-server-db, npm automatically includes all supported database drivers (pg, ioredis, @elastic/elasticsearch, mysql2, mongodb, ldapts) out of the box via optionalDependencies.
# Global installation (includes all drivers out of the box)
npm install -g mcp-server-db
# Local project installation
npm install mcp-server-db
If you install mcp-server-db locally using --no-optional to keep your node_modules lightweight, you can install only the specific drivers you need:
# PostgreSQL
npm install pg
# Redis
npm install ioredis
# Elasticsearch
npm install @elastic/elasticsearch # For v8 & v9
npm install es7-client # For v7 legacy
# MySQL / MariaDB
npm install mysql2
# MongoDB
npm install mongodb
# LDAP
npm install ldapts
Add mcp-server-db directly to your MCP client config file (e.g. Claude Desktop, Claude Code, Gemini CLI, Cursor):
{
"mcpServers": {
"mcp-server-db": {
"type": "stdio",
"command": "npx"
... [View full README on GitHub](https://github.com/Nam088/mcp-database-server-v2#readme)