Feedback

MariaDB / MySQL Database Access MCP Server — by rjsalgado

@rjsalgado Claim

Basic information

Runtime
node
Category
License
MIT
Transports
stdio
Author
rjsalgado
Submitted by
Community
Quality
35
Stars
14

About MariaDB / MySQL Database Access MCP Server

An MCP server that provides access to MariaDB ou MySQL databases.

MariaDB / MySQL Database Access MCP Server is a MCP server in the Databases category listed in the AddMCP.net directory, published by rjsalgado. It exposes 4 tools, including list_databases, list_tables, describe_table, execute_query. Supported transport: stdio. Runtime: node. License: MIT. The repository has 14 GitHub stars. Source code is hosted on github.com.

Setup

{
    "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 — by rjsalgado config

Add this server to your MCP-compatible client using the configuration below.

{
    "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 — by rjsalgado tools

  • list_databases — List all accessible databases on the MariaDB server
    (no parameters)
  • list_tables — List all tables in a specified database
    database:string
  • describe_table — Show the schema for a specific table
    database:string, table:string*
  • execute_query — Execute a SQL query
    query:string*, database:string

Overview

What is MariaDB / MySQL Database Access MCP Server?

This MCP server provides read-only access to MariaDB or MySQL databases, enabling listing of databases, tables, table schemas, and execution of SQL queries through the Model Context Protocol. It is intended for developers and data analysts who need safe, structured database exploration via AI tools.

How to use MariaDB / MySQL Database Access MCP Server?

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.

Key features of MariaDB / MySQL Database Access MCP Server

  • 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

Use cases of MariaDB / MySQL Database Access MCP Server

  • Enumerate databases and tables for data discovery
  • Inspect table schemas without direct SQL client access
  • Execute safe, read-only queries through AI assistants
  • Validate data structure during development or analysis

Frequently asked questions

1 What security features does the server have?

The server enforces read-only access by default, validates queries to prevent SQL injection, applies a configurable query timeout (default 10,000 ms), and limits rows returned (default 1000).

2 Which environment variables are required?

You must set MARIADB_HOST, MARIADB_USER, and MARIADB_PASSWORD. MARIADB_PORT defaults to 3306, and MARIADB_DATABASE is optional. Security variables like MARIADB_ALLOW_INSERT should be set to false for read-only mode.

3 How do I install the server?

Install via npm globally or locally: npm install -g mariadb-mcp-server. Alternatively, clone the repository and run npm install && npm run build to build from source.

4 Can I modify data (INSERT, UPDATE, DELETE) through this server?

No. The server is designed for read-only access. Even if you set the environment variables MARIADB_ALLOW_INSERT, MARIADB_ALLOW_UPDATE, or MARIADB_ALLOW_DELETE to true, the README instructs setting them to false and includes query validation that blocks data modification.

5 What tools does the server provide?

It provides list_databases, list_tables (optional database), describe_table (requires table name), and execute_query (requires query, optional database). All tools are read-only.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬