Skip to main content
Glama
Enterprise Architect MCP Server

Enterprise Architect MCP Server

by mm6502

Enterprise Architect MCP Server

npm version Node.js License: EUPL-1.2 Install in VS Code Install in VS Code Insiders

Сервер Model Context Protocol (MCP) только для чтения для экспортов Sparx Enterprise Architect .qea. Предоставляет ИИ-агентам доступ к аналитическим моделям EA — поиск элементов, навигация по пакетам, чтение сценариев использования и обход соединителей — без запущенного экземпляра EA.

Работает с любым MCP-клиентом (VS Code / GitHub Copilot, Claude Desktop, Cursor, Windsurf). Читает экспорт .qea SQLite напрямую, никогда не записывает в него, и каждый ответ содержит метаданные полноты, чтобы агент мог отличить усечённый ответ от полного.

Ключевые слова: MCP-сервер · Sparx Enterprise Architect · .qea · UML · сценарии использования · дерево пакетов · соединители · диаграммы · поиск по модели · инструменты для ИИ-агентов

Предварительные требования

  • Node.js 22+ (использует встроенный модуль node:sqlite)

  • Файл .qea, экспортированный из Sparx Enterprise Architect

Related MCP server: jgs-sysmlv2-api-mcp

Установка

VS Code / GitHub Copilot

Самый быстрый способ — значок Install in VS Code в верхней части этой страницы. Заполнять ничего не нужно: сервер запросит путь к вашему .qea при первом обращении агента к модели и запомнит ответ на следующий раз.

Чтобы зарегистрировать его из терминала, что удобнее для скриптов или общей настройки, используйте один вызов CLI:

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 или в игнорируемом git .env в корне рабочей области:

EA_QEA_PATH=C:\EA\exports\model.qea

Claude Desktop

Та же конфигурация без пути помещается в claude_desktop_config.json (%APPDATA%\Claude\ на Windows, ~/Library/Application Support/Claude/ на macOS):

{
  "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"].

Конфигурация

Серверу не нужен путь для запуска. Он ищет его при первом запросе агента к модели и использует первый источник, который действительно открывается:

  1. Аргумент командной строки — mcp-server-ea C:\path\to\model.qea

  2. Переменная окружения — EA_QEA_PATH (задаётся в блоке env или в системном окружении)

  3. Файл .env — EA_QEA_PATH=... в файле .env в рабочем каталоге

  4. Запомненный ответ — то, что вы последний раз сообщили в ответ на запрос

  5. Запрос — клиент спрашивает, и рабочий ответ запоминается на следующий раз

Источник, указывающий на путь, который не удаётся открыть, пропускается, а не вызывает ошибку, поэтому следующий источник получает свой шанс. Причина попадает в журнал сервера, и когда какой-то более поздний источник открывается, ea_get_model_info перечисляет его в ignored. Это сделано намеренно — образец значения, оставленный в блоке env, иначе перевесил бы все ваши ответы, и ответ на запрос никогда бы не помог. Цена этого — настоящая опечатка тихо понижается, поэтому проверяйте ea_get_model_info, если сервер открывает другую модель, чем вы ожидали.

Пропуск оправдан только тогда, когда ответ может занять место пропущенного источника, поэтому два случая остаются фатальными: путь, переданный в командной строке (это явная инструкция для данного запуска, а не устаревшее значение по умолчанию), и любой неработающий источник в клиенте, который не может показать запрос — в противном случае сервер тихо открыл бы другую модель вместо того, чтобы сообщить вам.

Ответы запоминаются на каждой машине в %APPDATA%\enterprise-architect-mcp\ на Windows, ~/Library/Application Support/enterprise-architect-mcp/ на macOS и $XDG_CONFIG_HOME (или ~/.config) в остальных случаях; установите EA_MCP_CONFIG_DIR, чтобы хранить этот файл в другом месте. Путь, который не открывается, никогда не запоминается, поэтому повторный запрос достаточен для исправления опечатки.

Если путь указывает на каталог, сервер автоматически выбирает самый новый файл .qea по времени изменения. Указание на папку экспорта означает, что новые экспорты подхватываются без перенастройки.

Указание пути заранее

Если вы предпочитаете никогда не видеть запрос — CI-задача, общий образ или просто предпочтение — поместите путь в игнорируемый git .env в рабочем каталоге. Скопируйте шаблон:

Copy-Item .env.example .env

Затем укажите свой локальный путь в .env:

EA_QEA_PATH=C:\EA\exports\model.qea

Каталог тоже подходит — используется самый новый файл .qea в нём:

EA_QEA_PATH=C:\EA\exports\

Файл .env игнорируется git — каждый разработчик задаёт свой путь, не влияя на общую конфигурацию. Он также никогда не коммитится, поэтому это единственный способ, который каждому новому пользователю приходится настраивать вручную; ответ на запрос один раз делает это ненужным.

Доступные инструменты

Инструмент

Описание

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

Разрешение ссылок аналитика (GUID в фигурных скобках или простое имя) на кандидатов в модели с полным путём пакета. При отсутствии точного совпадения использует сопоставление по префиксу имени для кодов аналитика; каждый кандидат несёт match со значением guid, exact или prefix.

ea_get_schema

Интроспекция схемы базы данных модели — таблицы, столбцы, индексы, псевдоним rowid.

ea_get_model_info

Идентификация открытого экспорта — имя файла, размер, дата изменения, версия сервера и какой источник конфигурации предоставил путь.

Контракт ответа

Каждый инструмент возвращает структурированный JSON с:

  • _meta.sourceTables — какие таблицы базы данных были использованы

  • totalMatched / returned / truncated — метаданные полноты для каждой коллекции

  • continuation — точный вызов для получения полного набора при усечении

  • isError: true + { error: "not_found" } для несуществующих объектов (отличается от пустых результатов)

Два поля существуют, чтобы неточный ответ не был воспринят как подтверждённый:

  • ea_resolve — match всегда присутствует; только prefix является неточным совпадением

  • ea_get_element — _meta.attributes.multiplicityIsUniform: true означает, что атрибуты элемента не показывают контраста множественности, поэтому 1..1 не является свидетельством обязательности

Примеры запросов

После подключения попробуйте такие запросы:

  • «Найти элементы, связанные с "юридическим лицом"»

  • «Покажи структуру пакетов в корне»

  • «Какие сценарии использования для UC_SUBMIT_APPLICATION?»

  • «Какие элементы и соединители на диаграмме 0103 Application Processing?»

  • «Разрешить ссылку {3F2A7C10-5B4D-4e8a-9C1F-27D6E8B0A4F3}»

  • «Какие столбцы есть у t_connector?»

  • «На каких диаграммах появляется элемент a7680?»

Лицензия

Copyright (c) 2026 Michal Mracka

Лицензировано под EUPL — см. LICENSE для полного текста.

Available Tools

12 tools
ea_get_connectorsA
Read-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_elementsA
Read-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_elementA
Read-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_infoA
Read-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_treeA
Read-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_scenariosA
Read-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_schemaA
Read-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_diagramsA
Read-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_elementsA
Read-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_resolveA
Read-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_search_and_any_ofA
Read-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

    A4/5.0

    Scored across 12 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers