# Mermaid, Graphviz & Chart to PNG, SVG or PDF

> Mermaid, Graphviz & Chart to PNG, SVG or PDF is a paid MCP server for files and documents. Renders Mermaid, Graphviz, Vega-Lite and Chart.js code to PNG, SVG or PDF links for agents. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Paid
- **Platforms:** Web, API, CLI
- **Website:** https://apify.com/fluidfaith/mermaid-chart-renderer
- **Repository:** https://github.com/faithdrivencreator/apify-agent-tools/tree/HEAD/mermaid-chart-renderer
- **MCP Registry name:** io.github.faithdrivencreator/mermaid-chart-renderer
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [design and media](https://ai-powered.com/categories/design-and-media), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Agents often write diagram or chart code but have no way to turn it into an image they can paste into chat, email or a document. This service accepts Mermaid, Graphviz DOT, Vega-Lite, Vega, Chart.js configs or raw SVG and returns a public link to the rendered file in PNG, SVG or PDF form.

When the submitted code fails to parse, the response carries the parser's message, the line number and the text of that line, along with a short fix hint, so an agent can correct the line and resubmit. Failed renders are not billed, and each successful diagram costs $0.003 with a per-run spending cap.

It is offered as a remote MCP server for Claude, Cursor, VS Code and other MCP clients, and as an Apify Actor callable over a single HTTP request or from JavaScript and Python.

## Features

- **Six diagram languages:** Accepts Mermaid, Graphviz, Vega-Lite, Vega, Chart.js and SVG, and detects the type from the code when none is given.
- **Line-level error reports:** Parse failures return the error message, line number, offending text and a hint, so the calling agent can fix and retry.
- **Multiple output formats:** Renders PNG (up to 4x density, optional transparent background), SVG with inline markup, or PDF sized to the diagram.
- **Batch rendering:** Up to 100 diagrams per run, with per-diagram names, themes and backgrounds, and optional fetching of code from a public URL.
- **Theme options:** Mermaid default, dark, neutral and forest themes, plus a custom background colour setting.
- **Offline, sandboxed rendering:** Rendering makes no network requests, strips scripts from SVG, and runs Mermaid in strict security mode.

## Good for

- Have an agent attach a flowchart or sequence diagram to a Slack or email reply
- Generate a chart image from Vega-Lite or Chart.js data for a report or Google Doc
- Export architecture or deployment diagrams from a repository's Mermaid or DOT files as PNG or SVG
- Produce print-ready PDF diagrams from agent-written code
- Let a coding assistant verify and fix diagram syntax before sharing

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http mermaid-chart-renderer 'https://mcp.apify.com/?tools=fluidfaith/mermaid-chart-renderer'
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://mcp.apify.com/?tools=fluidfaith/mermaid-chart-renderer
```

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

```json
{
  "mcpServers": {
    "mermaid-chart-renderer": {
      "url": "https://mcp.apify.com/?tools=fluidfaith/mermaid-chart-renderer"
    }
  }
}
```

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

```json
{
  "servers": {
    "mermaid-chart-renderer": {
      "type": "http",
      "url": "https://mcp.apify.com/?tools=fluidfaith/mermaid-chart-renderer"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mermaid-chart-renderer": {
      "serverUrl": "https://mcp.apify.com/?tools=fluidfaith/mermaid-chart-renderer"
    }
  }
}
```

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://mcp.apify.com/?tools=fluidfaith/mermaid-chart-renderer
```

Enter a Name (for example "Mermaid, Graphviz & Chart to PNG, SVG or PDF"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

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

```json
{
  "mcpServers": {
    "mermaid-chart-renderer": {
      "type": "http",
      "url": "https://mcp.apify.com/?tools=fluidfaith/mermaid-chart-renderer"
    }
  }
}
```

## FAQ

### Which Mermaid diagram types are supported?

The listing states support for Mermaid 12, including flowchart, sequence, class, state, ER, gantt, pie, mindmap, timeline, journey, git graph, quadrant, sankey, XY chart, block, packet, kanban and architecture diagrams.

### Are failed renders charged?

No. Code that returns an error, links that are refused and diagrams that hit the time limit are not billed.

### Can Vega-Lite charts load data from a URL?

Not inside the spec, because rendering runs offline. Data can be placed under data.values, or the whole spec can be fetched with sourceUrl.

### Can I get a transparent PNG?

Yes, by setting the background option to transparent.

### Is Mermaid, Graphviz & Chart to PNG, SVG or PDF free?

No. Mermaid, Graphviz & Chart to PNG, SVG or PDF is a paid product.

### How do I add Mermaid, Graphviz & Chart to PNG, SVG or PDF to Claude Code?

Run this command in your terminal: claude mcp add --transport http mermaid-chart-renderer 'https://mcp.apify.com/?tools=fluidfaith/mermaid-chart-renderer'

### What are the best alternatives to Mermaid, Graphviz & Chart to PNG, SVG or PDF?

The closest alternatives to Mermaid, Graphviz & Chart to PNG, SVG or PDF are Agentic Mermaid, Mermaid Render MCP, diagonaldiagrams, Media Forge and Dgmo MCP.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- 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.
- [Mermaid Render MCP](https://ai-powered.com/mcp/mermaid-render-mcp): Mermaid Render MCP is an open-source MCP server for cloud and infrastructure.
- [diagonaldiagrams](https://ai-powered.com/mcp/diagonaldiagrams): diagonaldiagrams is an open-source MCP server for design and media.
- [Media Forge](https://ai-powered.com/mcp/media-forge): Media Forge is an open-source MCP server for developer tools.
- [Dgmo MCP](https://ai-powered.com/mcp/dgmo-mcp): Dgmo MCP is a freemium MCP server for design and media.
- [Vaults Diagram Tools](https://ai-powered.com/mcp/vaults-diagram-tools): Vaults Diagram Tools is an open-source MCP server for developer tools.
- [Glyphic](https://ai-powered.com/mcp/glyphic): Glyphic is a freemium MCP server for developer tools.
- [AIGUI](https://ai-powered.com/mcp/aigui): AIGUI is an open-source MCP server for design and media.

---
Source: https://ai-powered.com/mcp/mermaid-graphviz-and-chart-to-png-svg-or-pdf
