flowfig MCP server
Commit Oct 15, 2026Enables coding agents to generate animated SVG diagrams from code and verify that they remain synchronized with the codebase during CI.
Also known as iamalvisng/flowfig
- Stars
- 2
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Oct 15, 2026
- License
- MIT
What is flowfig MCP?
flowfig enables coding agents to generate animated SVG diagrams from code and verify that they remain synchronized with the codebase during CI.
Summary generated from the project's README
About flowfig MCP server
Visualizing complex logic through animated SVG diagrams is what flowfig enables for developers using coding agents. By running npx flowfig init, you teach agents like Claude Code, Cursor, or GitHub Copilot to write a JSON specification that describes your application flows. The server then transforms these specs into animated figures that can be viewed in a browser, a README, or a pull request.
This tool is designed to keep documentation in sync with your actual implementation. Using the flowfig check command, agents can identify visual faults like overlapping labels or low contrast, while the flowfig verify command ensures that diagrams do not break during CI when linked functions are renamed or removed. It supports various formats including swimlanes, timelines, and state lifecycles.
To get started, you need Node 18 or later. Developers can interact with the system through a CLI or by installing the package via npm for use with the React player or Node API. The resulting SVG files are standalone and require no scripts to play in your documentation.
What you can do with it
- 1Generate flow diagrams from codeAsk your coding agent to create a visual representation of a specific process within your repository.
- 2Validate diagram visual qualityUse the check command to find layout errors like text that is too wide for its container.
- 3Prevent documentation rot in CIEnsure that your animated diagrams remain accurate even when developers rename functions in the codebase.
- 4Create different documentation viewsTransform a single specification into various formats like timelines or swimlanes for different readers.
Written from the project's README. Every use case is checked against a quote from it.
How to install flowfig MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall flowfig MCP in Claude Code
$ claude mcp add flowfig -- npx -y flowfigInstall flowfig MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"flowfig": {
"command": "npx",
"args": [
"-y",
"flowfig"
]
}
}
}Install flowfig MCP in VS Code
.vscode/mcp.json
{
"servers": {
"flowfig": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"flowfig"
]
}
}
}Install flowfig MCP in VS Code CLI
$ code --add-mcp '{"name":"flowfig","type":"stdio","command":"npx","args":["-y","flowfig"]}'Install flowfig MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"flowfig": {
"command": "npx",
"args": [
"-y",
"flowfig"
]
}
}
}Install flowfig MCP in Codex
$ codex mcp add flowfig -- npx -y flowfigInstall flowfig MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.flowfig] command = "npx" args = ["-y", "flowfig"]
Install flowfig MCP in Gemini CLI
$ gemini mcp add -s user flowfig npx -- -y flowfigInstall flowfig MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"flowfig": {
"command": "npx",
"args": [
"-y",
"flowfig"
]
}
}
}Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachableiamalvisng/flowfig is public and reachablegithub.com/iamalvisng/flowfig ↗Pass
- Package names this repository as its sourceflowfig names iamalvisng/flowfig as sourcenpmjs.com/package/flowfig ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-15github.com/iamalvisng/flowfig ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from flowfigPass
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubSee how your code works, one step at a time.
AI writes code faster than you can read it. Your coding agent reads the code and writes a short JSON spec of one flow. flowfig checks the spec and draws it as an animated figure that you can understand in a minute.
Try it: run npx flowfig init in your repo, then ask your agent to draw how checkout works.
A made-up cake shop app in 3 stories. In your repo, each box can link to the function that does the step.
The same spec also makes a guide for a reader who does not know the code. The guide tells one moment at a time:
Why flowfig
- Your agent draws it from the code.
npx flowfig initteaches your coding agent to write the spec. You ask in plain words. It works with Claude Code, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Kiro, and Codex and other agents that readAGENTS.md. - flowfig checks it.
flowfig checkfinds ids that point nowhere, text wider than its box, edges through boxes, overlapping labels and low contrast. The agent reads the faults and fixes the spec.flowfig verifyfails CI when a linked function is gone. - It plays where you read code. The figure is one SVG file with no script. It plays in a README, a pull request or an issue.
- One spec, many forms. The same spec draws a map, a list of the messages in order, swimlanes, a timeline, the parts inside a box, or a guide for a person.
Quick start
-
Set up your repo:
npx flowfig init -
Start a new agent session and ask in plain words:
draw how checkout works in this repoIn Claude Code, you can also run
/figure how does checkout work. -
The agent writes an SVG and ends its reply with
npx flowfig open <path>. Run that command to see the figure in your browser.
To use the React player or the Node API, install the package: npm i flowfig. flowfig needs Node 18 or later. Only the
React player needs React (18 or later).
Forms
The figure at the top is the map form. A box can also open to show the parts inside it, down to 3 levels. Each form is one field in the spec. See the spec.
Fail CI when a figure no longer matches the code
A box, an edge or a message can name the code that it draws:
{ "id": "verify", "label": "verifyPassword", "source": "src/auth/login.ts#verifyPassword" }
If someone renames verifyPassword, verify fails with exit code 1:
$ npx flowfig verify login.svg
error missing-symbol login.svg: box "verify" -> src/auth/login.ts#verifyPassword: symbol not defined
1 error, 0 warnings
login.svg: 0 of 1 boxes defined
The GitHub Action runs verify on every figure in a pull request. It comments the old and the new image for each figure
that the pull request changes. See Verify in CI.
flowfig, Mermaid and a hand-drawn image
| flowfig | Mermaid | Hand-drawn image | |
|---|---|---|---|
| Made by an agent from the code | Yes, with the init instructions |
Yes, as Mermaid text | No |
| Linked to the code | Yes, verify fails in CI |
No | No |
| Checked for faults | Yes, with flowfig check |
Syntax errors only | No |
| Animated | Yes, a dot moves on each message | No | No |
| Shows payloads and order | Yes, on the map and the rail | Order and text in a sequence diagram | No |
| Plays in a GitHub README | Yes, as an SVG | Yes, GitHub renders it | Yes, as an image |
| Readable back as source | Yes, with --spec |
Yes, the source is text | No |
| Class and ER diagrams | No | Yes. Mermaid wins this row. | Yes |
Docs
- The spec: your first figure, the forms, boxes, groups, edges, steps and options.
- The CLI: draw, check, open, share as a GIF, trace a function, find stale figures, one page for all figures.
- Verify in CI: link a figure to the code, and the GitHub Action.
- Explain a flow in a web page: the
<flowfig-explain>element. - Integrations: coding agents, React, Node, the MCP server and Mermaid.
- Development: build and test this repo.
License
MIT. See LICENSE.
flowfig MCP questions
How do I add flowfig MCP to Claude Code?
Run claude mcp add flowfig -- npx -y flowfig in your terminal. Add --scope user to make it available in every project.
How do I add flowfig MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Can flowfig prevent diagrams from becoming outdated?
Yes, the flowfig verify command can be used in CI to fail the build if a linked function or symbol is missing from the code.
What kind of diagram formats does flowfig support?
It can generate various forms including maps, swimlanes, timelines, states, and guides.