MCP Servers / database / mcp-database-server

mcp-database-server

JSON →
stdiononedatabase

Production-grade Model Context Protocol (MCP) server for unified SQL database access. Connect multiple databases through a single MCP server with schema discovery, relationship mapping, caching, and safety controls.

Install
How to run this server
[ { "cmd": "npx -y @adevguide/mcp-database-server", "imports": [] } ]
server path: mcp-database-server-4
Tools
What this server exposes
query
Execute SQL queries against connected databases with safety controls, query tracking, and optimization
get_schema
Discover and retrieve database schema including tables, columns, indexes, foreign keys, and relationships
get_relationships
Retrieve relationship mappings between tables including foreign keys and inferred relationships
get_join_suggestions
Get suggested join paths based on relationship graphs between tables
get_cache_stats
Retrieve statistics about the schema cache including TTL, versioning, and hit rates
refresh_cache
Manually refresh the schema cache for a specific database or all databases
get_query_stats
Retrieve query execution statistics and tracking information
get_index_recommendations
Get index recommendations for query optimization based on usage patterns
get_performance_profile
Get detailed execution analytics and performance profiling for queries
get_slow_queries
Detect and retrieve slow queries with bottleneck identification
get_optimization_suggestions
Get automated query rewriting suggestions with performance impact estimates
Configuration
Environment & auth
authnone
envDATABASE_URL
envMYSQL_URL
Resources
mcp-database-server — MCP Server · libregistry