Skip to main content

MCP Server for MariaDB

Project description

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
Add this configuration to enable published servers
{
    "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
Add this configuration to enable development/unpublished servers
{
    "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

License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_abel9851_mcp_server_mariadb-0.1.2.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_abel9851_mcp_server_mariadb-0.1.2.tar.gz.

File metadata

  • Download URL: iflow_mcp_abel9851_mcp_server_mariadb-0.1.2.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_abel9851_mcp_server_mariadb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 247492fe9abb969be22e27ecb94b2986454b2f8f357c37ad6da9a8c2f9e05fef
MD5 140324cf5c75c70941cb35ec00d57560
BLAKE2b-256 785896e80399f21cfde202d6ffceba6813d14aecca1f860fdb4b7d5a7b1660fb

See more details on using hashes here.

File details

Details for the file iflow_mcp_abel9851_mcp_server_mariadb-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_abel9851_mcp_server_mariadb-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_abel9851_mcp_server_mariadb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18de7c1ba804cc894c87539f1d26142863d18dad2ea69e6b27cc03aff66b6ef3
MD5 b9ac8a8e7f27f6a5b7fe260e9233de4c
BLAKE2b-256 a083f3dd45f76a80637082e451bb9595d06d79803faf6faa78ba24081c2e16c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page