MariaDB / MySQL Database Access MCP Server

by rjsalgado

14 stars
308 downloads
Not rated
GitHub

About

Provides access to MariaDB and MySQL databases for querying and data manipulation.

Details

Author
rjsalgado
GitHub stars
14
Downloads
308
Categories
Database, Other

- Read-only access by default (SELECT, SHOW, DESCRIBE, EXPLAIN)
- SQL injection prevention through query validation
- Query timeout to prevent resource exhaustion
- Configurable row limit to cap returned data

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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MariaDB / MySQL Database Access MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the server globally or locally via npm (npm install -g mariadb-mcp-server) or build from source. Configure environment variables such as MARIADB_HOST, MARIADB_USER, MARIADB_PASSWORD, etc. Add a server entry to your MCP settings JSON with the command npx mariadb-mcp-server and the required environment variables. The server exposes four tools: list_databases, list_tables, describe_table, and execute_query.

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

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": ""
        }
    }
}

MariaDB / MySQL Database Access MCP Server

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 return

Installation

Option 1: Install from NPM (Recommended)

```bash
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.