
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 分
