Skip to main content

MCP Server for MariaDB

Project description

mariadb-mcp-server

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 development/unpublished servers:

{
    "mcpServers": {
        "mariadb_mcp_server": {
            "command": "/PATH/TO/uv",
            "args": [
                "--directory",
                "/YOUR/SOURCE/PATH/mariadb-mcp-server/src/mariadb_mcp_server",
                "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/mariadb-mcp-server/src/mariadb_mcp_server: 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

mariadb_mcp_server-0.1.1.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

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

mariadb_mcp_server-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file mariadb_mcp_server-0.1.1.tar.gz.

File metadata

  • Download URL: mariadb_mcp_server-0.1.1.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.30

File hashes

Hashes for mariadb_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bb2a001e783a2b6aeb1a09669cbd763ffa821cf78b43ff6093ad6c280df1664c
MD5 0ad14e2e6358ac11531ab1a8fa6a7fa3
BLAKE2b-256 848bf65a39514cfcd56d618e0a36b11d9a13638f0014d371f4df95ecbe8a1012

See more details on using hashes here.

File details

Details for the file mariadb_mcp_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mariadb_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a6de11a0b27639884a6f7d88191bd7682e999fe85960d050f73228bde442013
MD5 f5b4bc2a0be644cca493b490bb68d48e
BLAKE2b-256 bb52645c35d2e3047f19c22388b136a53ee122a8caec24a6102d217f17f23db5

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