# Mermaid Online MCP — Share Links & Source

> Mermaid Online MCP — Share Links & Source is an open-source MCP server for developer tools. Encodes Mermaid diagrams into share tokens and recovers the source from them. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows
- **Website:** https://mermaidonline.org
- **Repository:** https://github.com/j-river/mermaidonline-mcp
- **MCP Registry name:** io.github.j-river/mermaidonline
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [design and media](https://ai-powered.com/categories/design-and-media)
- **Listing updated:** 2026-11-14

## About

Sharing a diagram usually means pasting a link and hoping the receiver can get the code back. This local server does that round trip as plain text handling: it compresses Mermaid source into a reversible pako token and decodes a token, fragment or URL back into the original source.

It is explicit about what it skips. It does not render, validate Mermaid syntax, fetch URLs or read and write files, and it is independent of Mermaid.js. The base URL for a share link must be given by the caller, and no tracking parameters are added.

Limits are 48,000 bytes of source and 8,000 bytes of config, with share tokens up to 65,536 characters. A link holds the whole diagram state and is not encrypted. It is the open-source companion to the Mermaid Online editor.

## Features

- **Share token encoding:** Turns diagram code into a reversible token and optional URL.
- **Source recovery:** Decodes a token, fragment or URL into the original code.
- **Explicit destination:** Never swaps in a default base URL.
- **Bounded inputs:** Size limits on source, config and decoded JSON.
- **No network use:** Never requests a decoded address.

## Good for

- Generate a share link for an agent-written diagram
- Recover source from a pasted share URL
- Verify a diagram round-trips unchanged
- Keep diagram links in docs without hosting them

## Install

### Claude Code (Terminal)

```sh
claude mcp add mermaidonline -- npx -y mermaidonline-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mermaidonline": {
      "command": "npx",
      "args": [
        "-y",
        "mermaidonline-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mermaidonline": {
      "command": "npx",
      "args": [
        "-y",
        "mermaidonline-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mermaidonline": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mermaidonline-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mermaidonline": {
      "command": "npx",
      "args": [
        "-y",
        "mermaidonline-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mermaidonline": {
      "command": "npx",
      "args": [
        "-y",
        "mermaidonline-mcp"
      ]
    }
  }
}
```

## Tools

- `encode_mermaid_share`: Encode Mermaid code into a reversible share token and optional URL
- `decode_mermaid_share`: Recover original source from a share token or URL

## FAQ

### Does it draw the diagram?

No. It only serialises text; rendering happens in an editor such as Mermaid Online.

### Are share links private?

No. A link contains the full state, is reversible and not encrypted.

### Is it the official Mermaid server?

No, it is an independent companion to Mermaid Online.

### Is Mermaid Online MCP — Share Links & Source free?

Yes. Mermaid Online MCP — Share Links & Source is open source, so you can use and self-host it for free.

### How do I add Mermaid Online MCP — Share Links & Source to Claude Code?

Run this command in your terminal: claude mcp add mermaidonline -- npx -y mermaidonline-mcp

### What are the best alternatives to Mermaid Online MCP — Share Links & Source?

The closest alternatives to Mermaid Online MCP — Share Links & Source are Agentic Mermaid, DrillFlow, Flowsimp, diagonaldiagrams and GitDiagram.

## Where this comes from

- Description: written from the project's README and the project's website.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Agentic Mermaid](https://ai-powered.com/mcp/agentic-mermaid): Agentic Mermaid is an open-source MCP server for developer tools.
- [DrillFlow](https://ai-powered.com/mcp/drillflow): DrillFlow is a freemium MCP server for design and media.
- [Flowsimp](https://ai-powered.com/mcp/flowsimp): Flowsimp is a free MCP server for design and media.
- [diagonaldiagrams](https://ai-powered.com/mcp/diagonaldiagrams): diagonaldiagrams is an open-source MCP server for design and media.
- [GitDiagram](https://ai-powered.com/mcp/gitdiagram): GitDiagram is a free MCP server for developer tools.
- [draw.io](https://ai-powered.com/mcp/draw-io): draw.io is an open-source MCP server for design and media.
- [Product Pillars](https://ai-powered.com/mcp/product-pillars): Product Pillars is an MCP server for design and media.
- [Archform](https://ai-powered.com/mcp/archform): Archform is an open-source MCP server for design and media.

---
Source: https://ai-powered.com/mcp/mermaid-online-mcp-share-links-and-source
