mcp-server-systems-thinking
If you are the rightful owner of mcp-server-systems-thinking and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Systems-Thinking MCP server is designed to facilitate AI agents in submitting and iterating on systems-thinking models using a structured JSON format, ensuring comprehensive validation and atomic persistence.
Product Requirements Document (PRD)
1Â Â Objective
Deliver a SystemsâThinking MCP server that lets an AI agent submit a full systemsâthinking representation (single JSON document) over HTTP. The server validates structure, persists the latest version atomically, and returns validation gaps so the agent can iterate until the document is complete.
2Â Â Background & Motivation
Sequentialâthinking servers proved that forcing LLMs through a rigid I/O contract improves reasoning quality. We apply the same pattern to Donella Meadowsâstyle systems analysis, enabling agents to reason about boundaries, stocks/flows, feedback loops, and leverage points with minimal server logic.
3Â Â Scope
Inâscope (MVP)
- One MCP Tool:
systems_thinking_writer
(PUT/POST full JSON each time) - Validation & gap detection (hard structural checks)
- Atomic persistence of latest document (inâmemory â Postgres JSONB)
- HTTP streaming transport (FastMCP default)
- Basic observability (request logs, health endpoint)
Outâofâscope (PostâMVP)
- Soft warnings / heuristics (e.g., too many reinforcing loops)
- Fineâgrained PATCH updates
- Multiâdocument branching or version history navigation
- Roleâbased read/write permission model
4Â Â Personas & Use Cases
Persona | JobâtoâbeâDone |
---|---|
LLM Agent | Build a complete systems model iteratively; keep retrying until validation passes |
System Analyst | Fetch the current JSON document for visualization or manual review |
DevOps | Deploy and monitor the MCP service |
5Â Â Functional Requirements
5.1Â Â Tool Definition
- Name:
systems_thinking_writer
- Input: Full JSON document conforming to Zod schema
- Output:
{ complete: boolean, missing_fields: string[], inconsistency_warnings: string[] }
- Contract: Reject (HTTPÂ 422) if JSON fails schema; otherwise return validation arrays.
complete === true
only when both arrays are empty.
5.2Â Â Endpoint Behaviour
Method | Path | Body | Response |
---|---|---|---|
POST | /model | JSON doc | Validation result & copy of stored doc |
GET | /model | â | Latest stored doc |
Server overwrites existing doc on every successful POST.
5.3Â Â Validation Rules (MVP)
- Every
flow.from_stock
&flow.to_stock
must have matchingstocks.id
- Loops may reference only declared elements
- If a
leverage_point.is_applicable === true
there must be at least one matchingintervention.target_leverage_id
6Â Â Data Model (abridged)
{
"version": "1.0.0",
"system_name": "string",
"boundary": { "purpose": "string", "scope_in": [""], "scope_out": [""] },
"elements": ["string"],
"interconnections": [ { "from": "", "to": "", "type": "causal|flow|info" } ],
"stocks": [ { "id": "", "unit": "", "description": "" } ],
"flows": [ { "id": "", "from_stock": "", "to_stock": "", "rate_expr": "" } ],
"loops": {
"balancing": [ { "id": "", "description": "" } ],
"reinforcing": [ { "id": "", "description": "" } ]
},
"leverage_points": [ { "id": 12, "label": "Constants / parameters", "is_applicable": false }, ⌠],
"interventions": [ { "target_leverage_id": 4, "proposal": "âŚ", "expected_effect": "âŚ", "confidence": 0.7 } ]
}
7Â Â Architecture & Tech Stack
- Runtime: Node 20+ with TypeScript
- Framework: FastMCP (HTTP streaming transport)
- Validation: Zod (schema reused for prompts & runtime)
- Persistence: Inâmemory Map â nightly flush to Postgres (JSONB)
- Container: Dockerfile with multiâstage build (tsc compile then dist run)
- Observability: pino logs,
/healthz
endpoint for k8s liveness/readiness
Component Diagram (text)
Client Agent â FastMCP Tool â Zod Validator â InMemoryCache â Postgres
â
GapâDetection Logic
8 SystemsâThinking Tutorial (Tool Prompt Seed)
Use the following condensed guidance verbatim in the systems_thinking_writer
tool description so the AI knows when and how to use the tool:
WHEN TO USE â Call this tool any time you need a structured, Meadowsâstyle snapshot of a complex situation that clearly has interacting parts and feedback (e.g. urban traffic, product adoption, climate policy).
WHAT THE FIELDS MEAN
- boundary.purpose â the systemâs why. Deduced from observed behaviour, not rhetoric. îfileciteîturn3file4îL20-L30î
- elements & interconnections â the nouns and their physical/info links. îfileciteîturn3file9îL38-L41î
- stocks & flows â accumulations and the rates that change them. îfileciteîturn3file3îL9-L22î
- loops â balancing (B) dampen change; reinforcing (R) amplify. îfileciteîturn3file11îL12-L19î
- leverage_points â Meadowsâs 12 intervention levers, from parameters (12) to paradigm shifts (2) and transcending paradigms (1). îfileciteîturn3file2îL34-L38î
HOW TO IDENTIFY A SYSTEM A) parts exist, and B) they affect each other, and C) they create behaviour distinct from each part alone, and D) that behaviour persists over time. îfileciteîturn3file1îL18-L25î
RECOMMENDED FILLâOUT PATH
- Purpose & boundary â one sentence each.
- Elements list â nouns only.
- Interconnections â causal, flow, or info links.
- Stocks & flows â declare measurable stores then inflow/outflow pipes.
- Feedback loops â tag each loop B or R; reference involved stocks.
- Leverage points â tick applicable IDs (1â12).
- Interventions â optional proposals targeting leverage IDs.
Keep iterating until the server returns complete: true
.
9 Extended SystemsâThinking Reference (Team Use Only)
A quickâaccess cheatâsheet so we donât have to reâscan Meadows every sprint.
Concept | Oneâliner | Fast sanity check |
---|---|---|
Elements | Tangible or intangible parts of the system | Can you point at it? If yes, itâs an element. |
Interconnections | Physical flows or information signals | Does changing A alter B without outside influence? |
Purpose/Function | The consistent pattern the system produces | Observe behaviour, not mission statements. |
Stock | Memory of past flows (bathtub water, money) | Units must be additive over time. |
Flow | Rate changing a stock (inflow/outflow) | Has units per time. |
Balancing Loop (B) | Goalâseeking stabiliser | If discrepancy shrinks over time, itâs B. |
Reinforcing Loop (R) | Selfâamplifying growth/decay | Exponential trends; watch doubling time. |
Delay | Gap between cause & effect | Look for oscillations or overshoot. |
Hierarchy | Nested subsystems with their own purposes | Tight coupling at lower levels, loose at top. |
Resilience | Ability to absorb shock and keep purpose | Diversity, buffers, modular slack increase it. |
Leverage ID 12 â 1 | Parameters â feedback strength â info flows â rules â selfâorganisation â purpose â paradigm â transcend paradigm | Higher numbers easier to tweak, lower numbers more powerful but cultural. |
Fieldâbyâfield DeepâDive
- boundary.scope_in / scope_out â Be explicit; ambiguity breeds model creep.
- elements â Prioritise catalytic actors (ones that appear in many loops).
- interconnections.type â
causal
(solid arrow),flow
(pipe),info
(dashed). - stocks â Check each has at least one inâflow or outâflow; else itâs inert.
- flows.rate_expr â Keep humanâreadable (
0.1 * demand
). Parser TBD. - loops â Name loops with verbâphrase + polarity (
Sales Reinvest R
). - leverage_points â If
is_applicable=true
but no intervention, warn.
Rapid Diagnostic Questions
- What stock is unexpectedly changing fastest? Why?
- Which loop currently dominates behaviour?
- Where is the biggest information delay?
- Which leverage point needs the least political capital to nudge?
âThe behavior of a system cannot be known just by knowing the elements.â îfileciteîturn3file14îL1-L4î