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

Un servidor de Model Context Protocol (MCP) de solo lectura para exportaciones .qea de Sparx Enterprise Architect. Da a los agentes de IA acceso a los modelos de análisis de EA: buscar elementos, navegar paquetes, leer escenarios de casos de uso y recorrer conectores, sin necesidad de una instancia de EA en ejecución.

Funciona con cualquier cliente MCP (VS Code / GitHub Copilot, Claude Desktop, Cursor, Windsurf). Lee directamente la exportación SQLite .qea, nunca escribe en ella, y cada respuesta lleva metadatos de completitud para que un agente pueda distinguir una respuesta truncada de una completa.

Palabras clave: servidor MCP · Sparx Enterprise Architect · .qea · UML · escenarios de casos de uso · árbol de paquetes · conectores · diagramas · búsqueda en modelos · herramientas para agentes de IA

Requisitos previos

  • Node.js 22+ (usa el módulo integrado node:sqlite)

  • Un archivo .qea exportado desde Sparx Enterprise Architect

Related MCP server: jgs-sysmlv2-api-mcp

Instalación

VS Code / GitHub Copilot

La vía más rápida es la insignia Install in VS Code en la parte superior de esta página. No hay nada que rellenar: el servidor pregunta por la ruta de tu .qea la primera vez que un agente consulta el modelo, y recuerda la respuesta para la próxima vez.

Para registrarlo desde una terminal, lo cual es más práctico para scripts o una configuración compartida, usa una sola llamada de CLI:

code --add-mcp '{\"name\":\"enterprise-architect\",\"command\":\"npx\",\"args\":[\"-y\",\"enterprise-architect-mcp\"]}'

Las secuencias \" son para el shim code, que vuelve a analizar el argumento después de que PowerShell ya lo haya entregado; escapar con la propia comilla invertida de PowerShell, o usar --%, sigue llegando con las comillas eliminadas. Las comillas simples evitan que PowerShell toque la cadena. En bash o zsh, la forma simple funciona en su lugar:

code --add-mcp '{"name":"enterprise-architect","command":"npx","args":["-y","enterprise-architect-mcp"]}'

Para configurarlo manualmente, añade a .vscode/mcp.json de tu proyecto:

{
  "servers": {
    "enterprise-architect": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "enterprise-architect-mcp"]
    }
  }
}

Nada personal está en ese archivo, por lo que se puede confirmar tal cual y cada desarrollador responde la pregunta una vez en su propia máquina. Si prefieres que no se te pregunte en absoluto, indica la ruta de antemano, como argumento final, en un bloque env, o en un .env ignorado por git en la raíz de tu espacio de trabajo:

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

Claude Desktop

La misma configuración sin ruta va en claude_desktop_config.json (%APPDATA%\Claude\ en Windows, ~/Library/Application Support/Claude/ en macOS):

{
  "mcpServers": {
    "enterprise-architect": {
      "command": "npx",
      "args": ["-y", "enterprise-architect-mcp"]
    }
  }
}

Claude Desktop no ejecuta el servidor desde una carpeta de espacio de trabajo, por lo que un .env allí no es fiable. Si el cliente no puede mostrar la pregunta de ruta en absoluto, el servidor lo dice en lugar de fallar silenciosamente, y puedes indicar la ruta en un bloque env:

"env": { "EA_QEA_PATH": "C:\\EA\\exports\\model.qea" }

Para ejecutar directamente desde el código fuente en lugar de npm, usa "args": ["-y", "github:mm6502/enterprise-architect-mcp"].

Configuración

El servidor no necesita una ruta para iniciarse. La busca cuando un agente consulta el modelo por primera vez, y toma la primera fuente que realmente se abre:

  1. Argumento de CLI — mcp-server-ea C:\ruta\al\modelo.qea

  2. Variable de entorno — EA_QEA_PATH (establecida en un bloque env o en el entorno del sistema)

  3. Archivo .env — EA_QEA_PATH=... en un archivo .env en el directorio de trabajo

  4. Una respuesta recordada — lo que le dijiste por última vez a la pregunta

  5. La pregunta — el cliente pregunta, y una respuesta válida se recuerda para la próxima vez

Una fuente que indique una ruta que no se puede abrir se omite en lugar de ser fatal, por lo que la siguiente fuente tiene su turno. La razón va al registro del servidor, y una vez que alguna fuente posterior se abre, ea_get_model_info la lista bajo ignored. Esto es deliberado: un valor de muestra dejado en un bloque env superaría de otro modo a cualquier respuesta que pudieras dar, y responder a la pregunta nunca ayudaría. El costo es que un error tipográfico real se degrada silenciosamente, así que revisa ea_get_model_info si el servidor abre un modelo diferente al esperado.

Omitir solo vale la pena cuando una respuesta puede ocupar el lugar de la fuente omitida, por lo que dos casos siguen siendo fatales: una ruta que pasaste en la línea de comandos (esa es la instrucción explícita de esta ejecución, no un valor predeterminado obsoleto), y cualquier fuente rota en un cliente que no puede mostrar una pregunta; caer allí abriría silenciosamente otro modelo en lugar de decírtelo.

Las respuestas se recuerdan por máquina, en %APPDATA%\enterprise-architect-mcp\ en Windows, ~/Library/Application Support/enterprise-architect-mcp/ en macOS, y $XDG_CONFIG_HOME (o ~/.config) en otros lugares; establece EA_MCP_CONFIG_DIR para mantener ese archivo en otro lugar. Una ruta que no se abre nunca se recuerda, por lo que preguntar de nuevo es suficiente para corregir una respuesta mal escrita.

Si la ruta apunta a un directorio, el servidor elige automáticamente el archivo .qea más reciente por fecha de modificación. Apuntar a tu carpeta de exportación significa que las nuevas exportaciones se recogen sin reconfigurar nada.

Indicar la ruta de antemano

Si prefieres no ver nunca la pregunta (un trabajo de CI, una imagen compartida o simplemente una preferencia), pon la ruta en un .env ignorado por git en el directorio de trabajo. Copia la plantilla:

Copy-Item .env.example .env

Luego establece tu ruta local en .env:

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

Un directorio también funciona: se usa el archivo .qea más reciente que contenga:

EA_QEA_PATH=C:\EA\exports\

El archivo .env está ignorado por git: cada desarrollador establece su propia ruta sin afectar la configuración compartida. Tampoco se confirma nunca, por lo que es la única vía que cada nuevo usuario tiene que configurar manualmente; responder a la pregunta una vez es lo que hace que eso sea innecesario.

Herramientas disponibles

Herramienta

Descripción

ea_search

Búsqueda de texto completo en elementos, atributos, operaciones y restricciones. Insensible a mayúsculas en todo el alfabeto eslovaco, decodifica texto con entidades.

ea_get_element

Detalle completo del elemento: atributos, operaciones, diagramas en los que aparece, restricciones (pre/post/invariante/proceso). Indica si la multiplicidad de atributos es contrastiva.

ea_list_elements

Lista elementos en un paquete, opcionalmente filtrados por tipo. Informa el total con paginación.

ea_get_connectors

Relaciones para un elemento: incluye resolución de enlaces de características (a qué atributo/operación se adjunta cada extremo).

ea_get_diagram_elements

Elementos y conectores en un diagrama, incluidos conectores implícitos y enlaces de características.

ea_get_scenarios

Pasos de escenarios de casos de uso con todos los atributos (disparador, usos, resultado, enlace, estado) y notas de escenario.

ea_get_package_tree

Navega la jerarquía de paquetes con profundidad recursiva.

ea_list_diagrams

Busca diagramas por nombre y paquete.

ea_resolve

Resuelve referencias de analistas (GUID entre llaves o nombre simple) a candidatos del modelo con ruta completa del paquete. Recurre a coincidencia por prefijo de nombre para códigos de analista; cada candidato lleva un match de guid, exact o prefix.

ea_get_schema

Inspecciona el esquema de base de datos del modelo: tablas, columnas, índices, alias de rowid.

ea_get_model_info

Identidad de la exportación abierta: nombre de archivo, tamaño, fecha de modificación, versión del servidor y qué fuente de configuración proporcionó la ruta.

Contrato de respuesta

Cada herramienta devuelve JSON estructurado con:

  • _meta.sourceTables — qué tablas de base de datos se consultaron

  • totalMatched / returned / truncated — metadatos de completitud en cada colección

  • continuation — llamada exacta para recuperar el conjunto completo cuando está truncado

  • isError: true + { error: "not_found" } para sujetos inexistentes (distinto de resultados vacíos)

Dos campos existen para evitar que una respuesta inexacta se lea como una confirmada:

  • ea_resolve — match siempre está presente; solo prefix es una coincidencia inexacta

  • ea_get_element — _meta.attributes.multiplicityIsUniform: true significa que los atributos del elemento no muestran contraste de multiplicidad, por lo que 1..1 no es evidencia de obligatoriedad

Ejemplos de indicaciones

Una vez conectado, prueba indicaciones como:

  • "Busca elementos relacionados con 'entidad legal'"

  • "Muéstrame la estructura de paquetes bajo la raíz"

  • "¿Cuáles son los escenarios de caso de uso para UC_SUBMIT_APPLICATION?"

  • "¿Qué elementos y conectores hay en el diagrama 0103 Application Processing?"

  • "Resuelve la referencia {3F2A7C10-5B4D-4e8a-9C1F-27D6E8B0A4F3}"

  • "¿Qué columnas tiene t_connector?"

  • "¿En qué diagramas aparece el elemento a7680?"

Licencia

Copyright (c) 2026 Michal Mracka

Licenciado bajo la EUPL — consulta LICENSE para el texto completo.

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