MariaDB

by abel9851

19 stars
2.3k downloads
Not rated
GitHub

About

Bridges Claude with MariaDB databases for read-only SQL query execution, enabling data exploration through formatted table results while enforcing safety restrictions on permitted operations.

Details

Author
abel9851
Repository
abel9851/mcp-server-mariadb
GitHub stars
19
Downloads
2,343
License
MIT License
Categories
Database, Other, Productivity, Developer Tools, Design, AI, Search, API, Security, Knowledge Base, Infrastructure

- Expose schema list in database as a resource.
- Execute read-only SQL queries via query_database tool.
- Secured – only read‑only operations are permitted.
- Supports connection to any MariaDB instance.
- MIT licensed.

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
    Command (node, npx, python, etc.) /PATH/TO/uvx
    Arguments
    • Argument 1 mcp-server-mariadb
    • Argument 2 --host
    • Argument 3 $${DB_HOST}
    • Argument 4 --port
    • Argument 5 $${DB_PORT}
    • Argument 6 --user
    • Argument 7 $${DB_USER}
    • Argument 8 --password
    • Argument 9 $${DB_PASSWORD}
    • Argument 10 --database
    • Argument 11 $${DB_NAME}

    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

- mac
- when install mariadb,
maybe raise os error below.
you can resolve by installing mariadb-connector-c.

```bash

query_database

Execute read-only operations against MariDB.

- query_database
- Execute read-only operations against MariDB

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mariadb": {
            "cwd": null,
            "env": {},
            "args": [
                "mcp-server-mariadb",
                "--host",
                "$${DB_HOST}",
                "--port",
                "$${DB_PORT}",
                "--user",
                "$${DB_USER}",
                "--password",
                "$${DB_PASSWORD}",
                "--database",
                "$${DB_NAME}"
            ],
            "shell": false,
            "command": "/PATH/TO/uvx"
        }
    }
}

Linux

{
    "cwd": null,
    "env": [],
    "args": [
        "mcp-server-mariadb",
        "--host",
        "$${DB_HOST}",
        "--port",
        "$${DB_PORT}",
        "--user",
        "$${DB_USER}",
        "--password",
        "$${DB_PASSWORD}",
        "--database",
        "$${DB_NAME}"
    ],
    "shell": false,
    "command": "/PATH/TO/uvx"
}

Macos

{
    "cwd": null,
    "env": [],
    "args": [
        "mcp-server-mariadb",
        "--host",
        "$${DB_HOST}",
        "--port",
        "$${DB_PORT}",
        "--user",
        "$${DB_USER}",
        "--password",
        "$${DB_PASSWORD}",
        "--database",
        "$${DB_NAME}"
    ],
    "shell": false,
    "command": "/PATH/TO/uvx"
}

Windows

{
    "cwd": null,
    "env": [],
    "args": [
        "mcp-server-mariadb",
        "--host",
        "$${DB_HOST}",
        "--port",
        "$${DB_PORT}",
        "--user",
        "$${DB_USER}",
        "--password",
        "$${DB_PASSWORD}",
        "--database",
        "$${DB_NAME}"
    ],
    "shell": false,
    "command": "/PATH/TO/uvx"
}

An MCP server implementation for retrieving data from mariadb

- query_database

- Execute read-only operations against MariDB

- mac

- when install mariadb, maybe raise os error below. you can resolve by installing mariadb-connector-c.

OSError: mariadb_config not found. This error typically indicates that MariaDB Connector/C, a dependency which must be preinstalled, is not found. If MariaDB Connector/C is not installed, see installation instructions If MariaDB Connector/C is installed, either set the environment variable MARIADB_CONFIG or edit the configuration file 'site.cfg' to set the 'mariadb_config' option to the file location of the mariadb_config utility.

- executebrew install mariadb-connector-c
- executeecho 'export PATH="/opt/homebrew/opt/mariadb-connector-c/bin:$PATH"' >> ~/.bashrc
- set environment variableexport MARIADB_CONFIG=$(brew --prefix mariadb-connector-c)/bin/mariadb_config
- executeuv add mariadbagain.

- MacOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json

{ "mcpServers": { "mcp_server_mariadb": { "command": "/PATH/TO/uvx" "args": [ "mcp-server-mariadb", "--host", "${DB_HOST}", "--port", "${DB_PORT}", "--user", "${DB_USER}", "--password", "${DB_PASSWORD}", "--database", "${DB_NAME}" ] } } }

Note: Replace these placeholders with actual paths:

- /PATH/TO/uvx: Full path to uvx executable

{ "mcpServers": { "mcp_server_mariadb": { "command": "/PATH/TO/uv", "args": [ "--directory", "/YOUR/SOURCE/PATH/mcp-server-mariadb/src/mcp_server_mariadb", "run", "server.py" ], "env": { "MARIADB_HOST": "127.0.0.1", "MARIADB_USER": "USER", "MARIADB_PASSWORD": "PASSWORD", "MARIADB_DATABASE": "DATABASE", "MARIADB_PORT": "3306" } } } }

Note: Replace these placeholders with actual paths:

- /PATH/TO/uv: Full path to UV executable
- /YOUR/SOURCE/PATH/mcp-server-mariadb/src/mcp_server_mariadb: Path to server source code

This mcp server is licensed under the MIT license. please see the LICENSE file in the repository.

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.

Access and manage MariaDB or MySQL databases using an MCP server.

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

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.