
Staruml Mcp
io.github.ezrabrilliant由 GitHub 帳號 ezrabrilliant 發布v0.2.0更新於 Oct 24, 2026
MCP server for StarUML — generate UML diagrams from AI agents via stdio or HTTP.
概覽
一個本機 MCP 伺服器,讓 AI 助理驅動 StarUML:從 Mermaid 產生 UML 圖、檢視與匯出圖表,並管理專案元素。
- 可以做什麼
- 從 Mermaid 程式碼產生 UML 圖,列出或檢視目前專案中的圖表,包括目前聚焦圖表的中繼資料,並依 ID 將圖表匯出為 PNG。安裝配套的 StarUML 擴充套件後,可列出並執行 StarUML 內建指令,以及新建、開啟、儲存與另存專案。依 ID 或搜尋查詢模型元素,並建立、更新或刪除元素。建立原生型別圖表、切換圖表與關閉圖表。
- 適用情境
- 適合希望助理直接在 StarUML 中建立或編輯 UML 模型的情境,例如把描述轉成 ER 圖或時序圖、匯出圖表圖片,或以指令碼修改 StarUML 專案與元素。
- 執行需求
- 以 npm 套件形式透過 npx 在本機執行,執行助理的機器需要 Node.js 20+。需要 StarUML v7.0.0+ 正在執行,並在 settings.json 中啟用 API 伺服器(連接埠 58321)。完整的 19 個工具需要在 StarUML 內安裝 staruml-mcp-extension 外掛。預設使用 stdio,HTTP 模式監聽連接埠 58323。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Staruml Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
staruml-mcp
[npm version] [npm downloads] [CI] [license] [MCP]
Model Context Protocol (MCP) server for StarUML. Lets AI agents (Claude Code, Cursor, VS Code Copilot, Codex) drive StarUML programmatically — generate UML diagrams from Mermaid, execute any built-in command, CRUD elements, save projects, and more.
How it fits together
- Using only Mermaid-based diagram tools? Install
staruml-mcponly. The 4 built-in tools work. - Want the full 19 tools (project save/open, element CRUD, execute any StarUML command)? Install both.
Prerequisites
- StarUML v7.0.0+ with API Server enabled (see below)
- Node.js 20+ on the machine running the AI agent
- (Optional)
staruml-mcp-extensioninstalled in StarUML — required for 15 of the 19 tools
Enable StarUML API Server
Edit settings.json at:
- Windows:
%APPDATA%\StarUML\settings.json - macOS:
~/Library/Application Support/StarUML/settings.json - Linux:
~/.config/StarUML/settings.json
Add or update:
Restart StarUML.
Verify:
Install & Use
Claude Code (recommended — HTTP transport)
Start the server in a terminal:
Register with Claude Code:
Port
58323is the canonical HTTP port, chosen to sit alongside StarUML's built-in API (58321) andstaruml-mcp-extension(58322). Override with--port <n>if needed.
Restart Claude Code. Ask:
"What StarUML tools do you have?"
Claude Desktop (stdio transport)
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
Restart Claude Desktop.
Cursor / VS Code Copilot / Codex CLI
Point your MCP client at npx -y staruml-mcp (stdio) or http://localhost:58323/mcp (HTTP).
CLI
Tools Exposed
Built-in (always available, port 58321)
Extension tools (require staruml-mcp-extension, port 58322)
To enable extension tools: install staruml-mcp-extension in StarUML (Tools → Extension Manager → Install From URL → https://github.com/ezrabrilliant/staruml-mcp-extension).
Example Prompts
- "Create an ER diagram in StarUML for a POS database: users, menus, transactions with relationships."
- "Generate a sequence diagram for JWT login: frontend → /api/auth/login → AuthService → DB → JWT response."
- "Show me the current diagram in StarUML."
- "Export diagram with ID
xyz123as an image."
Development
Architecture
Acknowledgments
Inspired by staruml/staruml-mcp-server (official stdio-only server by Minkyu Lee, StarUML creator). This project reimplements it with multi-transport support and strict TypeScript.
License
MIT © Ezra Brilliant Konterliem
來源:README.md,提交 3a58d81
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分