https://github.com/abel9851/mcp-server-mariadb
An mcp server that provides read-only access to MariaDB.
https://github.com/abel9851/mcp-server-mariadb
mariadb mcp mcp-server model-context-protocol
Last synced: 3 months ago
JSON representation
An mcp server that provides read-only access to MariaDB.
- Host: GitHub
- URL: https://github.com/abel9851/mcp-server-mariadb
- Owner: abel9851
- License: mit
- Created: 2025-02-18T15:25:15.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-23T17:05:39.000Z (4 months ago)
- Last Synced: 2025-02-23T18:21:12.868Z (4 months ago)
- Topics: mariadb, mcp, mcp-server, model-context-protocol
- Language: Python
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - MariaDB - An mcp server that provides read-only access to MariaDB. (Table of Contents / Databases)
- awesome-mcp-servers - MariaDB - An mcp server that provides read-only access to MariaDB. (Table of Contents / Databases)
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.```bash
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:
```json
{
"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/mariadb-mcp-server/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.