Book a Demo

Author Topic: MCP (Model Context Protocol) server for Enterprise Architect has been released  (Read 110931 times)

Takeshi K

  • EA User
  • **
  • Posts: 630
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Hi Viking and all who are interested in auto-generation by AI,

Regard to the following Viking comment, now the latest MCP server can generate better BPMN diagrams including Pools, Lanes, better layout, etc.

"I haven't tested your workaround solution for BPMN yet, but I will definitely do so.". Here are finally my test results:
  • The sterotypes are used and displayed for all elements I was using: events (!), activities, gateways.
  • As part of the prompt I said which task types to use, but I got only 'abstractTasks'. I will futher investigate this issue.
  • mcp created lanes for each involved role. But it arranged them as a row (not on top of each other), And it did not put the respective activities into the lanes. Instead Copilot says: "The fundamental issue: The MCP server's createelement and setelementproperty commands don't seem to support proper BPMN lane Containment. This is similar to the limitation we found with UML attributes - the MCP Server (v2.1.0.0) doesn't expose all the necessary commands for complete BPMN diagram modeling."
  • The layout is quite good. But it is vertical and cannot be changed. BPMN diagrams are more horizonal and this should be the outcome, if the layout cannot be adapted.
  • The created diagram is not correct but my understanding is that mcp cannot help here (e.g., only diverging gateways have been created, but not converging ones).

Example request for your AI (LLM):
Please create the following process as BPMN diagram within the currently selected package.

1. When an order email arrives from a customer, the responsible staff member in the relevant department reviews the email contents.
2. If the contents are acceptable, that staff member performs the ordering procedure.
3. If the contents are problematic, the department manager reviews the contents, after which the original staff member performs the ordering procedure.
4. Once the ordering procedure is complete, create an order report and finalize the process.

Result:
(by Claude Desktop, free plan)


I have not modify anything including position and size. We need to use the prompt for BPMN which is offered by the MCP add-in.

Enjoy!



--
t-kouno

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13495
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Hi Takeshi,

Looks nice and all, but I'm afraid I'm still a bit underwhelmed by all this.

It looks to me like this AI agent does only does the stuff I can easily do myself.
I would be really enthousiastic if it would do the hard stuff

- Do proper layout of my diagram
   - all elements the same size
   - elements as the same horizontal/vertical level
   - elements the same distance from eachother
   - all connectors the correct style (mostly orthogonal rounded)
   - all connectors correctly attached to the correct point of an element (mostly center, unless there are multiple connectors on the same side)
- link pools/Lanes with the proper elements (e.g. PartnerRole etc...)
- make blackbox pools (such as customer) actually blackbox.

To make it actually work in a serious modelling environment, it should need to learn and follow the guidelines of the organisation.

I don't want to rain on your parade, and I'm sure it's really technically a very advanced tool.
But for now I'm not yet able to recommend usage of such a tool to my clients.

Geert

Takeshi K

  • EA User
  • **
  • Posts: 630
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Hi Geert,

Thank you so much for your comment. Your comments are very welcome and I agree some of your comments.

About the following points, maybe we can solve by requesting AI to do so.
- all elements the same size
- elements as the same horizontal/vertical level
- elements the same distance from each other
- link pools/Lanes with the proper elements (e.g. PartnerRole etc...)
My addin already has the interface for those.

About the connector style and routing, currently we cannot specify them. Especially latter, maybe you know, this is not easy to route nicely in the current EA API/storing data format...


I think it's important to consider how we use AI/LLM in our business/work. I once heard someone say that if we want 100% quality, we shouldn't use AI. If we think we can skip 80% of our work with AI, AI is our friend.

For example, if we want, we can create hundreds of BPMN diagrams from very large Word documents by asking AI to generate diagrams and then waiting for it to finish. Of course, we would still need to manipulate layouts and correct AI misunderstandings, but I think this is easier and faster than creating all the BPMN diagrams manually one by one. In Enterprise Architect in particular, adding pools, changing their size, adding lanes inside pools (which then requires us to change the size of the pools again), adding BPMN elements, connecting them and layouting them beautifully are very tedious work.

However, someone (e.g. one of my colleagues - he never use AI) might argue that many low-quality artifacts are worse, and that creating them manually results in a higher quality product (and we can save time, compared to 'fix' AI generated artifacts.) Yes, that is also correct. The most important thing, I think, is how, where and when we use AI.
--
t-kouno

Viking

  • EA User
  • **
  • Posts: 474
  • Karma: +2/-2
    • View Profile
Hi Takeshi, the command seems to have a bug. 'get_element_information' always returns 'empty' for 'Owned Diagrams'. Goal is to find out the composite diagram / child diagram of elements.
« Last Edit: January 16, 2026, 06:13:50 am by Viking »

Viking

  • EA User
  • **
  • Posts: 474
  • Karma: +2/-2
    • View Profile
It looks to me like this AI agent does only does the stuff I can easily do myself.

All this can be achieved by just using natural language. Even my grandfather would be able to create a BPMN diagram now.

To make it actually work in a serious modelling environment, it should need to learn and follow the guidelines of the organisation.

You can teach your agent (easily) and the results will quickly improve.

I don't want to rain on your parade, and I'm sure it's really technically a very advanced tool.
But for now I'm not yet able to recommend usage of such a tool to my clients.

I would, I do, we do.
« Last Edit: January 16, 2026, 03:02:13 am by Viking »

Viking

  • EA User
  • **
  • Posts: 474
  • Karma: +2/-2
    • View Profile
Regard to the following Viking comment, now the latest MCP server can generate better BPMN diagrams including Pools, Lanes, better layout, etc.

Just great !

Takeshi K

  • EA User
  • **
  • Posts: 630
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Hi Takeshi, the command seems to have a bug. 'get_element_information' always returns 'empty' for 'Owned Diagrams'. Goal is to find out the composite diagram / child diagram of elements.

Hi Viking,
I have checked the above issue, but I cannot reproduce it. This means that the MCP returns child diagrams when you create a diagram by 'New Child Diagram' | 'Composite Structure Diagram' from the context menu, or when you add or move a diagram in the Browser window.

However, if you 'link' a diagram from the 'New Child Diagram' |  'Select Composite Diagram' context menu option, the linked diagram is not included in the 'Owned Diagrams' information because it is not owned by an element, just linked.

If you can easily reproduce the issue with the newly created project file, please send me the file. ([email protected])
--
t-kouno

Viking

  • EA User
  • **
  • Posts: 474
  • Karma: +2/-2
    • View Profile

Yes, you are right. We we are "just" using Composite Diagrams only, not Composite Structure Diagrams.

But even my agent is confused about this distinction. Copilot using your mcp says, that "Elements with Composite Diagrams: 0". It does not say "Elements with Composite Structure Diagrams: 0".

Can your mcp be extended to also return Composite Diagrams? This feature is part of Enterprise Architect, that's why it should be also supported by your mcp. Our child diagrams cannot be moved into the structure of the parent diagram, because many parent diagrams are using these Composite Diagrams. Otherwise, this restriction would dominate our complete repository and we could not order it accoring our standards.
« Last Edit: January 17, 2026, 04:02:27 am by Viking »

Takeshi K

  • EA User
  • **
  • Posts: 630
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
The 'Composite Diagrams' and 'Composite Structure Diagrams' are terms in the context menu. I don't understand exactly what these terms refer to.

But my current implementation of the MCP is 'owned diagrams', not 'Composite Diagrams' nor 'Composite Structure Diagrams', nor linked diagram. And this 'owned' means that diagrams under the target element in the Browser.

I think that there could be an option to add 'linked diagram' or 'related diagram' to return the  'Composite Diagrams' in the menu item. Anyway, the linked diagram (i.e., the  'Composite Diagrams' in the menu item) is not owned, so I think it is not correct to include the diagram to 'owned diagrams'. Please wait the next release:-)
--
t-kouno

Viking

  • EA User
  • **
  • Posts: 474
  • Karma: +2/-2
    • View Profile

Would a user care, if it is an owned or other referenced diagram? I think, only one or the other can be added to an element. And both are diagrams.

Or just adding composite to get_element_information?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile


Would a user care whether it is an owned or an other-referenced diagram?  I think only one of the two can be added to an element.  And both are diagrams.

Or just adding composite to get_element_information?
I asked Google Gemini what the difference was between Composite and Composite Structure Diagrams:
While the terms are often used interchangeably, there is a technical distinction in how they are defined in the UML specification versus how they are used in industry jargon and modelling tools.
1.  The Official Term: Composite Structure Diagram.  The UML Composite Structure Diagram is the formal name for the diagram type introduced in UML 2.0.  It is a structural diagram that lets you “peek inside” a complex classifier (such as a Class or Component) to see how its internal parts work together.
  • Focus: It shows the internal structure of a single class or component at runtime.
  • Key Elements: It uses Parts, Ports, Connectors, and Collaborations.
  • Use Case: You would use this to model how a “Car” class is internally composed of an “Engine”, “Wheels,” and “Transmission,” and how those parts are wired together via specific ports.
2.  The Shorthand: Composite Diagram.  In most conversations, “Composite Diagram” is simply a shorthand for “Composite Structure Diagram.” There is no official diagram type in the UML 2.5 standard named just “Composite Diagram.”
However, there are three common ways this term is used that can confuse:
  • Tool-Specific Features: In tools such as Sparx Enterprise Architect, a “Composite Diagram” is a child diagram nested beneath a parent element.  For example, if you double-click a Class and it opens a sub-diagram, that sub-diagram is called a “composite diagram,” regardless of whether it is a state machine, activity, or structure diagram.
  • Composition in Class Diagrams: Some beginners use “composite diagram” to describe a standard Class Diagram that heavily uses the Composition relationship (indicated by the solid black diamond line).
  • Design Patterns: It is occasionally confused with a diagram illustrating the Composite Design Pattern, which is a specific way of organising objects into tree structures to represent part-whole hierarchies.
So, everybody is confused...

Unless this is a hallucination, then a UML Composite Structure Diagram is an EA Composite Diagram; but not vice-versa!

Another problem is that EA sometimes conflates Composition with Nesting (I’ve spoken about the difference many times in the past).  You’ll see Gemini did not make that conflation.  What EA calls a Composite diagram is, in fact, a Nested diagram.

These days, of course, language isn’t important.  It’s the “vibe” that counts...

HTH,
Paolo
« Last Edit: January 19, 2026, 02:02:36 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Viking

  • EA User
  • **
  • Posts: 474
  • Karma: +2/-2
    • View Profile

Many thanks, Paolo.

There should be at least a possibility to retrieve this information, regardless of the theory behind it.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8098
  • Karma: +118/-20
    • View Profile
  • Tool-Specific Features: In tools such as Sparx Enterprise Architect, a “Composite Diagram” is a child diagram nested beneath a parent element.  For example, if you double-click a Class and it opens a sub-diagram, that sub-diagram is called a “composite diagram,” regardless of whether it is a state machine, activity, or structure diagram.

Even the fact that Gemini is using the phrase "Sparx Enterprise Architect" is enough to say that it's pulling from sources that shouldn't be trusted. It's equivalent to "International Business Rhapsody". It may not be hallucinating, but drawing from unreliable sources is just as bad.

Unless this is a hallucination, then a UML Composite Structure Diagram is an EA Composite Diagram; but not vice-versa!

Another problem is that EA sometimes conflates Composition with Nesting (I’ve spoken about the difference many times in the past).  You’ll see Gemini did not make that conflation.  What EA calls a Composite diagram is, in fact, a Nested diagram.
I disagree with both the Gemini interpretation of what a Composite diagram is as well as your assertion that it is actually a Nested Diagram.

The UML Composite Structure Diagram is a particular type of diagram that shows the internal structure of a particular namespace. EA generalizes that to include Composite behavior and allows new types of Composite diagrams to be defined in a profile. Neither requires actually being nested within in the Namespace it is documenting. EA defaults to that behavior but allows the diagram to be in another namespace, while UML doesn't have anything to say on it.

And yes, Gemini did conflate the two terms and you used that conflation to argue your point.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13495
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
I think the term "composite diagram" is a bit unfortunate as it has connotations that it probably shouldn't have.

When explaining the concept to EA users I often use "linked diagram". I explain to them that this works like a hyperlink. It is the diagram that is opened when doubleclicking on the element.
For me it does not have any other meaning, and it only exists to help us humans navigate the model.

Geert




Viking

  • EA User
  • **
  • Posts: 474
  • Karma: +2/-2
    • View Profile

Hi Takeshi, I tested v2.3.11. The mcp identifies the linked diagrams now. Many thanks.

But Copilot throws an issue:
' Sorry, your request failed. Please try again.
Copilot Request id: 37d72ba4-1757-43e8-becc-6763ef90ff8d
GH Request Id: 647D:3E781C:528352:5B6037:696F8921
Reason: Request Failed: 400 {"error" : {"message": "missing required Copilot-Vision-Request header for Vision requests","code" :""}} '

With the older version I also got this issue, but it was gone later. Any ideas?