Skip to content

Local MCP

If your 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.

Diagrams are saved as .nifdi.svg files in the workspace. Their path relative to the workspace is also the name the agent uses for them, for example system.nifdi.svg or design/architecture/system.nifdi.svg. See the file format reference for what a .nifdi.svg file contains.

Using nifdi with an agent covers what to ask for, how to see the result and how undo works.