ai-agent

Mermaid Server

Go implementation of a HTTP server to allow remote generation of mermaid-js diagrams without any pre-requisites installed locally.
436 stars63 forksGoUpdated 12/20/2024100% free · open source
What it does

Runs a tiny HTTP service that turns Mermaid markup into PNG/SVG images without installing Mermaid locally.

When to use it
  • You need to generate diagrams on the fly from a web app or CI pipeline and don’t want to bundle Node.js/mermaid-cli in each environment.
  • Your team uses Go for deployment and prefers a single binary to serve diagram images.
  • You want a central diagram‑rendering endpoint to avoid rate‑limits or latency of third‑party SaaS services.
Ready-to-paste prompt
curl -X POST -H "Content-Type: application/json" -d '{"code":"sequenceDiagram\n    participant Alice\n    participant Bob\n    Alice->>Bob: Hello Bob, how are you?\n    Bob-->>Alice: I am good!"}' http://localhost:8080/png > hello.png
Heads up: The server spawns `mmdc` (mermaid‑cli) under the hood, so Node.js and the mermaid‑cli package must be installed globally (`npm i -g @mermaid-js/mermaid-cli`) before the first run, otherwise the binary exits with “cannot find mmdc”.
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

✅ Light setup

Installs with a command or two; your AI agent can do it for you.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/mermaid-server && curl -fsSL https://workflowstacks.com/api/skills/mermaid-server/claude-skill -o ~/.claude/skills/mermaid-server/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How Mermaid Server works
Codeflow
Free to inspect

Mermaid Server is a tiny Go project (~400 lines across 6 code files). Setup is light: installs like a normal app. Reading the code is optional. Last commit 21 months ago, MIT license, no tests found.

Size
Tiny codebase
~400 lines · 6 code files · 3 min skim
Setup
One-command install
Installs like a normal app. Reading the code is optional.
Runs on
Go · Docker
No API keys detected
Go 88%Dockerfile 10%Makefile 2%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    cmd/app/main.go
    Where the program starts running
  3. 3
    go.mod
    Dependencies and the commands it exposes
  4. 4
    internal/cache.go
    Inside internal/ — the main logic begins here
What's in each folder
internal/Core code — the actual logic5 files
cmd/Command-line entry points1 files
mermaidcli/Folder2 files
.github/CI / automation (GitHub Actions)3 files
READMENo tests foundThin docsCI checksDocker readyMIT licenseLast update 21 mo ago
Quick Actions
Details
Creator
TomWright
Language
Go
Category
ai-agent
Published
4/6/2020

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.