{"_id":"@openflowkit/openflowkit-mcp","_rev":"4-b47c3960de928c021982f9d959356ad3","name":"@openflowkit/openflowkit-mcp","dist-tags":{"latest":"0.3.0"},"versions":{"0.0.0-stage":{"name":"@openflowkit/openflowkit-mcp","version":"0.0.0-stage","_id":"@openflowkit/openflowkit-mcp@0.0.0-stage","stub":true,"maintainers":[{"name":"vrun-design","email":"vrun82000@gmail.com"}],"dist":{"shasum":"7acd9ea8c87c924e1dc17490d21f65ff815b42f3","tarball":"https://registry.npmjs.org/@openflowkit/openflowkit-mcp/-/openflowkit-mcp-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-IUmIzkM6kV/SECXIJS2t12L6XwPEgOY7LRV/eCnVLhIZtzSCfK7IelsmlOWCMdFDkak2keJbnrvR5zv0jz+C/w==","signatures":[{"sig":"MEQCIDUn/ouMeFACwkhfBKd3yk1kOK0FL49cWzLZbp/GbToQAiB/EBVPX+Kv6SbMFxOYYQz8RzDEktimJBX67Wq8jKFO8g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":350},"_npmUser":{"name":"vrun-design","email":"vrun82000@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.2.3":{"name":"@openflowkit/openflowkit-mcp","version":"0.2.3","keywords":["mcp","model-context-protocol","openflowkit","diagram","flowchart","mermaid","claude","cursor","windsurf","local-first"],"license":"MIT","_id":"@openflowkit/openflowkit-mcp@0.2.3","maintainers":[{"name":"vrun-design","email":"vrun82000@gmail.com"}],"homepage":"https://github.com/openflowkit/openflowkit#readme","bugs":{"url":"https://github.com/openflowkit/openflowkit/issues"},"bin":{"openflowkit":"dist/cli.js","openflowkit-mcp":"dist/index.js"},"dist":{"shasum":"48d2d595b592a2e9ff4d688afb67dfff418eca46","tarball":"https://registry.npmjs.org/@openflowkit/openflowkit-mcp/-/openflowkit-mcp-0.2.3.tgz","fileCount":81,"integrity":"sha512-zY4RghcPs+I5kY7xGSscKjOMRsPcf49GqKJs27YkKDXfa1XK/PPupn79JT+L05nlphOxSZKLYZgIbx0Ll23GAQ==","signatures":[{"sig":"MEQCICdh9m76JHfwOjuBDl9NlrMtFb/NQNeNCmMAg5GF+C4tAiAzKCnC2ld4Ht58Gr5ISqChteHwFrvbYbqMeD19SQaxOg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCID6J4huJ6ageYqTkjnzieZusazp7r6QCub+IM/IJpTctAiEAqBw6BhGNo3o3E6stQw5J23KSBullhXUC2fHp/l3x1V4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13200045},"type":"module","engines":{"node":">=20.11"},"gitHead":"d7c8068317c3813ff799e484dc620a25f0aec787","mcpName":"io.github.openflowkit/openflowkit-mcp","scripts":{"dev":"tsx src/index.ts","lint":"tsc -p tsconfig.json --noEmit","test":"vitest --config vitest.config.ts","build":"node scripts/build-dist.mjs","prelint":"npm run build:agent","pretest":"npm run build:icons && npm run build:agent && node scripts/ensure-map-viewer.mjs","prebuild":"npm run build:icons && npm run build:grammar && npm run build:agent && npm run build:map-viewer","test:run":"vitest --config vitest.config.ts --run","eval:agent":"npm run build:agent && vitest --config vitest.config.ts --run evals","start:http":"node dist/http.js","build:agent":"npm --prefix .. run build:agent","build:icons":"node scripts/build-icon-manifest.mjs","pretest:run":"npm run build:icons && npm run build:agent && node scripts/ensure-map-viewer.mjs","build:grammar":"node scripts/build-grammar-doc.mjs","eval:validity":"npm run build:icons && npm run build:agent && tsx evals/validity/run.ts","prepublishOnly":"npm run build","build:map-viewer":"npm --prefix .. run build:map-viewer"},"_npmUser":{"name":"vrun-design","email":"vrun82000@gmail.com"},"repository":{"url":"git+https://github.com/openflowkit/openflowkit.git","type":"git","directory":"mcp-server"},"_npmVersion":"11.11.0","description":"Local-first Model Context Protocol server for OpenFlowKit — pair the live editor or edit .openflow.json files: create/update/read diagrams from DSL, scene ops, icon search, export. No account, no cloud.","directories":{},"_nodeVersion":"25.8.1","dependencies":{"zod":"^3.23.0","elkjs":"^0.11.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^4.1.0","typescript":"^5.9.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/openflowkit-mcp_0.2.3_1791835698504_0.4938065668181655","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@openflowkit/openflowkit-mcp","version":"0.2.4","keywords":["mcp","model-context-protocol","openflowkit","diagram","flowchart","mermaid","claude","cursor","windsurf","local-first"],"license":"MIT","_id":"@openflowkit/openflowkit-mcp@0.2.4","maintainers":[{"name":"vrun-design","email":"vrun82000@gmail.com"}],"homepage":"https://github.com/openflowkit/openflowkit#readme","bugs":{"url":"https://github.com/openflowkit/openflowkit/issues"},"bin":{"openflowkit":"dist/cli.js","openflowkit-mcp":"dist/index.js"},"dist":{"shasum":"e7ee9542d5b51f1db0764580c6a4552fdf990dd3","tarball":"https://registry.npmjs.org/@openflowkit/openflowkit-mcp/-/openflowkit-mcp-0.2.4.tgz","fileCount":87,"integrity":"sha512-4WNCBG2Piedl9NblTylwWiOaGLfq8uiSORz+qUDiRnMKKdItf9m1fiEcJqGqL0UYis3WopkJslStO5U2WSiqZA==","signatures":[{"sig":"MEYCIQD7wnrzGFKFPMN1e1s/PaWnm8p8ZfkiTFqzHcHFVRoYngIhAPxLevjH7PrGBKGLN+uW5bxCKVojOL9vU2CTBp/+nudH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIHeAkMevwGT2ELwU7fYBO/SSpgX2ys/gahIvKDX+JIrYAiB4W78ipPVi53sVki0gxJZ8ZR9/YvJxZfvJ2HERfzfoHg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13229772},"type":"module","engines":{"node":">=20.11"},"gitHead":"ff81441fa172ef16e4246973f8f287f43fd63839","mcpName":"io.github.openflowkit/openflowkit-mcp","scripts":{"dev":"tsx src/index.ts","lint":"tsc -p tsconfig.json --noEmit","test":"vitest --config vitest.config.ts","build":"node scripts/build-dist.mjs","prelint":"npm run build:agent","pretest":"npm run build:icons && npm run build:agent && node scripts/ensure-map-viewer.mjs","prebuild":"npm run build:icons && npm run build:grammar && npm run build:agent && npm run build:map-viewer","test:run":"vitest --config vitest.config.ts --run","dev:remote":"npm run build:icons && npm run build:grammar && npm run build:agent && npx -y wrangler@4.149.0 dev","eval:agent":"npm run build:agent && vitest --config vitest.config.ts --run evals","start:http":"node dist/http.js","build:agent":"npm --prefix .. run build:agent","build:icons":"node scripts/build-icon-manifest.mjs","pretest:run":"npm run build:icons && npm run build:agent && node scripts/ensure-map-viewer.mjs","smoke:remote":"node scripts/smoke-remote.mjs","build:grammar":"node scripts/build-grammar-doc.mjs","deploy:remote":"npm run build:icons && npm run build:grammar && npm run build:agent && npx -y wrangler@4.149.0 deploy","eval:validity":"npm run build:icons && npm run build:agent && tsx evals/validity/run.ts","prepublishOnly":"npm run build","build:map-viewer":"npm --prefix .. run build:map-viewer"},"_npmUser":{"name":"vrun-design","email":"vrun82000@gmail.com"},"repository":{"url":"git+https://github.com/openflowkit/openflowkit.git","type":"git","directory":"mcp-server"},"_npmVersion":"11.11.0","description":"Local-first Model Context Protocol server for OpenFlowKit — pair the live editor or edit .openflow.json files: create/update/read diagrams from DSL, scene ops, icon search, export. No account, no cloud.","directories":{},"_nodeVersion":"25.8.1","dependencies":{"zod":"^3.23.0","elkjs":"^0.11.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^4.1.0","typescript":"^5.9.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/openflowkit-mcp_0.2.4_1791867873843_0.12545192808186667","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"_id":"@openflowkit/openflowkit-mcp@0.3.0","bin":{"openflowkit":"dist/cli.js","openflowkit-mcp":"dist/index.js"},"bugs":{"url":"https://github.com/openflowkit/openflowkit/issues"},"dist":{"shasum":"0707d76e71c080b96181f7a14be1909f2fc984ea","tarball":"https://registry.npmjs.org/@openflowkit/openflowkit-mcp/-/openflowkit-mcp-0.3.0.tgz","fileCount":89,"integrity":"sha512-aivASOSTCg/wFHevtAh0tQdyJofXFbTIMuz0oGG482cCG3MZxshp4WVkwhdRhQedSldxgnrBfspt5B5CKI6I8Q==","signatures":[{"sig":"MEYCIQD3L9HwPsYDueZ2WSGuG7kFXLgyltcs4CMzRSyPNAKIRQIhAOZXPbaAQNVBXhGdALswPRMZn4cBhqu0Obxdtlr7R4qQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDOSx7YLaUYfcREQqXHLqmTGOpQdbDyfCDcQ7ME7AKbrgIgPdC/2B+AJgKmd9YH/hDWrGQGayuqD6I8OOIj9u2QRqU="}],"unpackedSize":13311114},"name":"@openflowkit/openflowkit-mcp","type":"module","engines":{"node":">=20.11"},"license":"MIT","mcpName":"io.github.openflowkit/openflowkit-mcp","scripts":{"dev":"tsx src/index.ts","lint":"tsc -p tsconfig.json --noEmit","test":"vitest --config vitest.config.ts","build":"node scripts/build-dist.mjs","prelint":"npm run build:agent","pretest":"npm run build:icons && npm run build:agent && node scripts/ensure-map-viewer.mjs","prebuild":"npm run build:icons && npm run build:grammar && npm run build:agent && npm run build:map-viewer","test:run":"vitest --config vitest.config.ts --run","dev:remote":"npm run build:icons && npm run build:grammar && npm run build:agent && npx -y wrangler@4.149.0 dev","eval:agent":"npm run build:agent && vitest --config vitest.config.ts --run evals","start:http":"node dist/http.js","build:agent":"npm --prefix .. run build:agent","build:icons":"node scripts/build-icon-manifest.mjs","pretest:run":"npm run build:icons && npm run build:agent && node scripts/ensure-map-viewer.mjs","smoke:remote":"node scripts/smoke-remote.mjs","build:grammar":"node scripts/build-grammar-doc.mjs","deploy:remote":"npm run build:icons && npm run build:grammar && npm run build:agent && npx -y wrangler@4.149.0 deploy","eval:validity":"npm run build:icons && npm run build:agent && tsx evals/validity/run.ts","prepublishOnly":"npm run build","build:map-viewer":"npm --prefix .. run build:map-viewer"},"version":"0.3.0","_npmUser":{"name":"vrun-design","email":"vrun82000@gmail.com"},"homepage":"https://github.com/openflowkit/openflowkit#readme","keywords":["mcp","model-context-protocol","openflowkit","diagram","flowchart","mermaid","claude","cursor","windsurf","local-first"],"repository":{"url":"git+https://github.com/openflowkit/openflowkit.git","type":"git","directory":"mcp-server"},"_npmVersion":"11.11.0","description":"Local-first Model Context Protocol server for OpenFlowKit — pair the live editor or edit .openflow.json files: create/update/read diagrams from DSL, scene ops, icon search, export. No account, no cloud.","directories":{},"maintainers":[{"name":"vrun-design","email":"vrun82000@gmail.com"}],"_nodeVersion":"25.8.1","dependencies":{"zod":"^4.6.6","elkjs":"^0.11.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^4.1.0","typescript":"^5.9.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openflowkit-mcp_0.3.0_1794062071796_0.773232031248524"}}},"time":{"created":"2026-10-12T20:05:39.145Z","modified":"2026-11-07T14:34:32.232Z","0.0.0-stage":"2026-10-12T20:05:39.145Z","0.2.3":"2026-10-12T20:08:18.675Z","0.2.4":"2026-10-13T05:04:34.036Z","0.3.0":"2026-11-07T14:34:31.992Z"},"bugs":{"url":"https://github.com/openflowkit/openflowkit/issues"},"license":"MIT","homepage":"https://github.com/openflowkit/openflowkit#readme","keywords":["mcp","model-context-protocol","openflowkit","diagram","flowchart","mermaid","claude","cursor","windsurf","local-first"],"repository":{"url":"git+https://github.com/openflowkit/openflowkit.git","type":"git","directory":"mcp-server"},"description":"Local-first Model Context Protocol server for OpenFlowKit — pair the live editor or edit .openflow.json files: create/update/read diagrams from DSL, scene ops, icon search, export. No account, no cloud.","maintainers":[{"name":"vrun-design","email":"vrun82000@gmail.com"}],"readme":"<div align=\"center\">\n\n# OpenFlowKit MCP Server\n\n**Give Claude Code, Claude Desktop, Cursor, Windsurf, or any MCP client first-class diagramming tools.**\n\n[![npm](https://img.shields.io/npm/v/@openflowkit/openflowkit-mcp?style=flat-square&color=f97316)](https://www.npmjs.com/package/@openflowkit/openflowkit-mcp)\n[![MIT License](https://img.shields.io/badge/License-MIT-f97316.svg?style=flat-square)](https://github.com/openflowkit/openflowkit/blob/main/LICENSE)\n[![Node 20.11+](https://img.shields.io/badge/Node-20.11%2B-339933.svg?style=flat-square)](https://nodejs.org/)\n\n</div>\n\n---\n\nOpenFlowKit MCP is **local-first by design** — it runs on your machine over stdio with no API key and no cloud round-trip, and its tools return deterministic output. Your MCP client already has an LLM; this server just gives it diagram-specific tools.\n\nIt gives the agent the same operations a human has, in two modes:\n\n- **Live** — click **Connect agent** in the app and the tools act on the document you\n  see, over a local bridge on `127.0.0.1:43119` (port: `OPENFLOWKIT_BRIDGE_PORT`; Host- and\n  origin-checked; optional `OPENFLOWKIT_BRIDGE_TOKEN`). `screenshot` returns a real PNG and every edit is one undo.\n- **File** — `openflow_open` a `.openflow.json`, edit it with the same tools,\n  `openflow_save` it back.\n\nNo API keys and no account. This server calls no outside service; the hosted endpoint for chat apps (below) stores nothing.\n\nEvery client, step by step, with fixes for what goes wrong: [Connect your agent](https://docs.openflowkit.com/connect-your-agent/).\n\n```\nYou:    Create a checkout flow with a promo-code branch\nClaude: get_syntax → writes OpenFlow DSL itself → validate_openflow_dsl\n        fixes any issues → create_diagram → screenshot\n        returns DSL + what it drew\n```\n\n---\n\n## Install\n\n```bash\n# No install required; npx fetches the latest published version\nnpx -y openflowkit mcp\n\n# Or install globally\nnpm install -g openflowkit\nopenflowkit mcp\n```\n\nRequires **Node 20.11+**. You don't start the server yourself: add it to your agent, and the agent starts it.\n\n### Claude Code\n\nThe terminal and the Claude Code extension for VS Code share this setup:\n\n```bash\nclaude mcp add -s user openflowkit -- npx -y openflowkit mcp\n```\n\nStart a new session (or run `/mcp`), then open the app and click **Connect agent**, or open\n[app.openflowkit.com/#/connect](https://app.openflowkit.com/#/connect).\n\n### Teach your agent when and how to draw\n\n[`skills/openflowkit/SKILL.md`](https://github.com/openflowkit/openflowkit/blob/main/skills/openflowkit/SKILL.md)\ntells an agent when a diagram helps, how to write it (Mermaid or DSL), and to save it as a\n`.openflow.json` beside the code. For Claude Code, copy it into `~/.claude/skills/openflowkit/`.\nAgents that fetch the web read the same text at `https://app.openflowkit.com/llms.txt`.\n\n### Claude Code plugin\n\n```bash\nclaude plugin marketplace add openflowkit/openflowkit\nclaude plugin install openflowkit@openflowkit\n```\n\nInstalls this server and the skill together.\n\n### Codex\n\n```bash\ncodex mcp add openflowkit -- npx -y openflowkit mcp\n```\n\nOr add it to `~/.codex/config.toml` by hand:\n\n```toml\n[mcp_servers.openflowkit]\ncommand = \"npx\"\nargs = [\"-y\", \"openflowkit\", \"mcp\"]\n```\n\nOr install the plugin, which adds the server and the skill together:\n\n```bash\ncodex plugin marketplace add openflowkit/openflowkit\n```\n\nThen install **OpenFlowKit** from that marketplace in the Plugins Directory.\n\n---\n\n## Claude Desktop setup\n\nSettings → Developer → Edit Config opens the config file:\n\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"openflowkit\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"openflowkit\", \"mcp\"]\n    }\n  }\n}\n```\n\nQuit Claude Desktop fully and open it again; **openflowkit** shows in the tool picker. Then open the app and click\n**Connect agent**. If it says `npx` was not found, use the full path that `which npx` prints. No install at all:\nClaude Desktop also takes the hosted connector (below), which draws cards in the chat instead of on your canvas.\n\n### Cursor, VS Code, Windsurf and other MCP clients\n\n[Add to Cursor](https://cursor.com/en/install-mcp?name=openflowkit&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm9wZW5mbG93a2l0IiwibWNwIl19) ·\n[Install in VS Code](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522openflowkit%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522openflowkit%2522%252C%2522mcp%2522%255D%257D) (Copilot agent mode)\n\nAnything else points at the same command:\n\n- command: `npx`\n- args: `[\"-y\", \"openflowkit\", \"mcp\"]`\n\nThe server speaks the standard MCP stdio protocol. Client UIs differ, but the command shape is the same.\n\n---\n\n## Tools\n\nAll tools run locally and require no provider key.\n\nEvery op accepts an optional `documentId`: omit it while an editor is paired, pass one to\ntarget a file-mode document (omitted in file mode, it means the document opened or created\nlast). Page-scoped ops (`update_diagram`, `move`, `style`, `delete`, `add_shape`, `get_document`,\n`export`, …) also take a `pageId` from `list_pages`.\n\n| Tool | What it does |\n|---|---|\n| `create_diagram` / `update_diagram` | Compile DSL — or Mermaid, Structurizr DSL or D2, converted with a loss report — into a new frame, or replace one in place; one undo step |\n| `get_diagram` / `list_diagrams` | Read a frame's DSL, its drift from the canvas, and what the text cannot express |\n| `get_syntax` | The grammar, or one family's section |\n| `search_icons` / `find_icons_for` | Search 7,310 icons (AWS, Azure, Google Cloud, CNCF, developer logos, 5,148 Standard glyphs), or expand a concept (\"cache\", \"queue\", \"auth\") |\n| `move` / `style` / `delete` / `add_shape` | Scene edits the language cannot say |\n| `export` | SVG, PNG, PDF (print HTML) or JSON for a page, a selection or the document |\n| `screenshot` | PNG of one frame (live mode) |\n| `fit_view` | Frame the camera |\n| `get_document` / `list_pages` | Nodes, connectors and pages with geometry |\n| `validate_openflow_dsl` | Parse and compile DSL (or Mermaid, Structurizr DSL, D2 — converted first): the same diagnostics as `openflowkit validate` |\n| `analyze_codebase` | Detect platforms, services, structure and language mix in a local repo |\n| `discover_architecture` | Walk a repo (compose, Dockerfiles, k8s, terraform, manifests) and propose a C4 `architecture` workspace as DSL, with evidence per element |\n| `drift_report` | Re-run discovery against a model (DSL text, a `documentId`, or else `architecture.ofk` in the repo) and report `missing` / `undrawn` / `changed` with evidence lines |\n| `explain_element` | An element with its relations, discovery evidence, and the text of any linked `adr/*.md` |\n| `openflow_create` / `openflow_open` / `openflow_save` | File-mode lifecycle; `openflow_save` takes `svg: true` to also write the `.svg` beside the file |\n| `list_starter_templates` / `get_starter_template` | Working DSL to start from |\n| `whoami` | Which mode you are in and what this server holds |\n| `list_diagram_node_types` / `server_info` | Reference data and capability metadata |\n\n### `openflowkit` CLI\n\nThe package also ships the `openflowkit` binary: every MCP op, plus discovery, without an\nMCP client. No browser download; SVG is drawn in plain TypeScript.\n\n```bash\nopenflowkit render diagram.mmd -o diagram.svg          # Mermaid, D2, Structurizr or DSL → SVG (stdin: -)\nopenflowkit convert diagram.mmd -o diagram.openflow.json # → an editable document\nopenflowkit validate diagram.mmd --json                # per-line diagnostics; exit 1 on an error\nopenflowkit op create_diagram --doc flow.openflow.json --args '{\"dsl\":\"flowchart\\nA -> B\"}'\nopenflowkit op move --help                             # any op's arguments; `openflowkit ops` lists them\nopenflowkit discover ./my-app --out architecture.ofk   # propose a model, with evidence\nopenflowkit drift ./my-app --model architecture.ofk    # report drift; exit 1 when the model is stale\nopenflowkit build ./docs-architecture --out dist       # static site: every view, drill-down, flows\n```\n\nUnconverted Mermaid lines go to stderr and the command still succeeds; `--strict` makes them\n(and warnings) exit 1. `op` reads a `.openflow.json` (or starts an empty one) and writes the\nchange back. Exit codes: 0 done, 1 the input or diagram is wrong, 2 usage. `--json` always prints\none JSON document. Layout outside the app stops at 1000 shapes or 400 connections with a message\nrather than block; `validate` checks any size. Stdin is read only for `-`.\n\n`build` reads `architecture.ofk` (plus `views/*.snap` layout overrides) and writes a\nself-contained `index.html` with inline SVG views, breadcrumb drill-down and a flow\nplayer. It replaces the Structurizr Cloud static export for wiki/GitHub Pages hosting:\nno server, no account.\n\n---\n\n## Resources\n\nAgents can read these directly:\n\n| URI | Description |\n|---|---|\n| `openflowkit://docs/grammar` | The complete, versioned DSL reference |\n| `openflowkit://templates` | Starter template catalog |\n| `openflowkit://templates/{name}` | DSL for a named starter template |\n| `openflowkit://icons` | Provider icon catalog (Standard glyphs are under `tabler`) |\n| `openflowkit://icons/{provider}` | Icon catalog for one provider pack |\n\nProvider packs are `aws`, `azure`, `gcp`, `cncf`, `developer`, and `tabler` (the 5,000 Standard glyphs).\n\n---\n\n## Prompts\n\nClients can surface two prompt templates:\n\n- `flowchart_from_description` — agent writes the DSL, validates it and draws it\n- `architecture_from_codebase` — agent scans a local repo, picks icon slugs, validates the DSL and draws it\n\n---\n\n## Recommended agent workflow\n\nAsk your MCP client:\n\n```text\nUsing the openflowkit MCP server: read openflowkit://docs/grammar, then write an OpenFlow DSL flowchart for checkout with cart, shipping, promo-code decision, payment, Stripe webhook, and confirmation. Call validate_openflow_dsl, fix any issues, then draw it with create_diagram and show me a screenshot.\n```\n\nFor architecture diagrams:\n\n```text\nUsing openflowkit: call analyze_codebase on /path/to/project, read openflowkit://docs/grammar, use search_icons for exact architecture icon slugs, write OpenFlow DSL, validate it, then draw it with create_diagram.\n```\n\n---\n\n## In a chat app: claude.ai, ChatGPT\n\nChat apps that run in the cloud cannot start a local process, so they use the hosted endpoint:\n\n```\nhttps://mcp.openflowkit.com/mcp\n```\n\n- **claude.ai** (and Claude Desktop, which shares its connectors): Settings → Connectors (Customize → Connectors on\n  newer accounts) → **Add custom connector**, paste the URL, and choose **No sign-in**. Then, in a chat, **+** →\n  **Connectors** → turn OpenFlowKit on. The Free plan allows one custom connector; on Team and Enterprise only an\n  Owner can add one.\n- **ChatGPT:** where your plan allows custom connectors (developer mode), create one with the same URL.\n\nAsk for a diagram and it appears in the chat as a card: the picture, zoom, and **Open in OpenFlowKit**, which opens\nan editable copy in the app. It does not draw on the canvas you have open; for that, run the local server. The\ndiagram rides in the link's `#fragment`, so opening it sends the diagram to no server. Where the host supports it, the\ncard draws itself while the model writes, sends Claude a small picture of the result, and older cards grey out as\n**Earlier version** when a newer one arrives.\n\nThe endpoint serves two tools to the model: `render_diagram` (OpenFlow DSL or Mermaid in, picture out, with the\ncanonical DSL and the editor link) and `get_syntax`, plus `preview_diagram`, which only the card calls while it streams.\nAll three are read-only. It is stateless (a fresh server per request), needs no login and **stores\nnothing**. It has no file system, live editor, discovery or document tools: for those, run the local server.\n\n## Where the diagram shows up\n\n| Where your agent runs | What you see |\n|---|---|\n| Claude Desktop, VS Code (MCP Apps hosts), local server | A card under the tool call: picture, zoom, Open in OpenFlowKit |\n| Claude Code, Codex, any terminal, file mode | The `.openflow.json` you save, and an `openUrl` in the result that opens the diagram in the app |\n| Any client, live mode (**Connect agent** in the app) | The diagram is drawn on the canvas you have open, one undo step per change |\n| claude.ai, ChatGPT, hosted endpoint | A card in the chat |\n\nOnly a client that announces MCP Apps support at startup gets the card's data; everyone else gets the same text\nresult as before, so no client pays for a picture it cannot show.\n\n### Running the remote endpoint\n\nIt runs on Cloudflare Workers (`wrangler.toml`, `src/worker.ts`). The grammar and icon data are the Worker's\nstatic assets, read by the Worker only.\n\n```bash\nnpm run dev:remote                                  # workerd on http://127.0.0.1:8787/mcp\nnpm run smoke:remote -- http://127.0.0.1:8787       # every check against a running endpoint\nnpm run deploy:remote                               # deploys mcp.openflowkit.com (Cloudflare login needed)\nnpm run smoke:remote -- https://mcp.openflowkit.com\n```\n\nThe same server also runs on Node: `npm run build && PORT=8787 npm run start:http`.\n\n| Env (Node) | Default | Meaning |\n|---|---|---|\n| `PORT` | `8787` | Listen port. |\n| `HOST` | `127.0.0.1` | Bind address. Anything but localhost requires `OPENFLOWKIT_ALLOWED_HOSTS`. |\n| `OPENFLOWKIT_ALLOWED_HOSTS` | none | Comma-separated hostnames (no port) the `Host` header may carry (DNS-rebinding protection). Localhost is always allowed when bound to localhost. |\n| `APP_ORIGIN` | `https://app.openflowkit.com` | Origin of the open-in-app link: `<origin>/#/from/dsl?d=<base64url(deflate-raw(dsl))>`. Over 32 KB the link is dropped and `losses` says so. |\n\nThe Worker reads `APP_ORIGIN` and `ALLOWED_HOSTS` from `[vars]` in `wrangler.toml`.\n\nLimits, both hosts: only `POST` is served, on `/mcp` (also `/` and `/mcp/`, for a pasted bare host); GET and DELETE\nget 405, since there are no sessions. Requests over\n512 KB get 413; `source` is capped at 100 KB. A diagram over 1000 shapes or 400 connections in total (all views) is\nrefused, only the first view is laid out and drawn, and a render has a 15 s deadline. A picture over 1 MB is not\nsent; the card says so and keeps the editor link. Renders in flight are capped (Node: 4, then 503 with\n`Retry-After`; Worker: 8 per isolate, then a queue of up to 10 s before the 503).\n\n## Privacy model\n\n- **Local.** The stdio server calls no outside service, and the live bridge binds to 127.0.0.1.\n- **No provider keys.** The MCP client model authors diagrams directly.\n- **No OpenFlowKit account.** The hosted endpoint needs no sign-in and stores nothing.\n- **The app** keeps your diagrams in your browser and sends basic usage stats, which you can turn off in Settings.\n- **Local filesystem access only when requested.** Codebase analysis only reads the path passed to `analyze_codebase`.\n\n---\n\n## Development\n\nThis package lives in the [openflowkit monorepo](https://github.com/openflowkit/openflowkit).\n\n```bash\n# From the repo root\nnpm install --workspace=mcp-server\nnpm run --workspace=mcp-server build\nnpm run --workspace=mcp-server test:run\n\n# Run locally against the MCP Inspector\nnpx @modelcontextprotocol/inspector dist/index.js\n```\n\nThe MCP Inspector gives you a UI to manually call every tool, browse every resource, and verify client behavior before publishing.\n","readmeFilename":"README.md"}