Archform

Render and validate diagrams as code: Mermaid, PlantUML, C4, Graphviz, D2 and more.

OtherTypeScriptv0.2.2

Archform

Diagrams as code for AI assistants.

How Archform works: the assistant sends diagram source to Archform, which renders it with Kroki and returns an image and share link

This diagram was drawn by Archform. Connect it to your assistant and ask, for example, "Draw a C4 context diagram of a URL shortener."

This is the monorepo for the @archform npm scope.

PackageDescription
@archform/mcpMCP server that renders and validates Mermaid, PlantUML, C4, Graphviz, D2, Structurizr, BPMN and Excalidraw diagrams

Quick start

claude mcp add archform -- npx -y @archform/mcp

See packages/mcp for Claude Desktop, Cursor, VS Code and ChatGPT setup.

By default diagram source is sent to the public kroki.io service for rendering. Set KROKI_URL to a self-hosted Kroki to keep it private.

Development

Requires Node.js 22+ and pnpm (corepack enable).

pnpm install
pnpm lint && pnpm typecheck && pnpm test && pnpm build

Releasing

Bump version in both packages/mcp/package.json and packages/mcp/server.json in a pull request. When it merges to main, the Publish workflow publishes the new version to npm (trusted publishing, with provenance) and to the MCP Registry. Pushes that don't change the version publish nothing.

License

MIT

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
npx -y @archform/mcp

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-himanshu-mamgain-archform": {
      "command": "npx",
      "args": [
        "-y",
        "@archform/mcp"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

@archform/mcpnpm

Compatible MCP Clients

Archform works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More