MCP MySQL/MariaDB Database Server
Provides tools for executing SQL queries and updates, listing tables, describing table structures, testing connections, and managing multiple MariaDB database connections.
Provides tools for executing SQL queries and updates, listing tables, describing table structures, testing connections, and managing multiple MySQL database connections.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP MySQL/MariaDB Database Server
A fully-featured Model Context Protocol (MCP) server providing comprehensive operations for MySQL and MariaDB databases.
๐ Features
๐๏ธ Multi-Database Support
Connect to multiple databases simultaneously - Manage multiple MySQL/MariaDB instances within a single MCP Server
Flexible connection naming - Support for custom connection names (
main,test,analytics,prod, etc.)Default connection setting - Specify the default database connection to use
Backward compatibility - Existing single-database configurations work without modification
๐ Multi-Transport Modes
stdio mode - Standard input/output, suitable for local Claude Desktop
HTTP mode - HTTP/SSE server for external and remote access
both mode - Provide both stdio and HTTP connections simultaneously
๐ Enterprise-Grade Security
SQL Injection Protection - Automatically detect and block dangerous SQL operations
Connection Pool Management - Efficiently manage database connection resources
SSL/TLS Support - Secure database connection encryption
CORS Control - Configurable cross-origin request settings
API Key Authentication - Optional security for HTTP endpoints
๐ ๏ธ Comprehensive Toolset
execute_query- Execute SQL queries and updateslist_tables- List all tables in the databasedescribe_table- View table structure and column informationtest_connection- Test a specific database connectionlist_connections- List all available database connectionsget_connection_info- Retrieve detailed connection informationtest_all_connections- Batch test all database connections
Related MCP server: MySQL MCP Server
๐ Quick Start
1. Install Dependencies
# Install Node.js dependencies
npm install
# Build the project
npm run build2. Configure Databases
Create a .env file:
Single Database Configuration (Backward Compatible)
# Basic Database Settings
DB_HOST=localhost
DB_PORT=3306
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=your_database
DB_SSL=false
# Connection Pool Settings
DB_CONNECTION_LIMIT=10
DB_TIMEOUT=60000
# MCP Server Settings
MCP_TRANSPORT_MODE=stdioMulti-Database Configuration (Recommended)
# Define connection list
DB_CONNECTIONS=main,test,analytics
DEFAULT_DB=main
# Main Database Connection
DB_MAIN_HOST=localhost
DB_MAIN_PORT=3306
DB_MAIN_USER=main_user
DB_MAIN_PASSWORD="complex@pass#123"
DB_MAIN_NAME=main_database
DB_MAIN_SSL=false
# Test Database Connection
DB_TEST_HOST=test-server.com
DB_TEST_PORT=3306
DB_TEST_USER=test_user
DB_TEST_PASSWORD="test$pass@456"
DB_TEST_NAME=test_database
DB_TEST_SSL=true
# Analytics Database Connection
DB_ANALYTICS_HOST=analytics.company.com
DB_ANALYTICS_PORT=3306
DB_ANALYTICS_USER=analytics_user
DB_ANALYTICS_PASSWORD="analytics#789$"
DB_ANALYTICS_NAME=analytics_db
DB_ANALYTICS_SSL=true
# Connection Pool Settings
DB_CONNECTION_LIMIT=10
DB_TIMEOUT=60000Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Work with your database from AI tools: ask, export, approved changes, and scheduled jobs.
Read, write, and combine connected apps and databases with shared code and per-person permissions.
Query your databases and build dashboards, Streamlit apps and reports your team logs in to.
Guard AI agents' PostgreSQL/MySQL access via MCP: SQL audit, auth, masking, write approval
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides secure, read-only access to MariaDB/MySQL databases, allowing users to list databases, explore table schemas, and execute SQL queries with built-in security measures.44MIT
- FlicenseNot gradedqualityDmaintenanceEnables comprehensive MySQL database operations including cross-database queries, performance analysis, health monitoring, and AI-assisted database management with role-based access control.-
- AlicenseNot gradedqualityDmaintenanceEnables natural language database operations on MySQL databases with AI integration, supporting CRUD operations, schema inspection, and audit logging with built-in security features including SQL injection protection and permission controls.MIT
- AlicenseAqualityDmaintenanceEnables comprehensive MySQL database operations including CRUD, performance optimization, health monitoring, index analysis, lock detection, and SQL execution plan analysis with role-based permission control.9MIT