<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Stef Kaptein</title>
    <description>The latest articles on DEV Community by Stef Kaptein (@stefkaptein).</description>
    <link>https://dev.to/stefkaptein</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4196718%2F3f5d030b-0c36-42e4-9d52-825718fdb550.jpg</url>
      <title>DEV Community: Stef Kaptein</title>
      <link>https://dev.to/stefkaptein</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stefkaptein"/>
    <language>en</language>
    <item>
      <title>I let Claude map a business process through MCP, and it writes code instead of drawing boxes</title>
      <dc:creator>Stef Kaptein</dc:creator>
      <pubDate>Wed, 18 Nov 2026 12:23:41 +0000</pubDate>
      <link>https://dev.to/stefkaptein/i-let-claude-map-a-business-process-through-mcp-and-it-writes-code-instead-of-drawing-boxes-1lbi</link>
      <guid>https://dev.to/stefkaptein/i-let-claude-map-a-business-process-through-mcp-and-it-writes-code-instead-of-drawing-boxes-1lbi</guid>
      <description>&lt;p&gt;Ask any chatbot to "draw the invoice approval process" and you get one of two things: a picture you cannot edit, or a block of Mermaid that looks like a flowchart but is not BPMN. Either way, the result lives in a chat and dies there.&lt;/p&gt;

&lt;p&gt;We took a different route at &lt;a href="https://instantprocess.nl" rel="noopener noreferrer"&gt;Instant Process&lt;/a&gt;. Our editor already turns plain-text process code into BPMN diagrams. So we gave AI assistants a remote &lt;a href="https://modelcontextprotocol.io/" rel="noopener noreferrer"&gt;Model Context Protocol&lt;/a&gt; server, and let them write that code, compile it and render it, the same way a developer would.&lt;/p&gt;

&lt;p&gt;This post covers how it works and what we learned. The full walkthrough for process analysts, with every step of a real assignment, is on our blog: &lt;a href="https://instantprocess.nl/blog/process-mapping-mcp-server" rel="noopener noreferrer"&gt;Bring process mapping into your AI workflow with MCP&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why code beats pixels for an LLM
&lt;/h2&gt;

&lt;p&gt;Language models are good at writing structured text and bad at placing shapes on a canvas. A BPMN diagram described as code plays to that strength:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LANE Supplier
START 'Invoice sent' NEXT
LANE 'Accounts payable'
ACTIVITY-RECEIVE 'Register invoice' NEXT
GATEWAY-EXCLUSIVE 'Purchase order found?' NEXT 'Match invoice to PO' 'Yes' AND 'Ask budget holder for PO' 'No'
ACTIVITY 'Ask budget holder for PO' NEXT 'Match invoice to PO'
ACTIVITY 'Match invoice to PO' NEXT
LANE 'Budget holder'
ACTIVITY-USER 'Approve invoice' NEXT
GATEWAY-EXCLUSIVE 'Approved?' NEXT 'Schedule payment' 'Yes' AND 'Dispute with supplier' 'No'
LANE Finance
ACTIVITY 'Schedule payment' NEXT
END 'Invoice paid'
LANE 'Accounts payable'
ACTIVITY-SEND 'Dispute with supplier' NEXT
END 'Invoice disputed'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One line per node, links with &lt;code&gt;NEXT&lt;/code&gt; and &lt;code&gt;AND&lt;/code&gt;, lanes as sections. The layout engine does the rest:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm978wmxkayw2ib8lk2h2.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm978wmxkayw2ib8lk2h2.webp" alt="The invoice approval process rendered as BPMN with four lanes and two exclusive gateways" width="799" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The model never decides where a box goes, so there is no messy diagram to fix afterwards. And because it is text, a human can review the diff.&lt;/p&gt;

&lt;h2&gt;
  
  
  The loop: write, compile, render
&lt;/h2&gt;

&lt;p&gt;The important part is not the generation, it is the feedback loop. The MCP server exposes tools that let the assistant check its own work before anything is saved:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Read the spec.&lt;/strong&gt; The server ships the language specification, agent instructions and a &lt;a href="https://docs.instantprocess.nl/language/reference/cheatsheet" rel="noopener noreferrer"&gt;cheatsheet&lt;/a&gt; as resources. The assistant reads them before writing code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile.&lt;/strong&gt; &lt;code&gt;compile_process&lt;/code&gt; returns errors and BPMN warnings, such as a sequence flow between two pools or a reference to a step that does not exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix and save.&lt;/strong&gt; The assistant corrects the code and writes it with &lt;code&gt;update_process_code&lt;/code&gt; or &lt;code&gt;create_process&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Render.&lt;/strong&gt; &lt;code&gt;render_process&lt;/code&gt; returns an image the assistant shows in the chat, plus a link that opens the process in the editor.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That loop is what turns "the AI drew something" into "the AI produced a checked model". The assistant cannot save code that does not compile, and every save returns the BPMN rules the process still breaks.&lt;/p&gt;

&lt;p&gt;The server also ships four prompts that clients show as shortcuts: create a process from text, explain a process, review a process against modeling guidelines without changing it, and tidy the layout of a process.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a real session looks like
&lt;/h2&gt;

&lt;p&gt;A consultant interviews the accounts payable lead, pastes the transcript into Claude and asks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a process from this interview in my Client A / Finance folder.
Use lanes for Supplier, Accounts payable, Budget holder and Finance.
Model the missing purchase order and the rejected invoice as separate paths.
List every assumption you make.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The draft appears in their drive with a list of assumptions. In the validation session, stakeholder corrections become one-line instructions ("skip approval for invoices under 500 euro"), and the assistant reads the current code, edits it, compiles and re-renders. At the end, the client gets a link and a BPMN 2.0 XML export that opens in Camunda Modeler or bpmn.io.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://instantprocess.nl/blog/process-mapping-mcp-server" rel="noopener noreferrer"&gt;blog post&lt;/a&gt; walks through all six steps, from discovery interview to handover.&lt;/p&gt;

&lt;h2&gt;
  
  
  Auth and safety
&lt;/h2&gt;

&lt;p&gt;Letting an agent write to your data needs guardrails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OAuth per client.&lt;/strong&gt; The client signs in as you and is approved on a consent page that names it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Same permissions as the user.&lt;/strong&gt; The assistant only sees processes you may open.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read-only option.&lt;/strong&gt; Write access can be switched off at approval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Soft delete only.&lt;/strong&gt; Trashed processes stay restorable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Revocable.&lt;/strong&gt; Every connected client is listed under Account, Connected apps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The client brings its own model, so MCP work uses none of your Instant Process AI budget.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The server URL is the same for every client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://api.instantprocess.nl/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add --transport http instantprocess https://api.instantprocess.nl/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Cursor (&lt;code&gt;~/.cursor/mcp.json&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"instantprocess"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://api.instantprocess.nl/mcp"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setup for Claude, ChatGPT, Cursor, GitHub Copilot and Codex is on the &lt;a href="https://instantprocess.nl/mcp" rel="noopener noreferrer"&gt;AI assistants page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you build MCP servers yourself, I'd like to hear how you handle validation loops for generated artifacts. And if you map processes for a living, the &lt;a href="https://instantprocess.nl/blog/process-mapping-mcp-server" rel="noopener noreferrer"&gt;full walkthrough&lt;/a&gt; is written for you.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>bpmn</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
