Atlas / MCP servers / rtuin / Mermaid Validator

Mermaid ValidatorSAFE

mcp/rtuin/mermaid-validator

A Model Context Protocol server that validates and renders Mermaid diagrams.

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
1 1r · 0w · 0d
Transport
stdio
License
MIT
Stars
57
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

A Model Context Protocol server that validates and renders Mermaid diagrams. This server enables LLMs to validate and render Mermaid diagrams.

Usage

Quick Start

You can configure your MCP client to use the Mermaid Validator by adding it to your mcp servers file:

{
"mcpServers": {
"mermaid-validator": {
"command": "npx",
"args": [
"-y",
"@rtuin/mcp-mermaid-validator@latest"
]
}
}
}

Architecture

High-Level Architecture

This project is structured as a simple TypeScript Node.js application that:

  1. Main Application: A Node.js service that validates Mermaid diagrams and returns rendered PNG output
  2. MCP Integration: Uses the Model Context Protocol SDK to expose functionality to MCP-compatible clients
  3. Mermaid CLI Integration: Leverages the Mermaid CLI tool to perform diagram validation and rendering

Code Structure

mcp-mermaid-validator/
├── dist/                   # Compiled JavaScript output
│   └── main.js             # Compiled main application
├── src/                    # TypeScript source code
│   └── main.ts             # Main application entry point
├── node_modules/           # Dependencies
├── package.json            # Project dependencies and scripts
├── package-lock.json       # Dependency lock file
├── tsconfig.json           # TypeScript configuration
├── eslint.config.js        # ESLint configuration
├── .prettierrc             # Prettier configuration
└── README.md               # Project documentation

Component Functionality

MCP Server (Main Component)

The core functionality is implemented in src/main.ts. This component:

  1. Creates an MCP server instance
  2. Registers a validateMermaid tool that accepts Mermaid diagram syntax
  3. Uses the Mermaid CLI to validate and render diagrams
  4. Returns validation results and rendered PNG (if valid)
  5. Handles error cases with appropria
Read from source at commit fb805d7ba735OBSERVED · 2026-10-08
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add mcp-mermaid-validator -- npx -y @rtuin/[email protected]
claude-desktop
{
  "mcpServers": {
    "mcp-mermaid-validator": {
      "command": "npx",
      "args": [
        "-y",
        "@rtuin/[email protected]"
      ]
    }
  }
}
03

Exposed tools (1)

1 read · 0 write · 0 destructive.

ToolRiskDescription
validateMermaidreadValidates a Mermaid diagram and returns the rendered image (PNG or SVG) if valid
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (1)

LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@mermaid-js/mermaid-cli, @modelcontextprotocol/sdk, zod, @eslint/js, @types/node, eslint, eslint-config-prettier, globals
Why it matters. 11 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha fb805d7ba735full audit observations/trust-audit/mcp-server/rtuin__mermaid-validator.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-08fb805d7ba735SAFEB89first audit
06

Questions

What is the Mermaid Validator MCP server?

A Model Context Protocol server that validates and renders Mermaid diagrams.

What tools does Mermaid Validator expose?

1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Mermaid Validator safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does Mermaid Validator need?

No credential environment variables were found in its source, so it appears to need none.

How does Mermaid Validator run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as @rtuin/mcp-mermaid-validator at 0.7.0.

How current is this page?

The grade is for one exact copy of the source (fb805d7ba735), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement