A Model Context Protocol (MCP) server that provides comprehensive database connectivity and query capabilities for Claude and other AI assistants. This server enables seamless interaction with databases through a standardized interface, supporting multiple database types and connection management.
This MCP server bridges the gap between AI assistants and database systems, allowing Claude to:
- Connect to multiple databases - PostgreSQL, MySQL, and other SQL databases
- Execute queries safely - With built-in validation and optional read-only modes
- Explore database schemas - Inspect tables, columns, indexes, and relationships
- Analyze data - Get table statistics and query performance insights
- Manage connections - Switch between different database environments seamlessly
- Multi-Database Support - Connect to PostgreSQL, MySQL, and other SQL databases
- Security First - Read-only mode, query validation, and secure credential handling
- Rich Schema Inspection - Detailed table descriptions, column metadata, and index information
- Performance Analysis - Query execution plans and table statistics
- Flexible Connection Management - Named connections with easy switching
- AI-Optimized - Designed specifically for AI assistant workflows
The server provides comprehensive database interaction capabilities through 28 specialized tools:
list_connections- View all configured database connectionsswitch_connection- Change active database connection during sessionstest_connection- Verify database connectivity before operations
get_db_info- Access general database information and statisticslist_tables- Browse all available tables with metadatadescribe_table- Get detailed table structure, columns, and indexesanalyze_table- Retrieve table statistics and performance metrics
select_query- Execute SELECT queries and retrieve dataexecute_query- Execute data modification (INSERT, UPDATE, DELETE) and DDL statementsshow_query- Execute SHOW commands for database settings
list_foreign_keys- List all foreign key constraints with referenced tables and actionsget_table_relationships- Get incoming and outgoing relationships for a table
list_views- List all views (separate from tables)get_view_definition- Get SQL definition of a specific viewlist_materialized_views- List materialized views (PostgreSQL only)
list_sequences- List all sequences in the databaseget_sequence_info- Get detailed sequence information (current value, increment, etc.)
list_triggers- List all triggers with events and timing informationget_trigger_definition- Get complete trigger SQL definition
list_functions- List all user-defined functions and stored proceduresget_function_definition- Get complete function source code
list_enums- List all enum types in the databaseget_enum_values- Get all possible values for a specific enum type
find_column- Search for columns by name across all tables (supports partial matching)
list_constraints- List all constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK)
generate_id- Generate unique identifiers (UUID v1-v7, CUID, CUID2)
This MCP server is perfect for:
- Database Administration - Schema exploration and maintenance tasks
- Data Analysis - Querying and analyzing data with AI assistance
- Development Support - Understanding database structures and relationships
- Performance Tuning - Analyzing query plans and optimizing database performance
- Documentation - Generating database documentation and schemas
- Migration Planning - Understanding existing database structures