
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 分