MariaDB / MySQL Database Access MCP Server
by rjsalgado
This MCP server provides access to MariaDB / MySQL databases, allowing you to list databases, tables, schemas, and execute SQL queries. It prioritizes security with read-only access, query validation, timeout, and row limits.
Last updated: N/A
What is MariaDB / MySQL Database Access MCP Server?
The MariaDB / MySQL Database Access MCP Server is a tool that enables controlled and secure access to MariaDB and MySQL databases. It acts as a mediator, providing a set of tools to interact with the database while enforcing security policies.
How to use MariaDB / MySQL Database Access MCP Server?
- Install the server via NPM or by building from source.
- Configure environment variables for database connection (host, port, user, password, database).
- Add the server configuration to your MCP settings file, specifying the command, arguments, and environment variables.
- Use the available tools (list_databases, list_tables, describe_table, execute_query) with the appropriate JSON format to interact with the database.
Key features of MariaDB / MySQL Database Access MCP Server
Read-only access by default
SQL injection prevention
Query timeout
Row limit
Lists available databases
Lists tables in a database
Describes table schemas
Executes SQL queries
Use cases of MariaDB / MySQL Database Access MCP Server
Providing read-only access to database information for reporting purposes.
Allowing controlled data exploration without the risk of data modification.
Integrating database queries into automated workflows with security constraints.
Enabling database schema discovery for application development.
Creating a secure interface for querying databases from external applications.
FAQ from MariaDB / MySQL Database Access MCP Server
What databases are supported?
What databases are supported?
MariaDB and MySQL are supported.
What type of access is allowed by default?
What type of access is allowed by default?
Read-only access is enabled by default, allowing SELECT, SHOW, DESCRIBE, and EXPLAIN queries.
How can I prevent SQL injection?
How can I prevent SQL injection?
The server includes query validation to prevent SQL injection attacks.
Can I limit the execution time of queries?
Can I limit the execution time of queries?
Yes, you can configure a query timeout to prevent long-running queries from consuming resources.
Can I limit the number of rows returned by a query?
Can I limit the number of rows returned by a query?
Yes, you can set a row limit to prevent excessive data return.