Skip to main content
Glama
siakhooi

mcp-mariadb

by siakhooi

mcp-mariadb

A simple Model Context Protocol (MCP) server for MariaDB written in Python.

Features

  • Loads MariaDB connection settings from a YAML config file

  • Uses the environment variable MCP_MARIADB_CONFIG when set

  • Defaults to ~/.mcp-mariadb/config.yaml when the environment variable is not set

  • Exposes one tool: executesql

Related MCP server: DBHub

Installation

cd /workspaces/mcp-mariadb
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Configuration

Create a YAML file such as:

mariadb:
  host: localhost
  database: app
  username: app
  password: secret

Set the environment variable to point at it:

export MCP_MARIADB_CONFIG=/path/to/config.yaml

If the environment variable is not set, the server will look for:

~/.mcp-mariadb/config.yaml

Running the server

python server.py

Tool usage

The server exposes a tool named executesql. It accepts a SQL string and returns the rows and row count from the MariaDB query.

Example:

{
  "sql": "SELECT * FROM users LIMIT 10"
}
A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/siakhooi/mcp-mariadb'

If you have feedback or need assistance with the MCP directory API, please join our Discord server