mariadb-mcp-server

Mariadb MCP Server

MariaDB and MySQL users can inspect databases, examine table structures, and run SQL through MCP. The project supports database exploration with read-only defaults, query validation, timeouts, and result limits.

Server facts

mariadb-mcp-server

Project

Author
rjsalgado
License
MIT
Category
Databases

Tech

Runtime / language
node
Transports
stdio
Remote available
No
Authentication
Not specified

Activity

GitHub stars
14
Last commit
Data as of

Overview

Database exploration in MariaDB and MySQL follows a discovery-to-query workflow through this project's MCP tools. Start with list_databases to discover accessible databases, then use list_tables to inspect a chosen database's tables. For structural details, describe_table accepts a table name and returns its schema. The execute_query tool takes SQL for execution. Database selection is optional for table listing, schema inspection, and query execution; those operations can instead use the configured default. This supports users who need to examine database contents and structure through an MCP client.

The default query policy permits SELECT, SHOW, DESCRIBE, and EXPLAIN statements. Documented controls include validation against SQL injection and prohibited modifications, along with query timeouts and limits on returned rows. Connection settings come from environment variables covering the host, port, username, password, and optional default database. Installation is available through npm or a source build. The Node-based server communicates over stdio, and the repository includes scripts for preparing sample database data and exercising its tools. The project uses the MIT license.

mariadb-mcp-server setup notes

  • mariadb-mcp-server records stdio only; confirm a network transport upstream before planning remote access.

Related MCP servers