AM

abel9851/mcp-server-mariadb

开发工具
20 stars 0 forks 质量 55 趋势 55

An mcp server that provides read-only access to MariaDB.

概览

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. 1. execute brew install mariadb-connector-c 2. execute echo 'export PATH="/opt/homebrew/opt/mariadb-connector-c/bin:$PATH"' >> ~/.bashrc 3. set environment variable export MARIADB_CONFIG=$(brew --prefix mariadb-connector-c)/bin/mariadb_config 4. execute uv add mariadb again. - : ~/Library/Application Support/Claude/claude_desktop_config.json - : %APPDATA%\Claude\claude_desktop_config.json Add this configuration to enable published servers : Replace these placeholders with actual paths: - /PATH/TO/uvx: Full path to uvx executable

README

mcp-server-mariadb

An MCP server implementation for retrieving data from mariadb

Features

Resources

Expose schema list in database

Tools

  • query_database
    • Execute read-only operations against MariDB

dependency

install mariadb

  • 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.

  1. execute brew install mariadb-connector-c
  2. execute echo 'export PATH="/opt/homebrew/opt/mariadb-connector-c/bin:$PATH"' >> ~/.bashrc
  3. set environment variable export MARIADB_CONFIG=$(brew --prefix mariadb-connector-c)/bin/mariadb_config
  4. execute uv add mariadb again.

Usage with Claude Desktop

Configuration File

Paths to Claude Desktop config file:

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

License

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

View this README on GitHub

安装

This server does not publish a one-line install command.

Open the repository installation guide

配置

{ "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}" ] } } }