design-viewer-mcp
Allows creating and sharing Mermaid diagrams by submitting Mermaid source code through the MCP server, which stores each design and renders it as a shareable web page.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@design-viewer-mcpRender a Mermaid flowchart of the login flow and share the link."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
design-viewer
A small Hono service that takes Mermaid designs pushed from an MCP tool and serves them as clean, shareable web pages.
Claude / agent ──serve_design──▶ design-viewer-mcp (stdio) ──POST /api/designs──▶ design-viewer :3100
│
~/.design-viewer/designs.json │GET /— every design, newest first, with title and timestampGET /designs/:id— title, description, and the Mermaid diagram rendered in the browserGET /healthz,GET /api/designs,GET /api/designs/:id,POST /api/designs
Designs live in memory while the service runs and are flushed to
~/.design-viewer/designs.json on every write (temp file + rename, so a crash cannot
leave a half-written file). An unparsable data file is moved aside with a
.corrupt-<timestamp> suffix rather than blocking startup.
MCP tool: serve_design
input | type | notes |
| string | short name, shown in the index and the page heading |
| string | one or two sentences shown above the diagram (may be empty) |
| string | Mermaid source, without the |
Returns { id, url } — url is the page to open, e.g.
http://hp-z420-mint-steve:3100/designs/7. Links are built from DESIGN_VIEWER_PUBLIC_URL
at request time, so changing that one setting rewrites every link the service emits.
The tool runs as a stdio MCP server and posts to the running service, so the service stays the single writer of the data file. If the service is down the tool returns an error telling you to start it.
Related MCP server: Mermaid MCP Server
Layout
src/config.ts env parsing (PORT, DESIGN_VIEWER_HOST, *_DATA_DIR, *_PUBLIC_URL)
src/store.ts in-memory store + atomic JSON flush
src/render.ts HTML pages, HTML escaping, pinned Mermaid CDN import
src/app.ts Hono routes (web pages + JSON API)
src/server.ts entry point: loads the store, serves on PORT
src/mcp.ts stdio MCP server exposing serve_design
scripts/smoke-test.mjs end-to-end test (HTTP + MCP + restart)
systemd/design-viewer.serviceBuild
npm install
npm run build # tsc, strict mode
npm run smoke # boots the service on :3199 and exercises everything aboveRun
npm start # foreground, http://localhost:3100
node dist/mcp.js # the MCP stdio serversystemd (user unit)
mkdir -p ~/.config/systemd/user
cp systemd/design-viewer.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now design-viewer
journalctl --user -u design-viewer -fThe unit expects node at ~/.local/bin/node; adjust ExecStart if Node lives
elsewhere. User services need lingering to start at boot (loginctl enable-linger $USER), which is already enabled on the Z420.
Overrides go in ~/.config/design-viewer/env (KEY=value lines); see
.env.example.
Registering the MCP tool
Claude Code reads the tool over stdio. On the machine the service runs on:
claude mcp add design-viewer --scope user \
--env DESIGN_VIEWER_URL=http://localhost:3100 \
-- node /home/pastry/projects/design-viewer/dist/mcp.jsFrom another machine on the mesh, point the tool at the Z420 by its MagicDNS name —
node runs locally, only the POST crosses the mesh:
claude mcp add design-viewer --env DESIGN_VIEWER_URL=http://hp-z420-mint-steve:3100 -- \
node /path/to/design-viewer/dist/mcp.jsThe MagicDNS name is also what the returned links use, so nothing needs a tunnel or an IP lookup: open the URL the tool returns in a browser on any tailnet device.
Registered on the G14 at user scope with:
claude mcp add design-viewer --scope user \
-e DESIGN_VIEWER_URL=http://hp-z420-mint-steve:3100 -- \
/home/pastrycak3s/.nvm/versions/node/v24.14.0/bin/node \
/home/pastrycak3s/projects/design-viewer/dist/mcp.jsThe command path is absolute on purpose — Claude Code spawns the server with its own
environment, so a bare node only resolves if nvm's PATH was loaded when the CLI
started. The tradeoff is that it pins Node v24.14.0: after removing that version,
update the path (claude mcp get design-viewer to check, claude mcp remove design-viewer -s user to start over). Newly added servers need a CLI restart before
their tools appear in a running session.
Environment
variable | default | meaning |
|
| listen port; the default link follows it |
|
| bind address; use |
|
| directory holding |
|
| exact data file |
|
| base URL used in returned links; the Z420 runs with |
|
| where the MCP server posts |
|
| MCP POST timeout |
Notes
Mermaid is loaded from jsDelivr, pinned to 11.17.2, with
securityLevel: "strict". If the CDN is unreachable the page falls back to showing the stored Mermaid source.Titles, descriptions and diagram source are HTML-escaped on output; the renderer never interpolates stored content raw.
Deleting a design is not exposed on purpose — the index is append-only history.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to generate and render Mermaid diagrams (flowcharts, sequence diagrams, etc.) as PNG/SVG images with local file saving and HTTP access URLs. Supports batch processing and intelligent caching for efficient diagram creation.1121MIT
- AlicenseNot gradedqualityDmaintenanceEnables agents to search official Mermaid diagram syntax documentation and validate Mermaid diagram code before presenting it to users, ensuring syntactically correct flowcharts, sequence diagrams, class diagrams, and other Mermaid visualizations.4,476MIT
- FlicenseNot gradedqualityDmaintenanceEnables the dynamic generation of various software development diagrams, such as flowcharts, sequence diagrams, and architecture diagrams, using Mermaid syntax. It includes tools for diagram validation and provides instructions for exporting results to multiple formats including SVG and PNG.
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, modify, and share diagrams on a live Excalidraw canvas through MCP tools, supporting shapes, text, arrows, batch operations, and export to shareable links with images.3,0738MIT
Related MCP Connectors
Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagr…
Publish web pages straight from your AI assistant and share them with a link.
Let Claude, Cursor, or ChatGPT author Mermaid diagrams your team can read and share.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/patrickmfurbert/design-viewer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server