Mermaid Online MCP — Share Links & Source

io.github.j-river由 GitHub 帳號 j-river 發布v0.1.0更新於 Nov 14, 2026

Mermaid Online MCP: encode share links and recover Mermaid diagram source locally.

發布方自己的服務:Source

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

概覽

AI 產生的概覽

本機 MCP 伺服器,可將 Mermaid 圖表原始碼編碼成可逆的分享連結,並把分享權杖解碼回原始碼。

可以做什麼
  • 將 Mermaid 原始碼(可附設定與明確指定的目標網址)編碼成可逆的分享權杖與連結
  • 將分享權杖、片段或 HTTP(S) 網址解碼回原始圖表原始碼,可選擇一併回傳儲存的設定與擴充資料
  • 僅做文字序列化:不渲染圖表、不檢查語法、不抓取網址、不讀寫檔案
適用情境
適合讓助理在對話中直接產生或還原 Mermaid 分享連結,例如做一次編碼再解碼的往返驗證。若需要渲染、語法檢查或匯出圖片,則不適合使用。
執行需求
需要 Node.js 22+ 以及支援本機 stdio 伺服器的 MCP 用戶端,通常透過 npx 啟動。伺服器本身不需要帳號、API 金鑰或網路存取。
安裝前請注意
分享連結包含完整的圖表狀態,且可逆、未加密、沒有存取控制,應視為公開內容。還原出的標籤、連結與指令應視為不可信輸入。MCP 用戶端或模型供應商仍可能傳輸或儲存工具的輸入輸出。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mermaid Online MCP — Share Links & Source,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

其他 MCP 客戶端

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

README

Mermaid Online MCP — Mermaid Share Links & Source

Encode diagram source into share links and recover source from supported Mermaid share tokens, directly from a local MCP client. An independent open-source companion to Mermaid Online, not an official Mermaid.js server.

This MCP serializes text. It does not render diagrams, validate Mermaid syntax, fetch share URLs or read/write files. For a visual editing workflow, use the separate Mermaid Online editor, Mermaid-to-SVG export or Mermaid-to-PNG export.

Install

Requires Node.js 22+ and an MCP client supporting local stdio servers. Common configuration:

json
{"mcpServers":{"mermaidonline":{"command":"npx","args":["-y","[email protected]"]}}}

Each client has its own configuration location. On Windows, if a client cannot spawn npx, install the package and use node with the absolute installed src/cli.js path instead. Running the command without a client starts a protocol server waiting on stdin. Use npx -y [email protected] --help for human-readable help.

Two tools

ToolArgumentsResult
encode_mermaid_sharecode, optional mermaidConfig JSON string and explicit baseUrlReversible pako: token and optional URL
decode_mermaid_shareshare, optional includeStateOriginal source and optionally untrusted extension/config data

Ask your agent:

Encode this flowchart into a share link using https://mermaidonline.org/ as the destination. Decode the result and verify the source round-trips. Do not render or open it.

json
{"code":"flowchart LR\n  A[Write] --> B[Share]\n","baseUrl":"https://mermaidonline.org/"}

Destination is explicit, not silently substituted. No tracking parameters are added. Decoding accepts a token, fragment, or HTTP(S) URL and never requests that address. includeState defaults to false to avoid unnecessarily echoing config and extension fields.

Limits and privacy

  • Maximum source: 48,000 UTF-8 bytes; config: 8,000 UTF-8 bytes. Share tokens: 65,536 characters, decoded JSON: 65,536 UTF-8 bytes, container depth: 16. Results are limited to 128 KiB of JSON.
  • A link contains the complete diagram state. It is reversible, not encrypted or access controlled. Compression is not redaction.
  • Config is stored as data, not applied as renderer options. Treat recovered labels, links and directives as untrusted input to your editor.
  • No URL fetching, uploads, file operations, telemetry, account, API key or paid backend calls. Your MCP client/model provider may still transmit or store tool input and output.
  • pako:/base64: interoperability does not mean every site accepts every editor field. Unsupported legacy/site-specific fragments are rejected; diagram syntax is not checked.

See share-link workflows and examples. Core implementation: mermaid-share-codec. Commercial website code remains separate.

Verify

sh
npm ci --ignore-scriptsnpm run checknpm run audit:publicnpm pack --dry-run

Tests negotiate a real MCP stdio session and exercise Unicode/config round trips, explicit destinations, source-only results, malicious schemes, corrupt payloads and bounded decompression. Published in the official MCP Registry as io.github.j-river/mermaidonline, version 0.1.0. Public metadata links directly to Mermaid Online and the npm package. Source metadata is in server.json.

MIT. No customer diagrams or production credentials are included.

來源:README.md,提交 a3dc556

工具

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

版本歷史

1
  1. v0.1.0最新Nov 14, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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

其他 Source 整合