
Enterprise Architect
io.github.mm6502由 GitHub 帳號 mm6502 發布v3.0.0更新於 Oct 24, 2026
Read-only search and navigation of Sparx Enterprise Architect .qea model exports
概覽
對 Sparx Enterprise Architect 的 .qea 模型匯出進行唯讀搜尋與導覽,讓助理查詢元素、套件、圖表、連接器與使用案例情境。
- 可以做什麼
- 直接讀取 .qea SQLite 匯出檔,提供 ea_search、ea_get_element、ea_list_elements、ea_get_connectors、ea_get_diagram_elements、ea_get_scenarios、ea_get_package_tree、ea_list_diagrams、ea_resolve、ea_get_schema 與 ea_get_model_info 等工具。支援跨元素、屬性、操作與限制條件的全文搜尋、套件樹導覽、圖表內容檢視、連接器追蹤以及使用案例情境步驟讀取。回應帶有完整性中繼資料(totalMatched、returned、truncated、continuation),讓助理能分辨被截斷的結果與完整結果。
- 適用情境
- 適合在不需要執行 EA 實例的情況下,讓助理探索或回答關於現有 Enterprise Architect 模型的問題,例如搜尋元素、檢視套件結構、閱讀使用案例情境,或追蹤連接器與圖表內容。
- 執行需求
- 需要 Node.js 22 或更新版本(使用內建的 node:sqlite 模組),以及從 Sparx Enterprise Architect 匯出的 .qea 檔案。透過 npx 以 stdio 在本機執行。模型路徑可透過命令列參數、EA_QEA_PATH 環境變數、.env 檔案、已記住的答案或互動式提示提供;EA_MCP_CONFIG_DIR 與 EA_LOCALE 為選用設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Enterprise Architect,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Enterprise Architect MCP Server
[npm version] [Node.js] [License: EUPL-1.2] [Install in VS Code] [Install in VS Code Insiders] [Compound Engineering]
A read-only Model Context Protocol (MCP) server for Sparx Enterprise Architect .qea exports. Gives AI agents access to EA analysis models — search elements, navigate packages, read use case scenarios, and traverse connectors — without a running EA instance.
Works with any MCP client (VS Code / GitHub Copilot, Claude Desktop, Cursor, Windsurf). Reads the .qea SQLite export directly, never writes to it, and every response carries completeness metadata so an agent can tell a truncated answer from a complete one.
Keywords: MCP server · Sparx Enterprise Architect · .qea · UML · use case scenarios · package tree · connectors · diagrams · model search · AI agent tooling
Prerequisites
- Node.js 22+ (uses the built-in
node:sqlitemodule) - A
.qeafile exported from Sparx Enterprise Architect
Installation
VS Code / GitHub Copilot
The quickest route is the Install in VS Code badge at the top of this page. There is nothing to
fill in: the server asks for your .qea path the first time an agent queries the model, and
remembers the answer for next time.
To register it from a terminal instead, which is handier for scripting or a shared setup, use one CLI call:
The \" sequences are for the code shim, which re-parses the argument after PowerShell has
already handed it over — escaping with PowerShell's own backtick, or using --%, still arrives with
the quotes stripped. The single quotes stop PowerShell from touching the string. On bash or zsh the
plain form works instead:
To configure it by hand instead, add to your project's .vscode/mcp.json:
Nothing personal is in that file, so it can be committed as-is and each developer answers the prompt
once on their own machine. If you would rather not be asked at all, name the path up front — as a
trailing argument, in an env block, or in a gitignored .env in your workspace root:
Claude Desktop
The same path-less configuration goes in claude_desktop_config.json (%APPDATA%\Claude\ on
Windows, ~/Library/Application Support/Claude/ on macOS):
Claude Desktop does not run the server from a workspace folder, so a .env there is not reliable.
If the client cannot show the path prompt at all, the server says so instead of failing silently, and
you can name the path in an env block:
To run straight from source instead of npm, use "args": ["-y", "github:mm6502/enterprise-architect-mcp"].
Example Prompts
Once connected, try prompts like:
- "Search for elements related to 'legal entity'"
- "Show me the package structure under the root"
- "What are the use case scenarios for UC_SUBMIT_APPLICATION?"
- "What elements and connectors are on diagram 0103 Application Processing?"
- "Resolve the reference {3F2A7C10-5B4D-4e8a-9C1F-27D6E8B0A4F3}"
- "What columns does t_connector have?"
- "Which diagrams does element a7680 appear on?"
Configuration
The server does not need a path to start. It looks for one when an agent first queries the model, and takes the first source that actually opens:
- CLI argument —
mcp-server-ea C:\path\to\model.qea - Environment variable —
EA_QEA_PATH(set in anenvblock or system env) .envfile —EA_QEA_PATH=...in a.envfile in the working directory- A remembered answer — whatever you last told the prompt
- The prompt — the client asks, and a working answer is remembered for next time
If you would rather never see the prompt — a CI job, a shared image, or simply a preference — put
the path in a gitignored .env in the working directory. Copy the template:
Then set your local path in .env:
If the path points to a directory instead of a file, the server automatically picks the newest
.qea file in it by modification time — point it at your export folder and new exports are picked up
without reconfiguring anything:
The .env file is gitignored — each developer sets their own path without affecting the shared
config. It is also never committed, which is why it is the one route every new user has to set up by
hand; answering the prompt once is what makes that unnecessary.
A source naming a path that cannot be opened is skipped rather than fatal, so the next source gets
its turn. The reason goes to the server log, and once some later source opens, ea_get_model_info
lists it under skipped. That is deliberate — a sample value left in an env block would otherwise
outrank every answer you could give, and answering the prompt would never help. The cost is that a
genuine typo is demoted quietly, so check ea_get_model_info if the server opens a different model
than you expected.
Skipping is only worth it when an answer can take the skipped source's place, so two cases stay fatal: a path you passed on the command line (that is this run's explicit instruction, not a stale default), and any broken source in a client that cannot show a prompt — falling through there would quietly open some other model instead of telling you.
Answers are remembered per machine, in %APPDATA%\enterprise-architect-mcp\ on Windows,
~/Library/Application Support/enterprise-architect-mcp/ on macOS, and $XDG_CONFIG_HOME (or
~/.config) elsewhere; set EA_MCP_CONFIG_DIR to keep that file somewhere else. A path that does
not open is never remembered, so asking again is enough to correct a mistyped answer.
Available Tools
Response contract
Every tool returns structured JSON with:
_meta.sourceTables— which database tables were consultedtotalMatched/returned/truncated— completeness metadata on every collectioncontinuation— exact call to retrieve the full set when truncatedisError: true+{ error: "not_found" }for non-existent subjects (distinct from empty results)
Two fields exist to stop an inexact answer from being read as a confirmed one:
ea_resolve—matchis always present; onlyprefixis an inexact matchea_get_element—_meta.attributes.multiplicityIsUniform: truemeans the element's attributes show no multiplicity contrast, so1..1is not evidence of requiredness
How Results Are Ordered, Paged, and Narrowed
Name ordering
Matching is locale-independent — search folds case and diacritics across European Latin alphabets,
so Straße, Łódź and Győr are found however they are typed or entity-encoded.
The enumeration tools — ea_search, ea_list_elements, ea_list_diagrams — do not order by name
at all. They order by the model's internal identity: stable and repeatable, but artificial, so
nothing should be read into which row follows which. That is a deliberate trade. Alphabetical
ordering under SQLite's binary collation sorts every accented initial after Z, and since these
tools return a window rather than the whole set, it does not merely reorder the list — it pushes
accented names out of the window entirely. Measured on a real export, names with an accented
initial filled 1.3% of visible slots under binary ordering against 3.0% under identity order, in a
model where they make up 3.9% of all names.
Only ea_get_scenarios still orders names by locale, where the whole set is always returned and no
name can be cut off. EA_LOCALE pins that ordering to a BCP 47 tag (sk, pl, hu, de, …) in
an env block or system env; unset, the host default applies. It does not affect matching.
Paging and narrowing
The enumeration tools return a window, not a sample. Each response carries totalMatched,
returned, offset and truncated, and when rows remain, a continuation naming the next call —
following it repeatedly visits every match once and terminates. Raising limit is not the way to
read a large set; advancing offset is.
When far more rows match than one window could hold, the response also carries a breakdown of how
they distribute. Its keys are parameter names and its values are argument values, so a breakdown is
a prompt to narrow — by objectType, stereotype, diagramType, or, for ea_search when the
result isn't already scoped, by packageScope (reported as the matching package's id, which the
next call can pass straight back) — rather than to page through thousands of rows.
License
Copyright (c) 2026 Michal Mracka
Licensed under the EUPL — see LICENSE for the full text.
來源:README.md,提交 655f31a
工具
0版本歷史
1- v3.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分