Archform

io.github.himanshu-mamgain由 GitHub 帳號 himanshu-mamgain 發布v0.2.2更新於 Oct 25, 2026

將圖表作為程式碼進行渲染和驗證:Mermaid、PlantUML、C4、Graphviz、D2 等。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

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

已驗證STDIO僅桌面

概覽

Archform 的本機 MCP 服務;無需登入;STDIO。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Archform,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@archform/mcp

An MCP server that lets AI assistants render and validate diagrams as code: Mermaid, PlantUML, C4-PlantUML, Graphviz, D2, Structurizr, BPMN and Excalidraw.

It works in Claude Desktop, Claude Code, Cursor and VS Code over stdio, and in ChatGPT developer mode as a remote Streamable HTTP endpoint.

Example

The assistant writes diagram source like this D2:

d2
direction: rightuser: User {shape: person}ai: AI assistantmcp: Archform MCPkroki: Kroki {shape: cylinder}user -> ai: "draw our architecture"ai -> mcp: render_diagrammcp -> kroki: diagram sourcekroki -> mcp: SVG / PNGmcp -> ai: image + share link

render_diagram turns it into an image and a share link. The image below is that link:

[Rendered example: user, AI assistant, Archform MCP and Kroki]

Try it: once Archform is connected, ask your assistant:

Draw a C4 context diagram of a URL shortener.

Or "Turn schema.prisma into an ER diagram", or "Draw a sequence diagram of our login flow".

Privacy: rendering is done by Kroki. By default, diagram source is sent to the public kroki.io service. If your diagrams describe anything you would not paste into a public website, self-host Kroki and set KROKI_URL.

Tools

All tools are read-only (readOnlyHint: true, openWorldHint: true).

ToolInputResult
list_formatsnoneEvery supported format with aliases, outputs, a docs link and a minimal valid example
render_diagramformat, source (≤ 100 KB), output (svg default, or png)SVG as an embedded image/svg+xml resource, or PNG as image content, plus a shareable kroki.io link. Invalid source returns isError: true with the parser message and line
validate_diagramformat, source{ valid, errors: [{ line?, message }] }. An invalid diagram is a normal result, not a tool error

Formats

FormatAliasesOutputs
mermaidsvg, png
plantumlsvg, png
c4plantumlsvg, png
graphvizdotsvg, png
d2svg
structurizrsvg, png
bpmnsvg
excalidrawsvg

Use it locally (stdio)

Requires Node.js 22 or later.

Claude Desktop: add to claude_desktop_config.json:

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

Claude Code:

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

Cursor: add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):

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

VS Code: add to .vscode/mcp.json:

json
{  "servers": {    "archform": { "type": "stdio", "command": "npx", "args": ["-y", "@archform/mcp"] }  }}

To use your own Kroki, add "env": { "KROKI_URL": "https://kroki.internal.example.com" } to the server entry.

Run it remotely (Streamable HTTP)

sh
npx -y @archform/mcp --http --port 3000
  • POST /mcp: MCP traffic (stateless)
  • GET /health: health check

By default the server binds to 127.0.0.1 and rejects requests whose Host or Origin is not localhost (DNS rebinding protection). To expose it publicly, for example for ChatGPT developer mode, bind to all interfaces and name your public hostname:

sh
HOST=0.0.0.0 ALLOWED_HOSTS=mcp.example.com TRUST_PROXY=1 RATE_LIMIT_PER_CLIENT=0 PORT=8080 npx -y @archform/mcp --http

Then add https://mcp.example.com/mcp as a connector in ChatGPT (Settings → Connectors, developer mode) with no authentication. Serve it behind HTTPS.

Limits

The HTTP endpoint limits request bodies to 512 KB and counts tool calls, not HTTP requests. A session's initialize and tools/list requests are not counted.

  • Overall: RATE_LIMIT (default 120 per minute) caps tool calls from all clients combined. Size it to what your Kroki backend can handle. The default is polite to the public kroki.io; raise it for a self-hosted Kroki.
  • Per client: RATE_LIMIT_PER_CLIENT (default 60 per minute) stops one client from using the whole budget. ChatGPT calls your server from OpenAI's servers, so all ChatGPT users share a handful of IPs, and this limit applies to them together. On a deployment that mainly serves ChatGPT, set RATE_LIMIT_PER_CLIENT=0 (as in the example above) or make it equal to RATE_LIMIT, so ChatGPT users can use the whole overall budget.
  • Behind a proxy: most hosts (Render, Fly.io, Railway, Cloud Run) put a proxy in front of your app, so every request seems to come from the proxy's address. Set TRUST_PROXY=1 (the number of proxies in front of the server) so the limiter uses the address your proxy added to X-Forwarded-For. Leave it unset when clients connect directly. Clients can write anything into that header, so it is ignored unless TRUST_PROXY is set.

When a single tool call is over a limit, the model gets a normal tool result with isError: true and a message like "Rate limit reached: … Retry in 42s.", so it can tell the user to wait. An HTTP 429 would show up only as a generic connector failure. Batched or malformed requests over the limit get 429 with Retry-After.

The counters are in memory, so each instance enforces its own limits.

Configuration

Flag / variableDefaultMeaning
--httpoffServe Streamable HTTP instead of stdio
--port, PORT3000HTTP port
--host, HOST127.0.0.1HTTP bind address
ALLOWED_HOSTSComma-separated Host values accepted on a public bind
RATE_LIMIT120Tool calls per minute across all clients; 0 disables
RATE_LIMIT_PER_CLIENT60Tool calls per minute per client IP; 0 disables
TRUST_PROXY0Number of reverse proxies whose X-Forwarded-For entries are trusted (true = 1)
KROKI_URLhttps://kroki.ioKroki server used for rendering and share links

Self-hosting Kroki

Kroki ships as Docker images. The core image covers PlantUML, C4-PlantUML, Graphviz, D2 and Structurizr; Mermaid, BPMN and Excalidraw each need a companion container:

yaml
# docker-compose.ymlservices:  kroki:    image: yuzutech/kroki    ports: ["8000:8000"]    environment:      KROKI_MERMAID_HOST: mermaid      KROKI_BPMN_HOST: bpmn      KROKI_EXCALIDRAW_HOST: excalidraw  mermaid:    image: yuzutech/kroki-mermaid  bpmn:    image: yuzutech/kroki-bpmn  excalidraw:    image: yuzutech/kroki-excalidraw
sh
docker compose up -dKROKI_URL=http://localhost:8000 npx -y @archform/mcp

Shareable links then point at your Kroki instance, so they only open for people who can reach it. See the Kroki installation docs for details.

Development

sh
pnpm installpnpm test                      # unit + in-process integration tests (Kroki stubbed)KROKI_LIVE=1 pnpm test         # also run the live tests against KROKI_URLpnpm buildnpx @modelcontextprotocol/inspector node dist/index.js           # stdionode dist/index.js --http      # then point the Inspector at http://127.0.0.1:3000/mcp

License

MIT

來源:packages/mcp/README.md,提交 c9815d4

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.2最新Oct 20, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分