Skip to main content
Glama
huytquocxx

bpmn-mcp

by huytquocxx

BA BPMN plugin

Draw checked BPMN diagrams from a chat. You describe a process in plain words; the assistant asks only what is missing, shows a picture, and after you approve gives you an SVG, a PNG and a .bpmn file that opens in Camunda.

Works in Claude, Codex and Antigravity. One engine, one set of skills, three thin wrappers.

How it works

What a business analyst sees. They describe a process in plain words. The assistant asks only what is missing, shows a picture for review, redraws it when asked, and writes the files once the picture is approved.

Diagram source: docs/diagrams/how-it-works-ba.mmd, drawn with Pele.

What is inside. Each AI tool only reads the same skills and starts the same small server. All the drawing happens in one engine on the user's own computer. Nothing is uploaded.

Diagram source: docs/diagrams/how-it-works-inside.mmd, drawn with Pele.

Three things make it safe to rely on:

  1. The description is data, never code. Only listed fields are accepted, and nothing in it is ever run.

  2. Every picture is checked before anyone sees it. The engine reports overlaps, crossed lines, missing ends and more, and the assistant fixes them first.

  3. The Camunda file is tested too. The .bpmn is loaded in Camunda's own viewer before the export is reported as done.

Related MCP server: MCP-GLSP

What is in this folder

Part

What it is

src/bpmn_mcp/server.py

MCP server with three tools: bpmn_setup_check, bpmn_spec_guide, bpmn_build

src/bpmn_mcp/spec.py

Turns a JSON diagram description into a drawing. Data only, nothing is executed

src/bpmn_mcp/engine/

The drawing engine: layout, checks, SVG and .bpmn output

skills/

The single source of the six skills: bpmn-for-ba (the workflow) and the shortcuts bpmn-setup, bpmn-new, bpmn-change, bpmn-export, bpmn-check

.claude-plugin/

Claude plugin and marketplace manifests (the repository root is the Claude plugin)

plugins/codex/ba-bpmn/

Codex plugin. The folder name must equal the plugin name

.agents/plugins/marketplace.json

Codex marketplace file

plugins/antigravity/

Antigravity plugin

packaging.json

The repository address. The sync script pins the server to the release tag of the current version (@v0.1.0) and writes it into both hosts

scripts/sync_plugins.py

Copies skills/ into the Codex and Antigravity folders and writes their server configs

.github/workflows/, .github/dependabot.yml

The checks and tests on GitHub (Linux and Windows), code scanning (CodeQL), the weekly OpenSSF Scorecard, and weekly dependency updates

SECURITY.md

How to report a vulnerability privately, and what to expect

scripts/prepublish.py, .githooks/

The checks to run before publishing (links, text rules, tests, leak scans, a preview of the README as GitHub draws it) and a Git hook that runs them before every push

AGENTS.md, CLAUDE.md

Instructions for anyone (or any AI tool) changing this repository. CLAUDE.md only imports AGENTS.md

docs/diagrams/

The two diagrams above as Mermaid text (.mmd) and the pictures drawn from them with Pele (.svg)

docs/TRAPS.md

Numbered list of problems that cost real time, and why the code looks the way it does

examples/leave_request.json

A worked example

tests/

Tests for the spec, the server, the new BPMN elements, the browser helper and the packaging

Install

Status: these commands follow each tool's documentation and the draw.io plugin, but none has been run in the real tool yet. See "What has been tested, and what has not" below.

You need uv (a small helper that runs Python programs) and Chrome or Edge (for the PNG and the Camunda check).

Tool

Commands

Claude

/plugin marketplace add huytquocxx/ba-bpmn, then /plugin install ba-bpmn@ba-bpmn

Codex

codex plugin marketplace add huytquocxx/ba-bpmn, then codex plugin add ba-bpmn@ba-bpmn

Antigravity

agy plugin install https://github.com/huytquocxx/ba-bpmn/tree/main/plugins/antigravity

Then start a new chat and say "set up the BPMN tools" (or use the bpmn-setup shortcut, for example /ba-bpmn:bpmn-setup), and describe a process.

How the server starts differs: Claude runs it from the plugin's own folder (${CLAUDE_PLUGIN_ROOT}). Codex installs a self-contained copy of its folder and Antigravity documents no folder variable, so both run uvx --from <source> bpmn-mcp, with the source set in packaging.json.

What it needs on the computer

  • uv (or Python 3.10+ with pip install .)

  • Chrome or Edge, only for the PNG and the Camunda import check. Set BPMN_BROWSER if it is not found, and BPMN_BROWSER_ARGS to give it extra flags (for example --no-sandbox on a locked-down Linux machine).

What has been tested, and what has not

Claim

Status

The engine draws, checks and exports (SVG, PNG, .bpmn)

Tested: 80+ automated tests, and every picture looked at

The .bpmn loads in Camunda's own viewer (bpmn-js)

Tested: "imported, 0 warnings"

The server starts through its bpmn-mcp command and works when an AI tool launches it

Tested on Windows with a Python client

It runs on Linux and on Python 3.10

Tested on GitHub: Ubuntu and Windows, Python 3.10 and 3.13, the checks and 110 or 111 tests on each (the one Linux skip is a Windows-only test)

The file opens in Camunda Modeler itself

Not tested

Install and use in Claude

Not tested (manifests follow Anthropic's documentation)

Install and use in Codex

Not tested (follows the draw.io plugin and the Codex checks of sebahrens/bpmn-mcp)

Install and use in Antigravity

Not tested (follows the draw.io plugin and Google's docs; paths differ between sources)

uvx fetches and starts the server from the repository

Not tested yet

Business analysts can install and use it without help

Not tested; planned pilot

What it draws

Start and end events (an end can be an error), intermediate catch events, boundary timer, message and error events; user, service, send, receive, manual and script tasks with their type icons; collapsed sub-processes; decision, parallel and inclusive gateways; pools, lanes, message flows, link connectors, annotations. Not yet: event-based and complex gateways, expanded sub-processes, signal and escalation events, data objects, loop and multi-instance markers.

Privacy

Files are written on your own computer, under the folder the assistant was started in. Nothing is uploaded.

Security

To report a problem privately, see SECURITY.md.

What is checked, so you do not have to take it on trust:

  • Every change runs the same checks and the whole test suite on Linux and Windows (.github/workflows/check.yml).

  • CodeQL, GitHub's code scanner, reads the Python, JavaScript and workflow files on every change and every week.

  • OpenSSF Scorecard grades the repository's habits every week. The results are in the repository's Security tab and are not published anywhere else.

  • Dependabot proposes dependency updates weekly. Secret scanning and push protection are on.

  • GitHub Actions are pinned to full commit ids, the workflows have read-only access, and the server the Codex and Antigravity plugins start is pinned to the release tag of the version you install.

Develop

pip install -e ".[test]"
pytest --cov=bpmn_mcp.spec --cov=bpmn_mcp.server
python scripts/sync_plugins.py          # after editing skills/ or packaging.json
python scripts/sync_plugins.py --check  # fails if the host folders drifted
python scripts/prepublish.py --preview  # every check before publishing, and a preview of the README
python scripts/prepublish.py --install-hook  # once per clone: run the checks before every git push

Known limits and open items

  • Not yet run in the real tools. The Claude, Codex and Antigravity installs, and uvx start-up, have not been tried on a clean Windows laptop. The plugin formats were checked against the draw.io plugins and the Codex checks of sebahrens/bpmn-mcp, not against a running Codex or Antigravity.

  • Headless Edge or Chrome hangs now and then (about 2 in 15 calls in testing). The engine retries once.

  • The bundled bpmn-js viewer is used unmodified under the bpmn.io licence. See THIRD_PARTY_NOTICES.md.

  • Maintainers: see AGENTS.md for the release steps and docs/TRAPS.md for known pitfalls.

Available Tools

3 tools
bpmn_buildA

Lay out and check a diagram, and write the files.

spec: the diagram as a JSON object (see bpmn_spec_guide). name: file name without extension (letters, digits, - and _). out_dir: folder under the current working folder for the outputs. stage: "svg" = checks plus SVG only (use while drafting); "all" = also PNG, .bpmn and the Camunda import check (use only after the user approved the drawing). preview: also write a look-at-it PNG (svg stage) or a Camunda preview (all stage).

Returns ok, errors (fix every one and build again), warnings, files (relative paths) and the log.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNodiagram
specYes
stageNosvg
out_dirNobpmn-output
previewNo

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the load and does well: it discloses filesystem writes, where outputs land (out_dir under the current working folder), what stage 'all' additionally produces (PNG, .bpmn, Camunda import check), and the full response shape (ok, errors, warnings, files, log). It does not say whether existing files are overwritten or what permissions/setup are needed, which is the remaining behavioral gap for a write tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One lead sentence followed by terse per-parameter lines and a returns line, with no filler. The most decision-critical constraint (draft vs. approved stages) is stated inline where the agent will look for it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter tool with an unconstrained nested spec object and no output schema, the description supplies the return fields and behavioral constraints, and correctly offloads spec structure to bpmn_spec_guide. It is nearly complete, but the absence of any mention of bpmn_setup_check leaves the workflow entry point ambiguous.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet every one of the five parameters is explained beyond its name: spec is the JSON object defined in bpmn_spec_guide, name is the extensionless file name with an allowed character set, out_dir is resolved under the current working folder, stage enumerates its two values with intent, and preview is defined separately for each stage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names concrete verbs and resource: 'Lay out and check a diagram, and write the files' — an agent knows exactly what comes out. It also differentiates itself from bpmn_spec_guide by delegating spec format there ('see bpmn_spec_guide').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The stage parameter carries explicit when-to-use guidance: 'svg' = 'use while drafting', 'all' = 'use only after the user approved the drawing', and the return line instructs 'fix every one and build again'. The one gap is that the sibling bpmn_setup_check (a likely prerequisite) is never mentioned, so the ordering relative to it must be inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

bpmn_setup_checkA

Check that this computer can draw diagrams. Writes nothing.

Returns plain-language findings. Run this when a user asks to set up, or when a build fails with a browser error.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations present, the description carries the full burden, and it does disclose that the tool writes nothing and returns plain-language findings — useful safety and output-shape context. It does not say what specific checks are performed, what prerequisite tooling is inspected, or whether it suggests remediation when something is missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded: the core purpose and the non-mutating guarantee come first, followed by the usage triggers. The line breaks make it slightly fragmentary, but every sentence carries information and none is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter diagnostic with no output schema and no annotations, the agent has what it needs to decide to call it and to expect plain-language findings rather than structured data. The only gap is detail on what is actually verified and whether a failure implies a concrete fix.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to disambiguate. The baseline of 4 applies, and the description correctly implies no inputs are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a concrete verb and target: verifying that the machine is able to draw diagrams. 'Writes nothing' further scopes it as a non-mutating preflight check, which distinguishes it from bpmn_build. It stops short of naming the sibling tools explicitly, so it isn't maximally differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Two clear triggering conditions are given: when a user asks to set up, and when a build fails with a browser error. That is real when-to-use guidance tied to observable situations. There is no explicit 'do not use when' or direct pointer to bpmn_build / bpmn_spec_guide as the next step.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

bpmn_spec_guideA

Return the diagram spec format, layout rules and the fixes for each check error.

Read this before the first bpmn_build call.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the behavioral load, and for a zero-parameter reference tool it does: it makes clear this returns static guidance content rather than mutating or querying anything. It omits any statement about statelessness/caching or response size, which are the only remaining unknowns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, zero filler, and the content summary is front-loaded ahead of the call-timing instruction. Nothing could be cut without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and no parameters, the description need not explain return values, and it correctly focuses on what the guide contains and when to read it. The only thin spot is that it doesn't say whether to re-read it after a check fails or how it relates to bpmn_setup_check.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes no parameters, so there is nothing for the description to disambiguate; baseline 4 applies. The description correctly implies a no-argument call by giving no input requirements.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific action (return) and concrete content (diagram spec format, layout rules, per-error fixes), so an agent knows exactly what this tool yields. It implicitly separates itself from bpmn_build by telling the agent to read this first, but never contrasts with bpmn_setup_check, the other sibling in the same family.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Read this before the first bpmn_build call" gives an explicit trigger point for invoking the tool. The mention of "fixes for each check error" also implies a second use case after a failing check, though neither exclusion nor a re-read rule is stated outright.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedbpmn_build
    • First observedbpmn_setup_check
    • First observedbpmn_spec_guide

TDQS

A4.1/5.0

Scored across 3 tools

Disambiguation5/5

Each tool occupies a distinct stage of a single workflow: environment check, spec reference, and build. There is no overlap in purpose, and descriptions explicitly state when to use each (e.g. read the guide before the first build).

Naming Consistency4/5

All three share a clear bpmn_ prefix, giving a predictable namespace. The suffixes mix noun forms (spec_guide, setup_check) with a bare verb (build), a minor deviation from a strict verb_noun pattern but still readable.

Tool Count4/5

Three tools is thin but justified for a narrowly scoped diagram-generation server, with each tool earning its place. A separate validate-only tool could arguably be split from bpmn_build, but the current split is defensible.

Completeness4/5

The surface covers the full draft-to-approved lifecycle (setup check, spec guide, staged build with checks and preview). Gaps are minor: there is no way to inspect or re-validate an existing .bpmn file or list prior outputs without rebuilding.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables AI agents to create, manipulate, and manage BPMN 2.0 diagrams programmatically, with support for Mermaid conversion, auto-layout, and file persistence.
    24
    13
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables AI-driven graphical diagram creation and manipulation using natural language, with support for BPMN workflows, analysis, and manual editing via the Model Context Protocol.
    1
    MIT
  • F
    license
    C
    quality
    B
    maintenance
    Enables generating BPMN 2.0 process models from natural language descriptions, YAML, or images via OCR, with templates, validation, and compatibility with tools like Bizagi Modeler and Camunda Modeler.
    41
    -