MariaDB / MySQL
About
Access and manage MariaDB or MySQL databases using an MCP server.
Details
- Author
- bretoreta
- Categories
- Database, Other
Jump to
Setup
Install MariaDB / MySQL in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/bretoreta/mariadb-mcp-server
Follow the installation instructions in the repository README, then restart your MCP client.
MariaDB / MySQL Database Access MCP Server
This MCP server provides access to MariaDB / MySQL databases.
- List available databases
- List tables in a database
- Describe table schemas
- Execute SQL queries
- Read-only access Default: SELECT, SHOW, DESCRIBE, and EXPLAIN
- Query validation: Prevents SQL injection and blocks any data modification attempts
- Query timeout: Prevents long-running queries from consuming resources
- Row limit: Prevents excessive data return
# Clone the repository git clone https://github.com/bretoreta/mariadb-mcp-server.git cd mariadb-mcp-server # Install dependencies and build pnpm install pnpm run build
The server requires the following environment variables:
- MARIADB_HOST: Database server hostname
- MARIADB_PORT: Database server port (default: 3306)
- MARIADB_USER: Database username
- MARIADB_PASSWORD: Database password
- MARIADB_DATABASE: Default database name (optional)
- MARIADB_ALLOW_INSERT: false
- MARIADB_ALLOW_UPDATE: false
- MARIADB_ALLOW_DELETE: false
- MARIADB_TIMEOUT_MS: 10000
- MARIADB_ROW_LIMIT: 1000
Add the following configuration to your MCP settings file:
{ "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": [] } } }
Lists all accessible databases on the MariaDB / MySQL server.Parameters: None
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "sessionId": "session_id from /sse call", "name": "list_databases" } }
Lists all tables in a specified database.
- database(optional): Database name (uses default if not specified)
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "sessionId": "session_id from /sse call", "name": "list_tables", "database": "my_database_name" } }
- database(optional): Database name (uses default if not specified)
- table(required): Table name
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "sessionId": "session_id from /sse call", "name": "describe_table", "database": "my_database_name", "table": "my_table_name" } }
- query(required): SQL query
- database(optional): Database name (uses default if not specified)
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "sessionId": "session_id from /sse call", "name": "execute_query", "query": "SELECT * FROM my_table LIMIT 10" } }
The server automatically tests MariaDB to verify functionality with your MariaDB setup:
- Check the server logs for error messages
- Verify your MariaDB credentials and connection details
- Ensure your MariaDB user has appropriate permissions
- Check that your query is read-only and properly formatted
Inspirationhttps://github.com/rjsalgado/mariadb-mcp-server
This project is licensed under the MIT License - see theLICENSEfile for details.
Multi-database agent access (PostgreSQL, SQLite, MySQL, Oracle, SQL Server) with batch queries, pre-configured connections, and SQLGlot-enforced read-only safety
A read-only MCP server for MySQL, enabling LLMs to query live data using the CData JDBC Driver.
Database MCP server for MySQL, MariaDB, PostgreSQL & SQLite
A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite
A Model Context Protocol (MCP) server that provides multi-database query execution capabilities with support for SQLite, PostgreSQL, and MySQL databases. Includes a built-in Web UI for managing database connections.
Allows Claude AI to interact directly with MySQL databases.
Update various databases (PostgreSQL, MySQL, MongoDB, SQLite) using data from CSV and Excel files.
Enables AI assistants to interact with various databases through JDBC connections.
An MCP server for retrieving data from a MariaDB database.
Provides access to MariaDB and MySQL databases for querying and data manipulation.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





