MariaDB / MySQL Database Access MCP Server
About
Provides access to MariaDB and MySQL databases for querying and data manipulation.
Details
- License
- MIT license
Explore
- 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
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MariaDB / MySQL Database Access MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
npm install -g mariadb-mcp-server
npm install mariadb-mcp-server
npm install
npm 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
This script creates a test database, table, and sample data:
bash
export MARIADB_HOST=localhost
export MARIADB_PORT=3306
export MARIADB_USER=your_username
export MARIADB_PASSWORD=your_password
export MARIADB_ALLOW_INSERT: false
export MARIADB_ALLOW_UPDATE: false
export MARIADB_ALLOW_DELETE: false
export MARIADB_TIMEOUT_MS=10000
export MARIADB_ROW_LIMIT=1000
npm run test:setup
```
list_databases
List all accessible databases on the MariaDB server
list_tables
List all tables in a specified database
describe_table
Show the schema for a specific table
execute_query
Execute a SQL query
"server_name": "mariadb" or "server_name": "mysql"
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mariadb / mysql database access mcp server": {
"mariadb": {
"command": "npx",
"args": [
"mariadb-mcp-server"
],
"env": {
"MARIADB_HOST": "",
"MARIADB_PORT": "",
"MARIADB_USER": "",
"MARIADB_PASSWORD": "",
"MARIADB_DATABASE": "",
"MARIADB_ALLOW_INSERT": "",
"MARIADB_ALLOW_UPDATE": "",
"MARIADB_ALLOW_DELETE": "",
"MARIADB_TIMEOUT_MS": "",
"MARIADB_ROW_LIMIT": ""
}
}
}
}
}
McpServers
{
"mariadb": {
"command": "npx",
"args": [
"mariadb-mcp-server"
],
"env": {
"MARIADB_HOST": "",
"MARIADB_PORT": "",
"MARIADB_USER": "",
"MARIADB_PASSWORD": "",
"MARIADB_DATABASE": "",
"MARIADB_ALLOW_INSERT": "",
"MARIADB_ALLOW_UPDATE": "",
"MARIADB_ALLOW_DELETE": "",
"MARIADB_TIMEOUT_MS": "",
"MARIADB_ROW_LIMIT": ""
}
}
}
MCP is certified by MCP Review
https://mcpreview.com/mcp-servers/rjsalgado/mariadb-mcp-server
This MCP server provides access to MariaDB / MySQL databases.
It allows you to:
- List available databases
- List tables in a database
- Describe table schemas
- Execute SQL queries
Security Features
- 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 returnInstallation
Option 1: Install from NPM (Recommended)
```bashSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



