Enterprise Architect MCP Server
Enterprise Architect MCP Server
Sparx Enterprise Architect の .qea エクスポート用の読み取り専用 Model Context Protocol (MCP) サーバーです。AI エージェントに EA 分析モデルへのアクセスを提供します — 要素の検索、パッケージのナビゲーション、ユースケースシナリオの読み取り、コネクタのトラバースなど、EA インスタンスを起動せずに行えます。
任意の MCP クライアント(VS Code / GitHub Copilot、Claude Desktop、Cursor、Windsurf)で動作します。.qea SQLite エクスポートを直接読み取り、書き込むことは一切ありません。また、すべての応答には完全性メタデータが含まれるため、エージェントは切り詰められた回答と完全な回答を区別できます。
キーワード: MCP server · Sparx Enterprise Architect · .qea · UML · use case scenarios · package tree · connectors · diagrams · model search · AI agent tooling
前提条件
Node.js 22+(組み込みの
node:sqliteモジュールを使用)Sparx Enterprise Architect からエクスポートされた
.qeaファイル
Related MCP server: jgs-sysmlv2-api-mcp
インストール
VS Code / GitHub Copilot
最も簡単な方法は、このページ上部の Install in VS Code バッジを使用することです。入力する必要はありません。エージェントが初めてモデルをクエリするときにサーバーが .qea パスを尋ね、次回のために回答を記憶します。
代わりにターミナルから登録する場合(スクリプトや共有設定に便利)、CLI 呼び出しを 1 つ使用します。
code --add-mcp '{\"name\":\"enterprise-architect\",\"command\":\"npx\",\"args\":[\"-y\",\"enterprise-architect-mcp\"]}'\" シーケンスは code シム用で、PowerShell が引数を渡した後に再解析します。PowerShell 独自のバッククォートでエスケープするか、--% を使用しても、引用符が削除された状態で届きます。単一引用符は PowerShell が文字列に触れるのを防ぎます。bash や zsh では、通常の形式が代わりに機能します。
code --add-mcp '{"name":"enterprise-architect","command":"npx","args":["-y","enterprise-architect-mcp"]}'手動で設定する場合は、プロジェクトの .vscode/mcp.json に追加します。
{
"servers": {
"enterprise-architect": {
"type": "stdio",
"command": "npx",
"args": ["-y", "enterprise-architect-mcp"]
}
}
}そのファイルには個人情報は含まれていないため、そのままコミットでき、各開発者は自分のマシンで一度だけプロンプトに回答します。まったく質問されたくない場合は、パスを事前に指定します — 末尾の引数、env ブロック、またはワークスペースルートの gitignore された .env ファイルで指定します。
EA_QEA_PATH=C:\EA\exports\model.qeaClaude Desktop
同じパスなしの設定を claude_desktop_config.json(Windows では %APPDATA%\Claude\、macOS では ~/Library/Application Support/Claude/)に記述します。
{
"mcpServers": {
"enterprise-architect": {
"command": "npx",
"args": ["-y", "enterprise-architect-mcp"]
}
}
}Claude Desktop はワークスペースフォルダからサーバーを実行しないため、そこにある .env は信頼できません。クライアントがパスプロンプトをまったく表示できない場合、サーバーは静かに失敗するのではなくその旨を伝え、env ブロックでパスを指定できます。
"env": { "EA_QEA_PATH": "C:\\EA\\exports\\model.qea" }npm の代わりにソースから直接実行するには、"args": ["-y", "github:mm6502/enterprise-architect-mcp"] を使用します。
設定
サーバーは起動時にパスを必要としません。エージェントが最初にモデルをクエリするときにパスを探し、実際に開ける最初のソースを採用します。
CLI 引数 —
mcp-server-ea C:\path\to\model.qea環境変数 —
EA_QEA_PATH(envブロックまたはシステム環境で設定).envファイル — 作業ディレクトリの.envファイル内のEA_QEA_PATH=...記憶された回答 — 最後にプロンプトに答えた内容
プロンプト — クライアントが尋ね、有効な回答は次回のために記憶されます
開けないパスを指定するソースは致命的ではなくスキップされるため、次のソースが試行されます。理由はサーバーログに記録され、後でソースが開くと ea_get_model_info がそれを ignored の下にリストします。これは意図的です — env ブロックに残されたサンプル値が、あなたが与えるすべての回答よりも優先され、プロンプトに回答しても役に立たないことを防ぎます。代償として、実際のタイプミスは静かに降格されるため、サーバーが予期したモデルと異なるモデルを開いた場合は ea_get_model_info を確認してください。
スキップが価値があるのは、回答がスキップされたソースの代わりになれる場合のみです。したがって、2 つのケースは致命的なままです:コマンドラインで渡したパス(これはこの実行の明示的な指示であり、古いデフォルトではない)、およびプロンプトを表示できないクライアントの壊れたソース — そこでフォールスルーすると、通知する代わりに静かに別のモデルが開かれる可能性があります。
回答はマシンごとに記憶され、Windows では %APPDATA%\enterprise-architect-mcp\、macOS では ~/Library/Application Support/enterprise-architect-mcp/、その他では $XDG_CONFIG_HOME(または ~/.config)に保存されます。EA_MCP_CONFIG_DIR を設定すると、そのファイルを別の場所に保存できます。開けないパスは決して記憶されないため、もう一度尋ねるだけで誤った回答を修正できます。
パスがディレクトリを指している場合、サーバーは変更時刻で最新の .qea ファイルを自動的に選択します。エクスポートフォルダを指定すると、再設定なしで新しいエクスポートが取得されます。
パスを事前に指定する
プロンプトをまったく表示したくない場合(CI ジョブ、共有イメージ、または単に好み)は、作業ディレクトリの gitignore された .env にパスを置きます。テンプレートをコピーします。
Copy-Item .env.example .env次に、.env にローカルパスを設定します。
EA_QEA_PATH=C:\EA\exports\model.qeaディレクトリも機能します — その中の最新の .qea ファイルが使用されます。
EA_QEA_PATH=C:\EA\exports\.env ファイルは gitignore されています — 各開発者は共有設定に影響を与えずに自分のパスを設定できます。また、コミットされることはないため、すべての新規ユーザーが手動で設定する必要がある唯一のルートです。プロンプトに一度回答すれば、その必要はなくなります。
利用可能なツール
ツール | 説明 |
| 要素、属性、操作、制約にわたる全文検索。スロバキア語のアルファベット全体で大文字小文字を区別せず、エンティティエンコードされたテキストをデコードします。 |
| 要素の完全な詳細 — 属性、操作、それが表示される図、制約(事前/事後/不変/プロセス)。属性の多重度が対照的かどうかをフラグします。 |
| パッケージ内の要素をリストし、オプションでタイプでフィルタリングします。ページネーション付きで総数を報告します。 |
| 要素の関係 — フィーチャーリンクの解決(各端がどの属性/操作に接続するか)を含みます。 |
| 図上の要素とコネクタ(暗黙のコネクタとフィーチャーリンクを含む)。 |
| ユースケースシナリオのステップとすべての属性(トリガー、使用、結果、リンク、状態)およびシナリオノート。 |
| 再帰的な深さでパッケージ階層をナビゲートします。 |
| 名前とパッケージで図を検索します。 |
| アナリスト参照(中括弧で囲まれた GUID またはプレーンな名前)を、完全なパッケージパスを持つモデル候補に解決します。アナリストコードの名前プレフィックス一致にフォールバックします。すべての候補には |
| モデルのデータベーススキーマを調査します — テーブル、列、インデックス、rowid エイリアス。 |
| 開いているエクスポートの識別情報 — ファイル名、サイズ、変更日、サーバーバージョン、およびパスがどの設定ソースから来たか。 |
応答契約
すべてのツールは構造化 JSON を返します:
_meta.sourceTables— 参照されたデータベーステーブルtotalMatched/returned/truncated— すべてのコレクションの完全性メタデータcontinuation— 切り詰められた場合に完全なセットを取得するための正確な呼び出し存在しない対象に対する
isError: true+{ error: "not_found" }(空の結果とは区別)
不正確な回答が確認済みとして読まれるのを防ぐために、2 つのフィールドがあります:
ea_resolve—matchは常に存在します。prefixのみが不正確な一致ですea_get_element—_meta.attributes.multiplicityIsUniform: trueは、要素の属性に多重度の対比がないことを意味するため、1..1は必須性の証拠ではありません
プロンプトの例
接続後、次のようなプロンプトを試してください:
「'legal entity' に関連する要素を検索」
「ルートの下のパッケージ構造を表示」
「UC_SUBMIT_APPLICATION のユースケースシナリオは何ですか?」
「図 0103 Application Processing にはどの要素とコネクタがありますか?」
「参照 {3F2A7C10-5B4D-4e8a-9C1F-27D6E8B0A4F3} を解決」
「t_connector にはどの列がありますか?」
「要素 a7680 はどの図に表示されますか?」
ライセンス
Copyright (c) 2026 Michal Mracka
EUPL に基づいてライセンスされています — 全文は LICENSE を参照してください。
Available Tools
12 toolsea_get_connectorsARead-only
Get all relationships (connectors) for a given element. connectors lists what the element is connected to and how (Realisation, Dependency, Association, etc.), each entry naming its source and dest ends. For Generalization connectors, source is always the specific (child) type and dest the general (parent) type — each end also carries a role making this explicit without needing to reason about direction. Filter by connectorType and direction to list an element's direct children (incoming Generalization) or direct parent(s) (outgoing Generalization) without a diagram. Feature links show which specific attribute or operation each end attaches to.
Inputs: elementId (required), direction, connectorType.
ea_get_diagram_elementsARead-only
Get all elements and connectors placed on a specific diagram: the diagram itself, plus elements and connectors. elements already includes free-text Note diagram objects, which often carry a legend or abbreviation definitions an agent would otherwise miss. Connectors include feature-link resolution showing which attribute or operation each end attaches to. The connector list is the union of explicit t_diagramlinks rows and implied connectors (both ends on the diagram).
Inputs: diagramId (required).
ea_get_elementARead-only
Get full details of an Enterprise Architect element by its ID, including its Note, attributes, operations, the diagrams it appears on, and its constraints. Attribute multiplicity supports a requiredness inference only when the element uses multiplicities contrastively; read _meta.attributes.multiplicityIsUniform before making that inference — when it is true the element's attributes carry no multiplicity contrast, so a value like 1..1 is not evidence of requiredness. Attributes and operations are capped inline: attributesTruncated/operationsTruncated say whether the returned list is partial, and attributesTotal/operationsTotal give the full counts, so never infer a count from the inline list alone.
Inputs: elementId (required).
ea_get_model_infoARead-only
Report which .qea export file the server has open: fileName is the citable identity, alongside fileSizeBytes, lastModified, and the serverVersion that produced the answer. The full local path is also returned as resolvedPath, with resolvedPathNote explaining why it is environment detail rather than something to cite. configuration says where that path came from — source in words, sourceId as one of argument/environment/dotenv/remembered/prompt, and the configured value behind it — plus any skipped settings, each with the reason it could not be opened, and shadowed ones a higher-priority source outranked; configurationNote says how much of that is safe to repeat.
Inputs: no named parameters.
ea_get_package_treeARead-only
Navigate the package hierarchy. Without parameters, returns top-level packages. With a packageId, returns that package's children up to the specified depth. Each node carries id, name, parentId, and elementCount.
Inputs: depth, packageId.
ea_get_scenariosARead-only
Get use case scenario flows for an element. scenarios holds the parsed flows; each has name, type, notes, and steps, and each step carries stepNumber plus its attributes (trigger, uses, result, state, link). Steps are numbered within each scenario. Scenarios ordered by type: Basic Path first, then Alternate, then Exception. A step's uses may name a business rule or constraint by code; that code is not independently searchable or resolvable — look it up among this same elementId's own constraints via ea_get_element, not by a separate lookup.
Inputs: elementId (required).
ea_get_schemaARead-only
List the model's database tables in tables, or pass a tableName to get that table's columns and indexes instead. That form echoes the table name and adds rowidAlias — the INTEGER PRIMARY KEY aliasing SQLite's rowid, so the fastest lookup path, or null when the table has none — with rowidNote saying which case applies. Use this to discover what data the model holds beyond what the typed ea_* tools return. See ea_get_model_info for the export's identity.
Inputs: tableName.
ea_list_diagramsARead-only
List diagrams in the model, optionally filtered by package, diagram type, and/or name substring. Each entry in results carries diagramId, name, type, packagePath, and eaGuid. Diagrams are ordered by the model's internal identity — stable but artificial, neither alphabetical nor the analyst's tree order — so adjacency carries no meaning. Walk a large result set with offset rather than a larger limit; while rows remain, continuation names the next call. When far more diagrams match than one window can hold, breakdown reports how many each type holds, so the next call can narrow by diagramType instead of paging.
Inputs: limit, offset, packageId, diagramType, +1 more.
ea_list_elementsARead-only
List elements within a package, optionally filtered by object type. elements is a lightweight list (ID, type, name, alias, stereotype), grouped by element type and then ordered by the model's internal identity. That order is stable but artificial — neither alphabetical nor the analyst's tree order — so adjacency carries no meaning. Walk a large package with offset rather than a larger limit; while rows remain, continuation names the next call. When far more elements match than one window can hold, breakdown reports how many each type holds, so the next call can narrow by objectType instead of paging.
Inputs: packageId (required), limit, offset, objectType.
ea_resolveARead-only
Resolve an analyst reference (braced GUID or plain name) to model candidates: the input is echoed as reference and the hits are in candidates. A braced GUID is matched exactly. A plain name is matched against the full name first; only if nothing matches exactly is the reference retried as a name prefix, which resolves analyst codes like UC_ABC_2079 or OA_ABC_2280 to elements named 'CODE: description'. An exact hit is returned alone and is never diluted by prefix hits. Each candidate reports its type (element, diagram, package), id, name, fullPackagePath, eaGuid, and a match field that is always present with value "guid", "exact", or "prefix" — a "prefix" candidate is an inexact match and must not be treated as a confirmed identity. Use the optional kind filter to narrow results.
Inputs: reference (required), kind.
ea_searchARead-only
Search Enterprise Architect model elements by name, alias, notes, attribute names/notes, operation names/notes, or constraint notes. Matching is case- and diacritic-insensitive across European Latin alphabets and sees through entity-encoded text. requiredTerms is a list of terms every one of which must occur somewhere in an element's searchable text (conjunction) — terms need not share a field, but sharing one ranks higher; each term is matched as a contiguous substring exactly as a single term is, so a term carrying whitespace is a phrase and is never split. A one-entry list behaves exactly as a single search term always has. boostAnyOf is an optional list of further terms: a result also matching at least one of them ranks ahead of one that does not, but nothing is ever excluded on that basis — for narrowing to only elements matching an alternative too, use ea_search_and_any_of instead. When no element matches, termMatches reports, per supplied term, whether that term matched anywhere in the corpus at all — so a caller can tell which term emptied the result rather than re-guessing the whole call. Matching elements are returned in results, strongest match first, each with a decoded note preview and a truncation flag; equally strong matches fall back to the model's internal identity, a stable but artificial order. Each result also carries matches, the evidence for why it was returned: the field that matched, the id and name of the attribute, operation or constraint it came from, and a snippet of the author's own text around the match. Evidence is strongest-first and capped, and _meta.matches on the result reports how many matches were found and how many were withheld. The note preview centres on the match when the element's own note is what matched. packageScope restricts results to a package (given as its id or its name) and its descendants. Walk a large result set with offset rather than a larger limit; while rows remain, continuation names the next call. When far more elements match than one window can hold, breakdown reports how they distribute — by objectType, stereotype, or, unless already scoped, by packageScope (reported as the matching package's id, which the next call can pass straight back) — so the next call can narrow instead of paging.
Inputs: requiredTerms (required), limit, offset, boostAnyOf, +3 more.
ea_search_and_any_ofARead-only
Search Enterprise Architect model elements the same way ea_search does, plus andAnyOf: a required-and-alternative filter. requiredTerms still works exactly as it does on ea_search (conjunction, contiguous substring, terms need not share a field). andAnyOf is an optional list of further terms; when supplied, a result must contain requiredTerms AND at least one andAnyOf term, so it can only ever narrow — it never returns a result requiredTerms alone would not. An empty andAnyOf array applies no filter. For promoting rather than narrowing, use ea_search instead, which offers the same alternatives idea as a rank boost. When no element matches the required terms at all, termMatches reports, per supplied term, whether it matched anywhere in the corpus. Matching elements are returned in results, strongest first, each with a decoded note preview, a truncation flag, and matches — the evidence for why it was returned, capped and strongest-first, with _meta.matches reporting how many were found and withheld. packageScope restricts results to a package and its descendants. Walk a large result set with offset; while rows remain, continuation names the next call. When far more elements match than one window can hold, breakdown reports how they distribute by objectType, stereotype, or packageScope.
Inputs: requiredTerms (required), limit, offset, andAnyOf, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target clearly distinct resources (packages, elements, connectors, diagrams, scenarios, schema), but `ea_search` and `ea_search_and_any_of` are effectively the same operation with one extra filter, and their descriptions spend most of their length explaining how they differ from each other. That is a parameter variation surfaced as a separate tool, which invites misselection. `ea_get_element` vs `ea_list_elements` is distinguishable, but the search pair drags the set down.
All names share the `ea_` prefix and follow a verb_noun pattern (`ea_get_element`, `ea_list_diagrams`, `ea_get_connectors`), which is highly predictable. Minor deviations: `ea_resolve` has no object noun, and `ea_search_and_any_of` encodes a parameter in the tool name rather than following the resource+action convention.
Twelve tools is a well-scoped surface for a read-only model browser, and each maps to a real artifact type in the .qea model. The count would be a clean 5 if the two near-duplicate search tools were merged into one with an optional filter.
The surface covers the main exploration paths: package hierarchy, element search and detail, element listing, connectors, diagram listing and contents, scenario flows, raw schema access, reference resolution, and export identity. Gaps remain around tagged values, standalone constraint/attribute/operation lookups, and any write capability, though a read-only inspector scope makes the latter a defensible design choice.
Maintenance
Related MCP Connectors
- ORANO MCP ServerDeprecatedio.github.infotik
Read-only MCP server exposing a user ORANO library to their own AI agent.
Free, source-checked directory of AI agent tools, MCP servers and skills, with read-only search.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseBqualityDmaintenanceA read-only MCP server connecting AI assistants to Azure DevOps Server (on-premises) for browsing projects, repos, builds, work items, releases, pipelines, and test results.391MIT
- FlicenseNot gradedqualityBmaintenanceAn MCP server that gives an AI agent read and write access to a live SysML v2 model through the vendor-neutral OMG SysML v2 REST API.3-
- FlicenseAqualityDmaintenanceA read-only MCP server that enables AI clients to search a knowledge base and retrieve complete source documents via narrow search and fetch tools.2-
- FlicenseAqualityBmaintenanceA read-only MCP server that gives AI coding agents structured access to a project's source code, architecture, documentation, and Git context through 16 tools for searching, reading, and comparing evidence without modifying files.16-