mcp-mariadb
Allows executing SQL queries on a MariaDB database, returning rows and row count.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-mariadbList the first 10 users"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.txtConfiguration
Create a YAML file such as:
mariadb:
host: localhost
database: app
username: app
password: secretSet the environment variable to point at it:
export MCP_MARIADB_CONFIG=/path/to/config.yamlIf the environment variable is not set, the server will look for:
~/.mcp-mariadb/config.yamlRunning the server
python server.pyTool 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"
}This server cannot be installed
Maintenance
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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