diagram_listLABSCO SUMMARY
Both of you editing one diagram session, with identities that survive a rewrite.
The hard problem in agent-edited diagrams is churn: rewrite the Mermaid and every reference breaks. Nereid keeps stable ids across a bulk replace when the fingerprints still match, and tells you which cross-references were dropped. The shared attention state is the other half - it is what makes the agent's edits land where you are actually looking.
What it is
A diagram workspace with two front ends onto one session folder. A terminal UI for a person, and typed MCP tools for an agent; both read and write the same Mermaid sources, cross-references and walkthroughs on disk.
What you get
- Five diagram families - sequence, flowchart, class, entity-relationship and Gantt - parsed, rendered as text, and persisted
- Diagram lifecycle and reads: list, open, delete, read, stat, abstract syntax tree, slice, text render and diff
- Structured mutation for sequence and flowchart diagrams, plus a bulk Mermaid replace that keeps stable identities when fingerprints still match and reports which references went dangling
- Walkthroughs with their own list, read, node and diff tools, and structured edits
- Cross-references between diagrams, with neighbours, adding, removing and object reads
- Graph queries: reachability, paths, cycles, unreachable nodes, dead ends, degrees, and message search or trace on a sequence
- Shared attention state, so the agent can see what the human is looking at and say what it is looking at
Requirements
Rust 1.85 or newer for a Cargo install; Homebrew, GitHub releases, Docker and an npm wrapper needing Node.js 18 are also available. A session folder is the unit of work and the source of truth - Mermaid sources, metadata index, walkthroughs and text renders all live there. In TUI mode the MCP server is served over streamable HTTP on port 27435; with the mcp flag and a session path it runs over stdio instead. The licence is source-available and noncommercial: commercial, product or internal business use needs written permission.
Setup effort
One command — cargo install nereid
USE CASES
Letting an agent update a diagram you are reading
Keep the terminal UI open while the agent connects over HTTP; both act on the same session folder, and attention state keeps you pointed at the same place.
Making a local edit without rewriting the diagram
Apply structure operations for the alt or loop block you want changed, rather than regenerating the whole Mermaid source.
Replacing a diagram wholesale but keeping references
Use the Mermaid replace path; matching fingerprints preserve ids and the response names what was preserved, dropped or newly created.
Asking structural questions about a flowchart
Query reachability, paths, cycles and dead ends instead of tracing arrows by eye.
Keeping diagrams linked to each other
Add cross-references between related nodes and walk the neighbours when following a thread across diagrams.
47 tools
Listed in project docs. Your client may show a different list.
diagram_currentdiagram_opendiagram_deletediagram_readdiagram_statdiagram_get_astdiagram_get_slicediagram_render_textdiagram_diffdiagram_create_from_mermaiddiagram_replace_from_mermaiddiagram_propose_opsdiagram_apply_opswalkthrough_listwalkthrough_currentwalkthrough_openwalkthrough_readwalkthrough_statwalkthrough_get_nodewalkthrough_render_textwalkthrough_diffwalkthrough_apply_opsattention_human_readattention_agent_readattention_agent_setattention_agent_clearfollow_ai_readfollow_ai_setselection_readselection_updateview_read_statexref_listxref_neighborsxref_addxref_removeobject_readroute_findseq_messagesseq_searchseq_traceflow_reachableflow_pathsflow_cyclesflow_unreachableflow_dead_endsflow_degreesBEFORE YOU INSTALL
What to know first
Tools you get
47 tools named in the project's documentation.
Requires
Rust 1.85 or later
INSTALLATION
Connect your client
Server setup
Configuration file
{
"mcpServers": {
"nereid": {
"command": "nereid",
"args": [
"--mcp",
"--session",
"<YOUR_PATH_TO_SESSION>"
]
}
}
}<YOUR_PATH_TO_SESSION> is the absolute path of your session folder (the README creates one with mkdir my-session).
cargo
cargo install nereid