
Database Mcp Mariadb
io.github.arifulislamat由 GitHub 账号 arifulislamat 发布v0.5.0更新于 Oct 24, 2026
MCP server for MariaDB. Read-only by default, row caps, timeouts, secrets never logged.
发布方自己的服务:MariaDB Documentation
概览
本地 MCP 服务器,通过两个工具让 AI 助手以默认只读、带防护的方式访问 MariaDB 数据库。
- 可以做什么
- 对 MariaDB 数据库执行 SQL 语句,默认启用只读模式、行数上限和语句超时
- 逐步披露表结构:先列出数据表,再按表名获取字段、索引和外键
- 通过启动参数、YAML 配置文件或环境变量配置连接信息
- 适用场景
- 适合在开发或分析过程中需要让助手查看或查询 MariaDB 数据库,并且希望工具面精简、带有安全防护而非完全放开 SQL 权限的场景。
- 运行要求
- 作为本地进程运行,可从 npm、PyPI(通过 uvx)或 crates.io 安装,因此需要相应的 Node、Python 或 Rust 运行环境。需要可访问的 MariaDB 服务器,以及环境变量 MARIADB_HOST、MARIADB_DATABASE、MARIADB_USER,并提供 MARIADB_PASSWORD 或密码文件。需要网络访问数据库。
安装
在 SourceWeft 中
- 打开 控制台中的 Database Mcp Mariadb,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
database-mcp
[CI] [License: MIT] [npm] [PyPI] [crates.io] [Node >= 22]
MCP servers that give AI clients safe, structured access to SQL databases.
One installable package per database engine, in TypeScript (npm), Python
(PyPI), and Rust (crates.io). Every package exposes the same minimal
two-tool surface, execute_sql and search_objects, with guardrails on by
default: read-only mode, row caps, and statement timeouts.
Packages
All three lines are published and pass the same language-agnostic conformance suite against real databases in CI, so behavior is identical regardless of language. Every engine is also listed on the MCP Registry with all three install options: npm, PyPI, and cargo.
Rust crates are named database-mcp-rs-<engine> because the plain names are
taken on crates.io; the command each one installs is still
database-mcp-<engine>. Go is planned.
Design principles
- Two tools, no more. A tiny tool surface keeps the model's context window
clean.
search_objectsprogressively discloses schema: call it with no arguments to list tables, with a table name to get columns, indexes, and foreign keys. - Safe by default. Read-only mode is enforced in two layers: a conservative SQL guard, plus a session-level read-only setting in the database itself. Rows are capped (default 1000) and statements time out (default 30s).
- Configured at launch, never via chat. Connection details come from flags, a YAML config file, or environment variables. Credentials are never accepted through a tool call.
- Secrets never appear in logs. Passwords live in non-printable secret types, DSNs are sanitized before logging, and a redaction filter guards the log boundary.
Quick start
Pick your engine's package; each README has the full config surface. SQLite via npm:
Or via PyPI: use "command": "uvx" and
"args": ["database-mcp-sqlite", "--dsn", "/absolute/path/to/database.db"].
Or as a native binary, with no Node or Python runtime: run
cargo install database-mcp-rs-sqlite, then use
"command": "database-mcp-sqlite" with the same args minus the package
name.
Flags, environment variables, and YAML config are identical across all three lines.
Networked engines take credentials from the environment (MYSQL_*,
MARIADB_*, POSTGRES_*/DATABASE_URL, LIBSQL_URL/LIBSQL_AUTH_TOKEN),
*_FILE mounted secrets, or a YAML file via --config. Never from a chat
prompt.
Contributing
See CONTRIBUTING.md. The short version: the conformance
suite is the definition of done. A change is mergeable only when
conformance/run.mjs passes against every affected server.
License
来源:README.md,提交 775af94
工具
0版本历史
2- v0.5.0最新Oct 17, 2026
- v0.4.2Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
