Vaults Diagram Tools

io.github.Malnati由 GitHub 帳號 Malnati 發布v0.1.4更新於 Oct 24, 2026

Mermaid to assets. Source code to maps. MCP for agents.

發布方自己的服務:Diagram

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

一個本機 stdio MCP 伺服器,讓助理把 Mermaid 圖表算繪成 SVG/JPEG 資產,並從原始碼產生 Mermaid 圖表。

可以做什麼
將 Mermaid 文字算繪成 SVG 與 JPEG 檔案,主題與算繪選項會傳遞給算繪器,並把產生的檔案與清單資料回傳給用戶端。
適用情境
當助理需要在文件撰寫或原始碼結構檢視中,把 Mermaid 來源檔或程式碼庫轉成圖表資產、又不想另外執行命令列時使用。
執行需求
以本機 Node.js 程序執行,從 npm 套件 vaults-diagram-tools 安裝,並以 vaults-diagram-mcp 指令啟動;未宣告驗證、環境變數或標頭。預設算繪器使用內建的 Node/JS/WASM 路徑,不需要 Chromium、Puppeteer 或 ImageMagick。
安裝前請注意
這些工具會把算繪檔案與清單寫入輸出位置,請指向你願意被寫入的目錄。README 說明發佈到 npm、VS Code Marketplace、Open VSX、容器倉庫與 MCP Registry 需在本機終端手動完成,憑證保留在本機;執行伺服器本身不需要這些憑證。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

vaults-diagram-tools

[vaults-diagram-tools repository banner]

[CI] [Release] [License: MIT] [Node.js >=20.11] [Docs] [Container] [Quay.io]

Mermaid to assets. Source code to maps. MCP for agents.

vaults-diagram-tools is a standalone toolkit for teams that need reproducible Mermaid SVG/JPEG assets, source-code diagrams, and agent-friendly diagram workflows without carrying Vault-specific content.

What is included

  • Mermaid renderer extracted from the Vaults toolchain.
  • Source-code to Mermaid diagram generator.
  • MCP stdio server with three explicit tools, published in MCP Registry as io.github.Malnati/vaults-diagram-tools.
  • Offline-capable release assets for zip and container distribution.
  • Dedicated GitHub Actions Marketplace wrapper repository for render/source/policy automation.
  • Packaging templates for Homebrew, deb/rpm, CDN, Docker, and Podman, plus a publishable VS Code extension package.

Content-management workflows outside diagram generation are not part of this package.

Quick start

Install in a project:

bash
npm install -D vaults-diagram-tools

Render one Mermaid source to durable assets:

bash
npx vaults-mermaid-render path/to/diagram.mmd --output-dir out --manifest out/manifest.json

Generate Mermaid diagrams from source code:

bash
npx vaults-source-diagrams --source-dir src --output-dir diagrams

Run the MCP stdio server:

bash
npx vaults-diagram-mcp

Use one-shot npx when the project should not keep a dependency:

bash
npx --yes --package vaults-diagram-tools vaults-mermaid-render path/to/diagram.mmd --output-dir outnpx --yes --package vaults-diagram-tools vaults-source-diagrams --source-dir src --output-dir diagramsnpx --yes --package vaults-diagram-tools vaults-diagram-mcp

Core tools

CommandPurpose
vaults-mermaid-renderRender .mmd or .mermaid files to SVG/JPEG, manifests, and optional PNG/text sidecars.
vaults-source-diagramsGenerate Mermaid diagrams from source-code structure, including focused selections and traceability metadata.
vaults-diagram-mcpExpose render_mermaid_text, render_mermaid_file, and generate_source_diagrams through MCP stdio.

Additional package binaries are compatibility entrypoints for older Vaults paths, optional text renderers, and Podman workflows.

Workflows

  • Markdown docs: keep the Mermaid source as a linked .mmd, render .svg and .jpg, and show source inline with a fenced mermaid block.
  • Source graph reviews: generate diagrams from real source paths and inspect manifest selection data for requested files, omitted connectors, and rendered outputs.
  • Agent automation: use the MCP server when clients need diagram rendering through a narrow, explicit tool surface. Current registry entry is active at version 0.1.4, and the Smithery server page is already published.
  • Release packaging: ship npm, zip, container, and offline vendor artifacts while preserving license and notice files.

Download and distribution

npm registry

Use the published npm package when you want the normal Node.js toolchain installation. Current npm latest is [email protected]:

bash
npm install -D vaults-diagram-toolsnpx vaults-mermaid-render path/to/diagram.mmd --output-dir out --manifest out/manifest.jsonnpx vaults-source-diagrams --source-dir src --output-dir diagramsnpx vaults-diagram-mcp

One-shot with npx

Use --package when the project should not keep the dependency:

bash
npx --yes --package vaults-diagram-tools vaults-mermaid-render path/to/diagram.mmd --output-dir outnpx --yes --package vaults-diagram-tools vaults-source-diagrams --source-dir src --output-dir diagramsnpx --yes --package vaults-diagram-tools vaults-diagram-mcp

GitHub Actions Marketplace

Use the dedicated Marketplace action when the diagram workflow should run inside GitHub Actions without adding project-local scripts:

yaml
steps:  - uses: actions/checkout@v4  - name: Render Mermaid assets    id: diagrams    uses: Malnati/vaults-diagram-tools-action@v0    with:      mode: render      input: docs/diagrams      output-dir: diagram-assets  - name: Upload diagram assets    uses: actions/upload-artifact@v4    with:      name: diagram-assets      path: ${{ steps.diagrams.outputs.output-dir }}

npm package from GitHub

Use the GitHub package source when testing a commit before a registry release:

bash
npm install github:malnati/vaults-diagram-toolsnpx vaults-mermaid-render path/to/diagram.mmd --output-dir out

GitHub release assets

The latest GitHub Release, GHCR image, npm package, MCP Registry metadata, and VS Code VSIX are published at v0.1.4; the Quay.io Podman image remains at v0.1.0:

Local checkout

Use the checkout for development, validation, or release preparation:

bash
git clone https://github.com/malnati/vaults-diagram-tools.gitcd vaults-diagram-toolsnpm cinpm testnode packages/renderer/render-mermaid-assets.mjs examples/simple/flowchart.mmd --output-dir tmp/renderednode packages/source-diagrams/source-diagrams.mjs --source-dir packages/mcp --output-dir tmp/source-diagramsnode packages/mcp/server.mjs

Container, Docker, and Podman

Build locally:

bash
docker build -f containers/Containerfile -t vaults-diagram-tools:local .podman build -f containers/Containerfile -t vaults-diagram-tools:local .

Run a render from the GHCR image:

bash
docker run --rm \  -v "$PWD/examples/simple:/work/input:ro" \  -v "$PWD/tmp/container-output:/work/output:rw" \  ghcr.io/malnati/vaults-diagram-tools:v0.1.4 \  --output-dir /work/output /work/input/flowchart.mmd

Run the published Podman image from Quay.io:

bash
podman run --rm \  -v "$PWD/examples/simple:/work/input:ro" \  -v "$PWD/tmp/container-output:/work/output:rw" \  quay.io/ricardomalnati/vaults-diagram-tools:v0.1.0 \  --output-dir /work/output /work/input/flowchart.mmd

Quay.io also exposes 0.1.0 and latest tags for the same published package line.

Podman helper scripts are available through vaults-mermaid-podman-build, vaults-mermaid-podman-render, and vaults-mermaid-podman-test.

CDN facade

The package is CLI-first. CDN endpoints expose browser-safe metadata/helpers only; SVG/JPEG rendering still runs through Node.js, MCP, or the container runtime.

text
https://cdn.jsdelivr.net/npm/vaults-diagram-tools/packaging/cdn/vaults-diagram-tools.mjshttps://unpkg.com/vaults-diagram-tools/packaging/cdn/vaults-diagram-tools.mjs

VS Code extension

The desktop VS Code extension is published as malnati.vaults-diagram-tools and can also be installed directly from the GitHub Release VSIX. It uses a hybrid runtime: a bundled offline fallback plus a managed cache that can follow vaults-diagram-tools@latest without republishing the extension. It contributes:

  • Command Palette actions for Mermaid SVG/JPEG rendering, source-diagram generation, and Markdown diagram-policy validation.
  • Runtime commands: update managed runtime now, show runtime status, and force the bundled runtime.
  • A native VS Code MCP server definition provider for the resolved vaults-diagram-tools stdio server.
  • Marketplace/Open VSX publish scripts for manual publication from an authenticated local shell. Keep npm, VS Code Marketplace, and Open VSX credentials in the local terminal; GitHub Actions does not use those secrets.

Install options after v0.1.4 is released:

Local package validation:

bash
npm run vscode:installnpm run vscode:testnpm run vscode:packagecode --install-extension dist/vaults-diagram-tools-vscode-0.1.4.vsix

Sequential local publication:

bash
make authmake publish-all

make publish-all runs local-terminal authentication first, validates guard-only release metadata, packages artifacts, creates the GitHub tag/release, publishes npm, VS Code Marketplace, Open VSX, GHCR, Quay.io, and MCP Registry, then verifies public availability. It fails when the current version/tag/npm package already exists; bump and commit release metadata before running.

Command line usage

After installing from npm, run public CLIs directly from node_modules/.bin, npm exec, or npx:

bash
vaults-mermaid-render path/to/diagram.mmd --output-dir out --png --ascii --manifest out/manifest.jsonvaults-source-diagrams --source-dir src --output-dir diagrams --langs auto --diagrams dependency,classvaults-diagram-mcp

One-shot examples:

bash
npx --yes --package vaults-diagram-tools vaults-mermaid-render examples/simple/flowchart.mmd --output-dir tmp/vaults-diagram-toolsnpx --yes --package vaults-diagram-tools vaults-source-diagrams --source-dir packages/mcp --output-dir tmp/source-diagrams --render-mode placeholdernpx --yes --package vaults-diagram-tools vaults-diagram-mcp

Local checkout equivalents:

bash
node packages/renderer/render-mermaid-assets.mjs examples/simple/flowchart.mmd --output-dir tmp/vaults-diagram-toolsnode packages/source-diagrams/source-diagrams.mjs --source-dir packages/mcp --output-dir tmp/source-diagramsnode packages/mcp/server.mjs

MCP tools

vaults-diagram-mcp exposes exactly three tools:

  • render_mermaid_text
  • render_mermaid_file
  • generate_source_diagrams

Example client command:

bash
vaults-diagram-mcp

The MCP adapter passes theme and rendering options through to the same renderer used by the CLI, so a client can request theme: "dracula" and receive .svg + .jpg artifacts.

Dracula diagram examples

The diagrams below were generated by this repository with vaults-mermaid-render --theme dracula; Markdown links the generated assets instead of embedding SVG/JPEG.

Install and usage flow
mermaid
flowchart LR  Install["Install"] --> Npm["npm registry"]  Install --> Npx["npx one-shot"]  Install --> GitHub["GitHub npm"]  Install --> Local["Local checkout"]  Install --> Container["Docker Podman GHCR Quay.io"]
  Npm --> Cli["Public CLIs"]  Npx --> Cli  GitHub --> Cli  Local --> Cli  Container --> Cli
  Cli --> Render["vaults-mermaid-render"]  Cli --> Source["vaults-source-diagrams"]  Cli --> Mcp["vaults-diagram-mcp"]
  Render --> Svg["SVG Dracula"]  Render --> Jpg["JPEG Dracula"]  Source --> Mermaid["Mermaid source"]  Source --> Svg  Mcp --> Tools["3 explicit MCP tools"]
Tooling architecture
mermaid
flowchart TB  User["User or agent"] --> Markdown["Markdown docs"]  User --> Cli["CLI workflow"]  User --> McpClient["MCP client"]
  Cli --> Renderer["vaults-mermaid-render"]  Cli --> SourceDiagrams["vaults-source-diagrams"]  McpClient --> McpServer["vaults-diagram-mcp"]  McpServer --> Renderer  McpServer --> SourceDiagrams
  SourceDiagrams --> SourceTree["Source tree"]  SourceDiagrams --> GeneratedMmd["Generated .mmd"]  GeneratedMmd --> Renderer
  Renderer --> Svg[".svg"]  Renderer --> Jpeg[".jpg"]  Renderer --> Manifest["manifest.json"]
  Svg --> Markdown  Jpeg --> Markdown  GeneratedMmd --> Markdown
MCP package source graph
mermaid
flowchart LR  N1["server.mjs"]  N2["tests/mcp-tools.test.mjs"]  N3["tools.mjs"]  N1 --> N3  N2 --> N3

Brand assets

The repository, GitHub Pages landing, Actions summaries, release notes, GitHub App badge, and social preview use one deterministic brand kit generated from the current landing visual language.

Regenerate and verify the kit with:

bash
npm run brand:generatenpm run brand:check

Compliance and artifact policy

Markdown diagram policy

Generated Markdown should link artifacts and show source in a mermaid fenced block:

markdown
#### Diagram title- Links: [Mermaid source](docs/assets/diagrams/install-usage-flow.mmd) / [SVG](docs/assets/diagrams/install-usage-flow.svg) / [JPEG](docs/assets/diagrams/install-usage-flow.jpg)
```mermaidflowchart TD  A["Source"] --> B["Rendered assets"]```

SVG and JPEG files are delivery artifacts. Markdown should link them instead of embedding them as images by default.

Credits and license compliance

  • Project license: MIT.
  • Project notices: NOTICE.md.
  • Third-party credits and license index: THIRD_PARTY_NOTICES.md.
  • License verification: npm run license:check; refresh generated notices with npm run license:generate.
  • Dracula-colored documentation diagrams credit the MIT-licensed Dracula Theme palette through beautiful-mermaid.
  • Icon data credits include Font Awesome 4, SVG Logos by Gil Barbara, and Lucide Icons via Iconify JSON packages.
  • Release artifacts must preserve LICENSE, NOTICE.md, THIRD_PARTY_NOTICES.md, and upstream license files bundled by packaged dependencies or the offline vendor runtime.

Offline vendor runtime

The source tree does not commit node_modules. Build and release jobs create offline vendor assets with:

bash
npm run vendor:refreshnpm run test:vendor:offline

The renderer can run from normal npm dependencies during development, or from packages/renderer/vendor/node when MMDC_VENDOR_ONLY=1.

The default renderer is the Node/JS/WASM vendor path and does not require Chromium, Puppeteer, mmdc, ImageMagick, or npx. The legacy shell wrapper only uses mmdc when explicitly requested with MMDC_RENDER_ENGINE=mmdc; automatic fallback to Puppeteer is disabled.

GitHub App

The public vaults-diagram-tools GitHub App is the installable read-only app surface for this package.

Distribution status

Working in v1:

  • npm package publication and GitHub install flow
  • Docker/Podman images through GHCR and Quay.io
  • MCP server
  • MCP Registry entry io.github.Malnati/vaults-diagram-tools active at version 0.1.4
  • Smithery server page for ricardomalnati/vaults-diagram-tools
  • zip release
  • GitHub Actions CI, release, CodeQL, and Pages workflows
  • GitHub Actions Marketplace Action Vaults Diagram Tools for render/source/policy automation
  • Public read-only GitHub App install surface
  • Homebrewery package page with searchable tags
  • Publishable VS Code extension package with VS Code Marketplace and Open VSX workflow targets

Templates in v1:

  • Homebrew formula
  • deb/rpm through nfpm
  • CDN facade through npm/jsDelivr/unpkg

Current release

vaults-diagram-tools is published as npm 0.1.4 and MCP Registry server io.github.Malnati/vaults-diagram-tools version 0.1.4. The latest GitHub Release, GHCR image, and VS Code VSIX are v0.1.4; Quay.io carries the Podman image line at v0.1.0.

ChannelStatus
GitHub Releasev0.1.4
Release assetsvaults-diagram-tools-0.1.4.tgz, vaults-diagram-tools-0.1.4.zip, and vaults-diagram-tools-vscode-0.1.4.vsix
npm[email protected], dist-tag latest
GitHub Actions MarketplaceVaults Diagram Tools target, backed by Malnati/vaults-diagram-tools-action tags v0.1.4 and v0
MCP Registryio.github.Malnati/vaults-diagram-tools, status active, version 0.1.4
Smitheryricardomalnati/vaults-diagram-tools is published
Registry PRPR #17 aligned the MCP Registry publisher name and was merged.
GHCR containerghcr.io/malnati/vaults-diagram-tools:v0.1.4; future container publication is manual outside GitHub Actions.
Quay.io Podman imagequay.io/ricardomalnati/vaults-diagram-tools:v0.1.0
AutomationCI, CodeQL, Pages, and Release workflows run through GitHub Actions; release validates and packages artifacts only. npm, VS Code Marketplace, Open VSX, container registries, and MCP Registry are published manually from a local terminal.
GitHub Appvaults-diagram-tools public read-only app; install.
VS Code extensionVSIX is attached to the GitHub Release. Marketplace target malnati.vaults-diagram-tools and Open VSX target malnati/vaults-diagram-tools are published manually outside GitHub Actions.
DocumentationGitHub Pages publishes the docs/ site.

Documentation

來源:README.md,提交 b63769c

工具

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

版本歷史

1
  1. v0.1.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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

其他 Diagram 整合