Database Mcp Sqlite

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

MCP server for SQLite databases. Read-only by default, row caps, statement timeouts.

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

概覽

AI 產生的概覽

本機 MCP 伺服器,透過 execute_sql 與 search_objects 兩個工具,讓 AI 助理以受保護、結構化的方式存取 SQLite 資料庫檔案。

可以做什麼
對已設定的 SQLite 資料庫檔案執行 SQL 語句,預設啟用唯讀模式、資料列上限與語句逾時(execute_sql)。逐步檢視資料庫結構:不帶參數時列出資料表,指定表名時取得欄位、索引與外鍵(search_objects)。連線資訊在啟動時透過命令列參數、YAML 設定檔或環境變數設定,不接受透過工具呼叫傳入。
適用情境
適合需要讓助理查詢或檢視本機 SQLite 資料庫的情境,例如回答資料庫中資料的問題或了解資料表結構,同時不希望給予不受限制的寫入權限。
執行需求
以 stdio 方式在本機執行,可用 npm 套件、搭配 uvx 執行的 PyPI 套件,或以 cargo 安裝的 Rust 執行檔。需要設定 SQLITE_PATH 環境變數或以 --dsn 參數指向 SQLite 資料庫檔案。未宣告任何身分驗證。
安裝前請注意
唯讀模式是預設設定,但僅是防護措施而非絕對保證;允許寫入前請先檢查設定。助理可以讀取資料庫檔案中的全部內容,因此只應指向你願意在對話中揭露的資料庫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Database Mcp Sqlite,將其新增到工作區。
  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 分