
MSSQL LocalDB MCP
io.github.hermessilva由 GitHub 帳號 hermessilva 發布v0.1.0更新於 Oct 24, 2026
MCP server for SQL Server Express LocalDB on Windows: manage instances, run T-SQL, discover DBs
概覽
一個僅限 Windows 的 MCP 伺服器,讓助理控制 SQL Server Express LocalDB 執行個體:建立與管理執行個體、執行 T-SQL、附加專案中的資料庫檔案並檢視結構。
- 可以做什麼
- 在本機建立、啟動、停止與管理 SQL Server Express LocalDB 執行個體。對 LocalDB 資料庫執行 T-SQL 指令碼與查詢,可設定逾時與傳回列數上限。在允許的專案資料夾中尋找散落的資料庫檔案並附加。檢視資料庫結構與架構。
- 適用情境
- 適合在 Windows 上使用 SQL Server Express LocalDB 的開發者,希望助理不必開啟 SSMS 就能建立執行個體、附加專案資料庫檔案、執行指令碼與檢視結構。不適用於遠端伺服器或多資料庫環境。
- 執行需求
- Windows,且已安裝 SQL Server Express LocalDB,SqlLocalDB.exe 位於 PATH 中。需要相容的 MCP 用戶端。需在 %APPDATA% 下提供 config.toml 並至少設定一個允許掃描的根目錄,否則資料夾掃描會拒絕執行。以打包的 Windows 二進位檔散布;從原始碼建置需要 Rust。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MSSQL LocalDB MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mssql-localdb-mcp
Rust MCP server for SQL Server Express LocalDB on Windows. Gives AI agents (Claude Desktop, Claude Code, and any MCP client) full control over LocalDB instances: create/manage instances, run any T-SQL script, find loose database files in project folders and attach them, introspect schema.
Status: MVP (Phase 1) functional and tested against real LocalDB — see
docs/PLANNING.mdfor the roadmap and current phase.
Why
Existing MCP tools for SQL Server assume an already-configured remote server and require an external runtime (Python, .NET, Node). This project is:
- Single Rust binary, no external runtime, no Docker.
- LocalDB-focused: local dev workflow — find a loose
.mdfin a project folder, attach it, run a script, no need to open SSMS. - Windows-only by design, not a generic multi-database abstraction.
Requirements
- Windows with SQL Server Express LocalDB installed (
SqlLocalDB.exeonPATH). - A compatible MCP client (Claude Desktop, Claude Code, etc.).
Installation
Via MCP Registry
Published on the official MCP Registry as io.github.hermessilva/mssql-localdb-mcp. Install through any MCP client that supports the registry.
Via VS Code extension
The vscode-extension/ directory packages the server as a VS Code extension that registers it automatically through the MCP provider API (VS Code 1.101+), with the Windows binary bundled — nothing to download or configure by hand. Build the .vsix locally with:
The extension has its own version line, independent from Cargo.toml — the crate version is what
the vX.Y.Z tag and the MCP Registry publish.
Via Claude Code plugin
The claude-plugin/ directory in this repo is a self-contained Claude Code plugin (bundles the Windows binary directly, no separate download). Load it directly with:
Submitted to the claude-community marketplace for review — once approved, install it with claude plugin marketplace add anthropics/claude-plugins-community followed by claude plugin install mssql-localdb-mcp@claude-community.
From source
Requires Rust and LocalDB installed.
Binary at target\release\mssql-localdb-mcp.exe.
Configure config.toml
db_scan_folder requires at least one explicitly allowed root — without it, the tool refuses to run. Create %APPDATA%\mssql-localdb-mcp\config.toml:
Configure in your MCP client
Claude Desktop / Claude Code (claude_desktop_config.json or equivalent):
Claude Code via CLI:
After that, the agent has access to the localdb_*, sql_*, and db_* tools — see docs/MCP_SPEC.md for the full list.
Documentation
docs/PLANNING.md— roadmap, phases, scope of each milestone.docs/ARCHITECTURE.md— modules, technical decisions, data flow.docs/MCP_SPEC.md— exact contract of every tool/resource/prompt exposed.docs/SECURITY.md— threat model and guardrails.CLAUDE.md— guide for AI agents working in this repository.CONTRIBUTING.md— how to contribute.CHANGELOG.md— change history.
Security — read before using
- Windows Integrated Authentication only (no SQL Auth).
- Every destructive action (DROP, TRUNCATE, DELETE, ALTER, etc.) requires explicit confirmation (
confirm: true) — never executes silently. - Database discovery (
db_scan_folder) only scans folders explicitly allowed inconfig.toml(allowlist). - Full detail in
docs/SECURITY.md.
License
MIT.
來源:README.md,提交 c2a1185
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分