bpmn-js-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HTTP_PORT | No | Host port where nginx is published (inside the container it's 8080). | 8080 |
| IMAGE_TAG | No | Tag of the images generated by compose. | latest |
| BPMN_MCP_TOOLS | No | core exposes only the 10 most used tools. | full |
| MCP_AUTH_TOKENS | Yes | Accepted tokens, comma-separated, each with ≥ 32 characters. Empty or short: the app refuses to start (on purpose). One token per team/user makes revocation easier. | |
| MCP_MAX_SESSIONS | No | MCP sessions open at the same time. Above this: 503. | 50 |
| MCP_MAX_BODY_BYTES | No | Maximum request body (4 MB). Matches nginx's client_max_body_size. | 4194304 |
| MCP_ALLOWED_ORIGINS | No | Browser origins allowed to call /mcp. Desktop/CLI clients do not send Origin and work with the default. | |
| BPMN_MCP_MAX_DIAGRAMS | No | Diagrams per session; when exceeded, the oldest is discarded. | 20 |
| MCP_SESSION_IDLE_MINUTES | No | Inactivity until the session (and its diagrams) is discarded. | 30 |
| MCP_MAX_CONCURRENT_REQUESTS | No | Calls processed in parallel (CPU work). Above this: 503 with Retry-After. | 8 |
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 publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create_bpmn_diagramA | Create a new BPMN diagram: blank, cloned from an existing diagram (cloneFrom), or imported from existing BPMN XML (xml or filePath). Returns a diagram ID that can be used with other tools. For an xml/filePath import, if the XML lacks diagram coordinates (DI), auto-layout is applied; use autoLayout to force or skip it. Warning: Forcing autoLayout: true on diagrams that already have DI coordinates may reposition elements and can affect boundary event placement — for diagrams with boundary events, subprocesses, or complex structures, prefer autoLayout: false (or omit it to use auto-detection). An xml/filePath import creates a fresh modeler with an empty undo/redo history; combine with export_bpmn filePath to implement an open→edit→save workflow. Use draftMode: true to suppress lint feedback during incremental construction. |
| add_bpmn_elementsA | Add one or more elements (tasks, gateways, events, etc.) to a BPMN diagram; a single element is an array of one. With connect "chain" (default) each element is connected to the previous one by a sequence flow (afterElementId attaches the first one after an existing element) and the diagram is laid out; with connect "none" they are only added, each placed right of the previous one. Chains containing a gateway are not auto-connected past it — wire branches with connect_bpmn_elements. An entry that sets its own anchor or position (hostElementId, flowId, fromElementId + toLaneId, copyFrom, afterElementId, x/y) is placed there instead of being chained, and then auto-layout is off unless autoLayout is true. Supports boundary events via hostElementId, inserting into a flow via flowId, and cross-lane handoff via fromElementId + toLaneId. Subprocesses are expanded by default (isExpanded=false for collapsed). Generates descriptive element IDs when a name is provided (e.g. UserTask_EnterName). See bpmn://guides/modeling-elements for naming conventions, integration patterns, and event subprocess guidance. |
| connect_bpmn_elementsA | Connect BPMN elements. Supports pair mode (sourceElementId + targetElementId), chain mode (elementIds array for sequential connections), or batch mode (connections array for arbitrary source/target pairs, e.g. a gateway's branches with per-branch conditions). Auto-detects connection type: SequenceFlow for normal flow, MessageFlow for cross-pool, Association for text annotations, and DataAssociation for data objects/stores. Supports optional condition expressions for gateway branches and isDefault flag for gateway default flows. To modify an existing connection's label or condition after creation, use set_bpmn_element_properties with the connection's ID. Also supports waypoint mode: provide connectionId + waypoints to set custom routing on an existing connection. |
| delete_bpmn_elementA | Remove one or more elements or connections from a BPMN diagram. Supports single deletion via elementId or bulk deletion via elementIds array. |
| move_bpmn_elementA | Move, resize, or reassign an element to a lane. Any combination of x/y (absolute move), width/height (resize, top-left preserved), and laneId (auto-centered) — at least one required. For several elements at once, pass |
| export_bpmnA | Export a BPMN diagram as XML, SVG, PNG, an animated GIF/APNG/MP4/WebP, or a standalone interactive HTML embed, and write it to a file. By default, runs bpmnlint and blocks export if there are error-level lint issues. Set skipLint to true to bypass validation. Optionally scope to a subprocess or participant via elementId (xml/svg/both only). Use format 'both' to get XML and SVG in a single call. PNG/animated/HTML formats always write to filePath (required for those formats) rather than inlining. Animated formats render token-simulation driven by an optional TOML scenario (see the executable-Camunda-7 guide resource); omit scenario to use the diagram's own default. gif/apng/mp4/webp/html require optional dependencies (gifenc or ffmpeg for encoding, smol-toml for scenario parsing) — errors name the missing one. The exported text content is also returned in the response, unless it is large — beyond a size threshold, xml/svg/both return a bpmn://diagram/{id}/xml or /svg resource_link plus a short summary instead of the full text; pass inline: true to force full text regardless of size. Binary/HTML formats return a confirmation only. |
| list_bpmn_elementsA | List elements in a BPMN diagram with their types, names, positions, connections, and properties. Supports optional filters to search by name pattern, element type, or property value. When no filters are given, returns all elements — unless the diagram is large, in which case an unfiltered call returns a type-count summary plus a bpmn://diagram/{id}/elements resource_link instead (pass inline: true to force the full list). Pass elementIds to inspect specific elements in full detail (all properties, extension elements, connections, event definitions) instead — ignores the other filters, one or several elements per call. |
| set_bpmn_element_propertiesA | Set BPMN or Camunda extension properties on an element. Supports standard properties (name, isExecutable, documentation, default, conditionExpression) and Camunda extensions with camunda: prefix (e.g. camunda:assignee, camunda:class, camunda:type, camunda:topic). Also handles: scriptFormat/script on ScriptTask, camunda:connector, camunda:field, camunda:properties, camunda:retryTimeCycle, isExpanded on SubProcess, and cancelActivity on BoundaryEvent (false = non-interrupting). See bpmn://guides/element-properties for the full property catalog by element type. Supports optional elementType to replace the element type (e.g. bpmn:Task → bpmn:UserTask). Also accepts optional sub-objects for other concerns, settable together with properties in one call: inputOutput, formData, listeners, callActivityVariables, loop, eventDefinition. To update several elements in one call — e.g. setting camunda:assignee on every task in an executable process — pass |
| delete_bpmn_diagramB | Remove a diagram from the in-memory store. |
| list_bpmn_diagramsA | List all diagrams or get a detailed summary of one. When called without diagramId, lists all diagrams in memory with their IDs, names, and element counts. When diagramId is provided, returns a lightweight summary: process name, element counts by type, participant/lane names, named elements, and connectivity stats. When both diagramId and compareWith are provided, returns a structured diff between the two diagrams (additions, removals, and changes). |
| validate_bpmn_diagramA | Validate a BPMN diagram using bpmnlint rules. Returns structured issues with rule names, severities, element IDs, documentation URLs, and fix suggestions (concrete MCP tool calls to resolve each issue). Uses bpmnlint:recommended by default with tuning for AI-generated diagrams. Supports custom config overrides. |
| align_bpmn_elementsA | Align or distribute selected elements. Supports two operations: (1) align — align elements along an axis (left, center, right, top, middle, bottom), requires at least 2 elements. Use compact=true to also redistribute with ~50px gaps. (2) distribute — evenly distribute elements horizontally or vertically using edge-to-edge spacing, requires at least 3 elements. Use gap for exact pixel spacing (recommended: 50). ⚠️ Warning: |
| layout_bpmn_diagramA | Automatically arrange elements in a BPMN diagram using bpmn-auto-layout, producing a clean left-to-right layout with orthogonal connections and placed labels. Handles parallel branches, reconverging gateways, loops, boundary events, subprocesses, pools, lanes, message flows, and artifacts. Use this after structural changes (adding gateways, splitting flows) to automatically clean up the layout. The whole layout is a single undo step in bpmn_history. Use dryRun to preview changes before applying them. Use labelsOnly: true to only adjust label positions without moving elements. Partial layout: pass scopeElementId to re-layout only one participant/subprocess, or elementIds to re-layout only a set of sibling elements (e.g. a newly added branch); the rest of the diagram is left unchanged and connections crossing the boundary are re-routed. Elements positioned with move_bpmn_element are pinned and keep their position until the next full layout. |
| bpmn_historyA | Undo or redo changes on a BPMN diagram. Uses the bpmn-js command stack to reverse or re-apply operations. Supports multiple steps. Note: layout operations (layout_bpmn_diagram) bypass the command stack for boundary event repositioning and the normaliseOrigin fallback — these specific changes cannot be undone. |
| batch_bpmn_operationsA | Execute multiple BPMN operations in a single call, reducing round-trips. Operations run sequentially. By default, execution stops on first error (set stopOnError: false to continue). When stopOnError is true (default), all changes are rolled back on failure using the bpmn-js command stack. Nested batch calls are not allowed. |
| manage_bpmn_root_elementsA | Create or update shared root-level bpmn:Message and bpmn:Signal definitions. These shared definitions can be referenced from multiple event definitions across the diagram via messageRef/signalRef in set_bpmn_element_properties's eventDefinition sub-object. |
| create_bpmn_lanesA | Create lanes (swimlanes) within a participant pool. Creates a bpmn:LaneSet with the specified lanes, dividing the pool height evenly (or using explicit heights). Lanes represent roles or departments within a single organization/process. Use lanes for role separation within one pool; use separate pools (participants) for separate organizations with message flows. Requires at least 2 lanes when defined manually. Alternatively, use distributeStrategy to auto-generate lanes: "by-type" groups elements into Human Tasks vs Automated Tasks lanes; "manual" uses elementIds in each lane definition to assign elements explicitly. Use assignments ([{ laneId, elementIds }]) to assign existing elements to existing lanes, or strategy (role-based | balance | minimize-crossings, with dryRun/validate) to redistribute elements across existing lanes. These forms are mutually exclusive. Use mergeFrom to convert a multi-pool collaboration into a single pool with lanes (elements are moved, message flows become sequence flows). |
| create_bpmn_participantA | Create participant(s) (pools) in a BPMN diagram. Single pool: pass name. Wrap existing process: set wrapExisting=true. Multi-pool collaboration: pass participants array (min 2). Camunda 7: only one pool is executable; additional pools must be collapsed. For role separation within one organization, use lanes inside one pool — not multiple expanded pools. |
| analyze_bpmn_lanesA | Analyze lane organization in a BPMN diagram. Three modes: 'suggest' — analyze tasks and suggest optimal lane assignments based on roles (camunda:assignee/candidateGroups) or element types (human vs automated). Returns structured suggestions with lane names, coherence score, and reasoning. 'validate' — check if current lane assignment makes semantic sense by analyzing cross-lane flow frequency, zigzag patterns, single-element lanes, and overall coherence. Returns structured issues with fix suggestions. 'pool-vs-lanes' — evaluate whether a collaboration should use separate pools (different organizations/systems) or lanes (role separation within one organization). Returns recommendation with confidence and reasoning. Read-only; to assign or redistribute elements use create_bpmn_lanes. |
| list_bpmn_process_variablesA | List all process variables referenced in a BPMN diagram. Extracts variables from form fields, input/output parameter mappings, condition expressions, script result variables, loop characteristics, call activity variable mappings, and Camunda properties (assignee, candidateGroups, etc.). Returns each variable with its read/write access pattern and the elements that reference it — unless the diagram references a lot of variables, in which case it returns just the names plus a bpmn://diagram/{id}/variables resource_link (pass inline: true to force the full list). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| executable | Model an executable Operaton / Camunda 7 process as a flat process without a participant pool. Suitable for simple deployable workflows. |
| executable-pool | Model an executable Operaton / Camunda 7 process wrapped in a participant pool, optionally with swim lanes for role separation and collapsed partner pools for external system documentation. |
| collaboration | Model a non-executable collaboration diagram for documentation purposes. Multiple expanded pools show how different organisations or systems interact via message flows. Not intended for engine deployment. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| All diagrams | List of all 0 in-memory BPMN diagrams |
| Executable Camunda 7 / Operaton guide | Constraints, conventions, and best practices for building executable BPMN processes targeting Camunda 7 (Operaton). Covers deployment, task types, forms, and common pitfalls. |
| BPMN element modeling guide | Best practices for choosing element types, naming conventions, boundary events, subprocesses, event subprocesses, and service integration patterns. |
| Camunda element properties reference | Complete catalog of supported standard BPMN and Camunda extension properties organized by element type, with examples. |
| Interactive diagram viewer (MCP Apps) | Self-contained interactive bpmn-js view. Referenced via `_meta.ui.resourceUri` on mutating tools (issue #11 / ADR-025) — MCP Apps-capable hosts render it inline instead of (or alongside) each tool's plain text/image response. |
TDQS
Scored across 20 tools
Most tools have clearly distinct resource+action targets (create/add/delete/move/connect elements, manage diagrams/pools/lanes, validate/export). Some potential overlap exists between add_bpmn_elements (which can chain-connect) and connect_bpmn_elements, and between align_bpmn_elements and layout_bpmn_diagram, but the descriptions explicitly clarify boundaries.
Names follow a consistent verb_bpmn_noun pattern (e.g., create_bpmn_diagram, add_bpmn_elements, set_bpmn_element_properties). Exceptions like bpmn_history (no verb, reversed order) and export_bpmn (no noun) are minor and remain readable.
20 tools is on the heavy side, but the domain—full BPMN modeling, layout, validation, export, and analysis—justifies the breadth. Each tool covers a distinct, non-trivial capability, though a few read-only analyzers could theoretically be folded into list or validate tools.
The surface covers create/read/update/delete for diagrams, elements, connections, pools, lanes, and properties, plus validation, export, history, and batch operations. Minor gaps include no explicit tool to rename/update diagram metadata or delete shared root elements, but agents can work around these.