Skip to content

MCP

If you client does not support plugins or Agent Skills, you can also directly install the MCP server, described on this page.

@nifdi/mcp is a local MCP server for creating and editing nifdi diagrams. Your MCP client starts it as a subprocess on your machine, and it reads and writes diagram files in a workspace folder. It does not require a nifdi account or a hosted nifdi service.

Node.js 18 or later is required.

For Codex:

Terminal window
codex mcp add nifdi-diagram -- npx -y @nifdi/mcp@latest

For Claude Code, install it at project scope so diagrams are stored with the project:

Terminal window
claude mcp add nifdi-diagram -s project -- npx -y @nifdi/mcp@latest

For another MCP client, configure a local stdio server that runs:

Terminal window
npx -y @nifdi/mcp@latest

If the client does not supply its project root, set NIFDI_ROOT to the absolute path of the folder where diagrams should be stored. Restart the client or begin a new agent session after changing its MCP configuration.

Ask the agent to create or edit a block-and-connector diagram, render it for review, or open the browser editor for visual refinement. Diagrams are saved as .nifdi.svg files in the workspace. Their path relative to the workspace is also the id used by the MCP tools, for example system.nifdi.svg or design/architecture/system.nifdi.svg.

There is no implicit “current diagram”: tools identify the file on each call. This keeps work predictable across server restarts and when a project contains several diagrams.

See the file format reference for what a .nifdi.svg file contains.