bpmn-pilot
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PGID | No | Group the server runs as, and that owns the data folder (1000 by default). | |
| PUID | No | User the server runs as, and that owns the data folder (1000 by default). | |
| MCP_AUTH | No | `off` opens `/mcp` without a token under a name other than localhost. Only on a network you trust, or behind a proxy that authenticates `/mcp`. | |
| SHOWCASE | No | `off` turns off the showcase page (`about.html`) and its wallpapers. The logo in the toolbar then opens the Feedback window. `on` by default. | on |
| BPMN_BIND | No | Network interface the site listens on (`127.0.0.1` by default). `0.0.0.0` opens it to your network, without HTTPS. | |
| BPMN_PORT | No | Port of the site (8080 by default). | |
| MCP_TOKEN | No | Token that agents must send. The "Connect an agent" window generates one. Required when MCP_ALLOWED_HOSTS holds a name other than localhost. | |
| BPMN_DATA_DIR | No | Folder of the server files, My diagrams and exports (`./bpmn-data` by default). In a container manager, an absolute path. | |
| OPENAI_API_KEY | No | API key for the AI co-pilot (OpenAI). See mcp/.env.example. | |
| MISTRAL_API_KEY | No | API key for the AI co-pilot (Mistral). See mcp/.env.example. | |
| ANTHROPIC_API_KEY | No | API key for the AI co-pilot (Anthropic). See mcp/.env.example. | |
| MCP_ALLOWED_HOSTS | No | The name of the site when it is served under a domain name. | |
| BPMN_EDITOR_ORIGINS | No | The address of the site when it is served under a domain name. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server drives a BPMN editor (bpmn-js) open in the user's browser. Every change shows up live on their canvas and can be undone with Ctrl+Z.
Recommended method:
Call get_shapes to learn the current diagram.
For a linear sequence, add_shapes with "after": the shape is placed to the right of the previous one and connected automatically.
For branches and loops back, add_shapes then connect_shapes.
Read the diagram again with get_shapes to check. get_diagram_image shows how it actually looks.
When the drawing is complete, call auto_layout: it places every shape and connection cleanly, pools and lanes included.
Finish with validate_diagram and fix the reported errors.
Pools and lanes: create each Participant first (add_shapes with x and y, one under the other), then its lanes, from top to bottom (type Lane, parent: the participant id), then the shapes with parent: the lane id. Connect shapes of two different participants with connect_shapes: it creates a message flow. Do not worry about exact positions: auto_layout tidies everything at the end.
Deadlines and exceptions on a task: add a boundary event with attachTo (for example a timer "3 days"), then draw the exception path from it with "after".
Size guide: task 100×80, event 36×36, gateway 50×50. The x and y coordinates are the centre of the shape. Colors and text formatting: style_elements sets the fill, stroke, text color and font of shapes and connections. Use them sparingly and consistently, for example one color per actor or to highlight an exception path. To start from scratch or import a complete diagram, use set_diagram_xml. When the user asks for a file (BPMN, SVG, PNG or PDF), use export_diagram. To read the diagram yourself, use get_diagram_xml or get_diagram_image instead.
Process analysis: get_process_report gives the findings, and with simulate the token counts per element and per gateway branch. Gateway branch probabilities are set with update_elements (probability, in %); the branches of one gateway add up to 100. They are marked as proposed by the AI until the user reviews them. set_report_commentary stores your analysis of the process (summary, bottlenecks, rare paths, risks, improvements) in the diagram file: it appears in the process report, under your name. Base each point on the report's figures.
Modeling rules (validate_diagram checks most of them):
Every process has a start event and at least one end event. Use a single blank start event per process.
Name every task, event, splitting gateway, pool and lane, in the user's business words, not technical terms.
Task: verb + object ("Check invoice"). Avoid vague verbs such as handle, process or manage.
Event: object + state reached ("Invoice received", "Order shipped"). End events name the result.
Exclusive gateway: a question ("Amount over 1000?"). Label each outgoing flow with an answer ("Yes", "No").
Never give a task two outgoing flows: split with a gateway. Never merge flows into a task: join them with a gateway.
A gateway either splits or joins, never both. Close a parallel split with a parallel join.
Do not name parallel gateways or joining gateways.
Put the happy path on a straight line from left to right, with exceptions below it.
Exceptions on a task: a boundary event (timer, error, message), not a gateway after the task.
Lanes only when the user names roles or departments. Separate organizations are separate pools linked by message flows.
No retry loops for technical failures. A loop back is for a business reason ("Correct the request").
Keep default sizes. Use color only to convey meaning, and say what it means.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_shapesA | Lists the elements of the open diagram: shapes (id, type, name, position, parent, incoming and outgoing flows) and connections (id, type, name, source, target). |
| get_diagram_xmlA | Returns the open diagram as BPMN 2.0 XML. |
| get_diagram_imageA | Returns a PNG image of the open diagram, as drawn on the canvas. Use it to check the layout visually (overlaps, crossing flows, readability), or to show the diagram to the user. |
| export_diagramA | Exports the open diagram as a file, exactly like the editor's Export menu: bpmn (BPMN 2.0 XML), svg, png (2x, white background) or pdf (vector). When the editor runs with its server, the file is saved in the exports folder of the server; an existing file is never replaced ("Name (2).pdf" is added next to it). The editor also shows the user a Download button: nothing is downloaded unless they click it. The file content is not returned. Use it only when the user asks for a file. |
| set_diagram_xmlA | Replaces the whole open diagram with the given BPMN 2.0 XML. The user can undo it in one step, but not the earlier changes one by one. |
| add_shapesB | Adds one or more shapes. With "after", the shape is placed to the right of the given element and connected to it. With x and y, it is placed at that position without a connection. With neither, it is placed to the right of the diagram. A Lane is added at the bottom of its participant, which grows to make room. Returns the id created for each shape, and for each "key" given. |
| connect_shapesA | Creates connections between existing shapes. The type follows the BPMN rules: sequence flow within a process, message flow between participants, association to an annotation. Returns the id of each connection. |
| update_elementsA | Renames elements, changes their type (for example Task to UserTask), fills in their Documentation field, or sets the probability of a gateway branch. A type change can produce a new id, returned in the result. |
| style_elementsA | Sets the colors and text formatting of shapes and connections, like the editor's Shape and Text panels. Each field is optional: only the fields given change. An empty string removes that setting. Colors are hexadecimal, for example #1E88E5. A connection only has a stroke. For a dark fill, set textColor to "auto" (or #FFFFFF) so the label stays readable. reset: true removes every color and text formatting of the element first. Returns the resulting style of each element. The user can undo it in one step. |
| auto_layoutA | Recalculates the position of every shape and the route of every connection, like the editor's "Tidy up" button. Handles pools, lanes, message flows, boundary events, expanded subprocesses, annotations and groups. Colors are kept. Returns the layout warnings, if any. The user can undo it in one step. |
| validate_diagramA | Checks the diagram and returns a report. Six checks: the XML is well formed; every element and attribute exists in the BPMN 2.0 metamodel; references resolve, ids are unique and each flow stays in its scope (sequence flows inside their process, message flows between two pools); every element is drawn (diagram interchange complete); bpmn-js reimports the document without warnings; the recommended bpmnlint rules raise no error (isolated element, missing start or end event, element without a label, superfluous gateway…). Returns the element counts, each check with its problems, the number of errors and warnings, and the bpmnlint issues with the id of the element concerned, the rule and the message. |
| remove_elementsC | Removes shapes or connections. Removing a shape also removes its connections. |
| get_process_reportA | Returns the process report of the open diagram, in Markdown, as the editor's Export menu produces it: key figures, modeling findings by level (error, warning, to complete) with their source (bpmnlint, model check, simulation), improvement areas by priority with the expected effect, end events, activities by lane, and the element sequence (type, lane, documentation, outgoing flows with their conditions). Use it to review a model, write a procedure, or propose improvements; the improvement areas you add are your own analysis, to be validated by the process owner. |
| set_report_commentaryA | Stores your analysis of the process in the diagram file, where the process report shows it in a section of its own, marked as written by the AI co-pilot, with your name and the date. It replaces the previous analysis. Read get_process_report (with simulate for token counts) first, and base each point on its findings and figures. Each point has a kind: bottleneck (an activity or path most instances go through, or that repeats), rare_path (a branch or end seldom or never reached), risk (a missing exception, a dead end, a gap in the model), or improvement (a concrete change and its expected effect). Cite the elements concerned by id. Write in the language of the user. An empty summary with no points removes the analysis. The user can undo it with Ctrl+Z. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| model_process | Draws a process in the open editor from a text description, following the modeling rules. |
| model_collaboration | Draws one pool per organization or actor, with message flows between them, from a text description. |
| review_diagram | Reviews the open diagram against the modeling rules and the validator, without changing anything. |
| tidy_diagram | Renames elements to the naming conventions, fixes validation errors and lays the diagram out, keeping its meaning. |
| critique_description | Lists what is ambiguous or missing in a process description before drawing it, with a severity, the passage concerned and a question. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Each tool has a distinct verb+target, and the descriptions explicitly disambiguate the close pairs: get_diagram_xml vs export_diagram(bpmn) (string vs file), get_diagram_image vs export(png) (view vs saved file), and validate_diagram vs get_process_report (validation report vs editorial process report). The only residual overlap is between report-oriented tools (validate/process_report/set_report_commentary), but the descriptions make the boundaries clear.
Nearly all names follow a clean verb_noun pattern (get_shapes, add_shapes, connect_shapes, remove_elements, style_elements, validate_diagram). auto_layout is the one deviation from the verb_noun convention, and the _diagram/_elements/_shapes suffixes are used consistently enough to be predictable.
14 tools is well within the ideal 3-15 range and each maps to a real editor capability (read, write, mutate, style, layout, validate, export, report). No tool feels redundant or filler-like.
Covers the full lifecycle: read XML/image, set XML, add/connect/update/remove elements, style, layout, validate, export, and report. The main gap is that there is no way to reposition or resize an individual shape (only whole-diagram auto_layout or position at creation), which could force an agent into heavier-than-needed rewrites.