bretoreta/mariadb-mcp-server
If you are the rightful owner of mariadb-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This MCP server provides secure and read-only access to MariaDB / MySQL databases, allowing users to list databases, tables, describe schemas, and execute SQL queries.
The MariaDB / MySQL Database Access MCP Server is designed to facilitate secure and efficient access to MariaDB and MySQL databases. It offers a read-only interface, ensuring that users can perform essential database operations without risking data integrity. The server supports listing available databases, tables within those databases, and describing table schemas. Additionally, it allows the execution of SQL queries, with built-in security features to prevent SQL injection and unauthorized data modifications. The server is equipped with a query timeout feature to prevent resource exhaustion from long-running queries and a row limit to control the volume of data returned. Installation is straightforward, with options to build from source and configure necessary environment variables. The server is compatible with MCP settings, making it easy to integrate into existing systems.
Features
- Read-only access by default, ensuring data integrity
- Query validation to prevent SQL injection
- Query timeout to manage resource consumption
- Row limit to control data volume
- Easy integration with MCP settings
Usages
usage with local integration
{ "mcpServers": { "mariadb": { "command": "node", "args": ["/path/to/mariadb-mcp-server/dist/index.js"], "env": { "MARIADB_HOST": "your-host", "MARIADB_PORT": "3306", "MARIADB_USER": "your-user", "MARIADB_PASSWORD": "your-password", "MARIADB_DATABASE": "your-default-database", "MARIADB_ALLOW_INSERT": "false", "MARIADB_ALLOW_UPDATE": "false", "MARIADB_ALLOW_DELETE": "false", "MARIADB_TIMEOUT_MS": "10000", "MARIADB_ROW_LIMIT": "1000" }, "disabled": false, "autoApprove": [] } } }
Tools
list_databases
Lists all accessible databases on the MariaDB / MySQL server.
list_tables
Lists all tables in a specified database.
describe_table
Shows the schema for a specific table.
execute_query
Executes a SQL query.