Database Mcp Libsql

io.github.arifulislamat由 GitHub 帳號 arifulislamat 發布v0.5.0更新於 Oct 24, 2026

MCP server for libSQL/Turso, local or remote. Read-only by default, row caps, timeouts.

已驗證STDIO僅桌面資料庫開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,透過兩個工具讓 AI 助理以受保護的方式存取本機或遠端 libSQL/Turso 資料庫。

可以做什麼
  • 透過 execute_sql 對本機檔案或遠端 libSQL/Turso 資料庫執行 SQL 語句
  • 透過 search_objects 探索結構:先列出資料表,再查看某張資料表的欄位、索引與外鍵
  • 預設啟用防護措施:唯讀模式、資料列上限(預設 1000)與語句逾時(預設 30 秒)
  • 連線資訊於啟動時透過命令列參數、YAML 設定檔或環境變數提供
適用情境
當助理需要查詢或檢視 libSQL/Turso 資料庫,又不希望暴露龐大的 SQL 工具集,並希望預設唯讀、結果集受限時適用。適合結構探索與臨時唯讀查詢,而非完整的資料庫管理。
執行需求
以本機 stdio 程序執行;可透過 npm(@database-mcp/libsql)、PyPI(database-mcp-libsql,以 uvx 執行)或 Rust crate 二進位檔安裝。需要 LIBSQL_URL 提供資料庫位址(檔案路徑或 libsql:// 遠端位址),遠端資料庫另需 LIBSQL_AUTH_TOKEN 驗證權杖。連線資訊也可來自命令列參數或 YAML 設定檔。
安裝前請注意
伺服器持有資料庫憑證:LIBSQL_AUTH_TOKEN 屬於機密,應透過環境變數或掛載的密鑰檔案提供,不要透過聊天提示傳入。唯讀模式雖為預設,但可被設定變更,指向正式環境資料前請確認啟動參數。查詢結果與結構資訊會回傳給 AI 用戶端。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Database Mcp Libsql,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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_objects progressively 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:

json
{  "mcpServers": {    "sqlite": {      "command": "npx",      "args": ["-y", "@database-mcp/sqlite", "--dsn", "/absolute/path/to/database.db"]    }  }}

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

MIT

來源:README.md,提交 775af94

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.5.0最新Oct 17, 2026
  2. v0.4.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分