/m:os stock and flow mapper
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@/m:os stock and flow mappervalidate my garden.json and export an SVG stock-and-flow map"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
/m:os systems mapping
Free systems mapping for practitioners and students: a local-first SystemicWorks visual editor, a CLI, and an MCP server. The visual editor is based on SystemicWorks and its causal-loop diagramming canvas. The /m:os data model and CLI also describe stocks, material flows, causal variables, evidence, and feedback loops. No LLM provider key is required.
Hosted MCP
Connect your MCP client to https://mos-stock-flow-mcp.vercel.app/mcp. This is the shared /m:os service; users do not need to deploy it. It uses stateless Streamable HTTP and does not save or log submitted model content. See the service page and host connection guide.
Related MCP server: Vensim MCP
Install CLI and local MCP
Install the published CLI directly from npm:
npm install --global @jsagir/mos-stock-flow-mcp
mos-flow init -o garden.jsonThe package includes the prebuilt visual editor, CLI, and MCP server, so users do not need TypeScript or a local build toolchain. For a local MCP client, set its server command to mos-mcp.
The npm registry currently serves version 0.2.0; this checkout's SystemicWorks replacement is newer and has not been released to npm. From this checkout, build with npm ci && npm run build, then run node dist/cli.js app. The npm install command will pick up this editor after the next package release.
Run the visual editor entirely on your computer:
mos-flow appOpen the printed 127.0.0.1 URL. Projects autosave to that browser's IndexedDB using RxDB and its free Dexie adapter. The app does not require an account or remote database. Stop the local server with Ctrl+C.
Local MCP setup
From a downloaded or cloned project directory, run ./install.sh. It installs pinned dependencies, builds, links mos-flow, and writes .mcp.json with the local stdio MCP command. Add that entry to a client that supports local MCP servers. The installer does not rewrite client settings.
CLI quick start
mos-flow init -o garden.json
mos-flow validate garden.json
mos-flow show garden.json
mos-flow export garden.json --format svg -o garden.html- means stdin or stdout. init and export write to stdout by default; use -o FILE for explicit local writes. The hosted Streamable HTTP transport listens on /mcp; /health is a health check.
See examples/repository-delivery.html for a stock-and-flow map of this repository's own validation, hosted deployment, and npm release path. Its assumptions and evidence are recorded in the accompanying JSON. The fictional Lantern Home eCommerce example uses a Theo Agency case study as a prompt; reported case outcomes are separated from the model's hypotheses in the source JSON.
Stocks are accumulations. Flows are material/rate changes to a stock. Causal variables represent non-accumulating conditions; dashed influence links connect variables, stocks, actors, and system levels. The model format accepts existing schema 1.0 files and writes schema 1.1 when causal variables are added. Short feedback cycles are identified from the mapped links and labeled reinforcing (R), balancing (B), or unknown from their polarities. The scan is bounded for large, dense maps. These labels describe the diagram's logic, not verified real-world effects. Each claim is observed, reported, inferred, hypothesis, or unknown; missing quantities stay null/unknown.
The visual project and its canonical /m:os model save to the browser's local IndexedDB database through RxDB and the free Dexie storage adapter. No account, sync service, or remote database is required. MCP hosts can restrict storage inside embedded Apps; if that happens, Save /m:os JSON and open it in the direct localhost editor using Open /m:os JSON. The hosted MCP itself is stateless and does not store submitted model content. Cross-device replication is not enabled.
The original SystemicWorks drawing tools focus on causal-loop diagrams. When an MCP tool supplies a /m:os model, the replacement canvas renders stock accumulations as boxes, material flows as blue pipes with valve marks, and causal influences with polarity signs; the side panel preserves rates, evidence, actors, levels, assumptions, and feedback loops. This structural map does not calculate stock levels over time. Direct manual creation/editing of stock and flow types and numerical simulation remain future extensions; the /m:os CLI and MCP model tools already validate and export the full model.
The workflow is a PWS-informed proposed adaptation, not a validated PWS procedure: define boundary and purpose; map causal loops; identify stocks, flows and delays; map nested levels; then compare leverage hypotheses. Wicked problems can have disputed boundaries and no final stopping rule. A map makes claims discussable; it does not prove causation or settle disagreement. See docs/METHOD.md.
LangTalks informed implementation quality patterns through local source/code research; no live LangTalks graph MCP was available or queried.
SystemicWorks is distributed under GPL-3.0. Its upstream license and source attribution are retained in vendor/systemicworks and NOTICE.md. The /m:os additions include the local RxDB workspace, packaged CLI launch, and MCP resource integration.
Deploy your own instance
The Render button is for people who want their own isolated deployment. It is optional; the shared endpoint above is ready to connect.
MCP client configuration menus and MCP Apps rendering vary by host. See docs/INSTALL.md and docs/DEPLOYMENT.md.
Available Tools
5 toolsmodel_createB
Create a draft /m:os system model; pass a complete v1 JSON model. Returns the complete validated model.
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavior and does add some: the created model is a draft, the payload is validated, and the full model is returned. It omits permissions, what happens on conflict/invalid input, and whether drafts are later published — significant gaps for a mutation tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight clauses with the action and the argument requirement front-loaded, then the return value. Nothing redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The return value is covered in lieu of an output schema, and the draft nature is stated, but with no annotations and an opaque required parameter the definition leaves out error behavior and the draft lifecycle — enough for a knowledgeable caller, thin for a first-time agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the single 'model' parameter is an undescribed string capped at 1,000,000 chars. The description tells the agent it holds a complete v1 JSON model, which is genuinely useful, but gives no hint about the v1 schema shape or where to find it, so an agent still cannot construct a valid value from the definition alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Create') and resource ('/m:os system model'), plus a distinguishing qualifier ('draft') that separates it from model_update. The v1 format is named, though it never explicitly contrasts itself with model_validate or model_get.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'pass a complete v1 JSON model' implies the prerequisite that the payload must be a fully-formed v1 model rather than a patch, but there is no explicit when-to-use guidance or named alternative (e.g. use model_validate to check before creating).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
model_exportC
Export the supplied model as JSON or standalone inline-SVG HTML.
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| format | No | json |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. "Export" implies a read-only operation and "standalone inline-SVG HTML" hints at the serialization approach, but it never says whether the tool returns the exported content directly, a file path, or a download reference, nor whether anything is written or mutated server-side.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One well-formed sentence with zero filler, front-loading the action and the output choices. Brevity is appropriate, though the space saved could have been spent clarifying the return value or the model parameter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No annotations and no output schema exist, so the description is the only source of behavioral information, and it omits both the shape of the returned value and the meaning of the required model input. For an export/serialization tool where the result format is the whole point, these are material gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It usefully expands the bare "json"/"svg" enum by explaining that svg means "standalone inline-SVG HTML," which is genuine added meaning. However, the required "model" parameter (a string up to 1,000,000 chars) is left ambiguous — is it a model ID or the serialized model payload? — which is a significant omission an agent could get wrong.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ("Export") and resource ("supplied model") plus the output formats, which cleanly separates it from the model_create/model_update/model_validate/model_get siblings. It stops short of naming those siblings or describing the export result, but an agent can identify the tool's job from the sentence.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use or when-not-to-use guidance, no prerequisite that a model must exist or be validated first, and no instruction on how to choose between the two formats beyond listing them. Usage is inferred from the verb "Export" alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
model_getC
Validate and return the complete model supplied by the caller. This server is stateless.
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description does useful work by disclosing that the server is stateless, so no server-side state is created or mutated. It does not say what happens when validation fails (error shape, rejection vs. partial return) or how the 1,000,000-character limit is enforced.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no waste, and the core action is front-loaded before the stateless qualifier. It is efficient, though its brevity is partly the cause of the disambiguation gap rather than a sign of completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter, non-mutating tool with no output schema, the description covers the essentials of action and side effects. It still leaves the agent unsure how this differs from model_validate and what a validation failure looks like, which matters for correct selection.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% for the single 'model' string, so the description carries the burden. Saying 'the complete model' adds meaning by implying a full document rather than a partial one or an identifier, but it never states the expected encoding (JSON string? raw text?) or what 'complete' structurally requires.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb pair (validate and return) and resource (the model), but the name 'model_get' implies retrieval of a server-held entity while the description describes an echo/validate operation on caller-supplied input. It also overlaps heavily with the sibling model_validate, which is never distinguished.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no statement of when to use this instead of model_validate, model_create, or model_update, all of which appear as siblings. The only contextual hint is the 'stateless' remark, which implies nothing is persisted, but the agent must infer that on its own.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
model_updateA
Replace the active visual model with a complete updated /m:os JSON model. The server retains no model between calls.
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It usefully discloses that the server retains no model between calls and that the operation replaces the active model, but it does not explain validation failure behavior, whether the previous model is recoverable, or any permission requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no wasted language. The core replacement behavior is front-loaded, and the statelessness detail follows immediately as supporting context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter mutation tool with no annotations and no output schema, the description covers the essential replacement semantics and the stateless server model. It could be more complete by mentioning validation behavior or irreversibility, but it provides enough context for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the single `model` parameter. It adds meaningful context by requiring a complete `/m:os` JSON model rather than a partial patch, but it does not document the model structure or how validation errors should be handled.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: replace the active visual model. It also specifies the required payload format (`/m:os` JSON), which distinguishes it from model_create, model_validate, model_get, and model_export. It stops short of naming siblings explicitly, so it is clear but not maximally differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by saying it replaces the active model with a complete updated model, which suggests full replacement rather than partial update. However, it does not explicitly say when to use this versus model_create or model_validate, and it gives no exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
model_validateC
Validate a complete /m:os model and return field-specific issues.
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden. It does say issues are returned per field, but never states that this is a non-mutating/read-only check, what input format the model string takes, or what happens on a malformed payload.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One compact sentence, front-loaded with the verb and resource, with the return shape appended. No filler, but also little substance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, so the description is the only source of return information and it provides just three words ('field-specific issues'). Combined with the undocumented input format, an agent cannot confidently construct a valid call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single 'model' parameter has 0% schema description coverage, and the description only implies it is a whole /m:os model body. It does not clarify whether that string is JSON, a DSL, or reference a stored model, which is the key ambiguity for this tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Validate a complete /m:os model') and adds the outcome ('return field-specific issues'). It reads distinctly from siblings like model_create and model_get, though 'complete' is left unexplained.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no statement of when to call this instead of model_create/model_update, no note on whether validation is a prerequisite before saving, and no exclusions. Usage is only weakly implied by the verb.
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.
5 tool updates
v0.3.0- First observed
model_create - First observed
model_export - First observed
model_get - First observed
model_update - First observed
model_validate
TDQS
Scored across 5 tools
model_get and model_validate both validate and return the caller-supplied model, making their boundary unclear. model_create and model_update also overlap because both accept a complete model and the server is stateless, yet update is described as replacing an active visual model.
All tools follow a consistent model_verb pattern: model_create, model_update, model_validate, model_get, and model_export. The naming is predictable and clearly indicates the resource being operated on.
Five tools is a reasonable scope for a model validation/export helper. However, the overlap between create, update, get, and validate makes the set feel slightly larger than necessary.
The surface covers creation, update, validation, retrieval-like access, and export, but the stateless design means get is not true retrieval and there is no persistence lifecycle. Core model transformation workflows are mostly covered, but the lack of clear retrieval or reset behavior leaves notable gaps.
Related MCP Connectors
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.
Free, no-key MCP server: token estimates, JSON Schema conversion, MCP configs, tool search.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server that enables LLMs to create and edit draw.io diagrams using high-level intent commands, with automatic layout and styling.45 npm4MIT
- AlicenseAqualityDmaintenanceConverts structured system dynamics specifications into Vensim .mdl files with layout, SVG preview, static audit, and native Vensim integration. It can be used as an MCP server or from the command line.7MIT
- AlicenseBqualityCmaintenanceMCP server that enables AI assistants to create, parse, render, and validate Draw.io diagrams programmatically.1436 PyPI2MIT
- AlicenseAqualityBmaintenanceEnables MCP-capable agents to read, create, modify, align, distribute, organize and export local-first infinite whiteboard content, including sticky notes, text, shapes, arrows, ink, mind maps, images, files and links across multiple pages. Provides 16 tools over stdio or Streamable HTTP, plus resources and prompts, with version-conflict protection and audit trails so canvas edits never silently overwrite newer content.1624MIT