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 集成