Sailor is an MCP server that generates and renders Mermaid diagrams into images using LLMs. Built using FastMCP, it connects AI clients like Claude Desktop to Mermaid rendering tools, giving software engineers, architects, and technical writers a streamlined way to create visual documentation. Users can prompt an AI assistant in natural language to design flowcharts, sequence diagrams, class models, entity-relationship diagrams, Gantt charts, state machines, and mindmaps. Sailor then validates the generated syntax and compiles it into visual image formats such as PNGs with customizable themes and background transparencies. In addition to client-based MCP workflows, Sailor includes a standalone Flask web interface for interactive browser-based generation using OpenAI or Anthropic API keys. Whether deployed locally via Docker stdio or hosted remotely over HTTP/SSE transports, Sailor enables developers to inspect code, request targeted diagram enhancements, and quickly receive rendered visual assets directly in their conversational workspace.
Category: Design, Media & Creative
Tags: diagrams, mermaid, rendering, visualization
bash git clone https://github.com/aj-geddes/sailor.git cd sailor docker build -f Dockerfile.mcp-stdio -t sailor-mcp . 2. Open your Claude Desktop configuration file (claude_desktop_config.json). 3. Add the server under mcpServers using the stdio transport: json { "mcpServers": { "sailor-mermaid": { "command": "docker", "args": [ "run", "-i", "--rm", "-v", "/path/to/output:/output", "sailor-mcp" ] } } } 4. Alternatively, configure a remote instance over HTTP: json { "mcpServers": { "sailor-remote": { "transport": { "type": "streamable-http", "url": "https://your-sailor-instance.up.railway.app/mcp" } } } } 5. Restart Claude Desktop completely to load the new server.Part of MCP Servers
You can install Sailor locally using Docker by building Dockerfile.mcp-stdio from the repository. Once built, register the container in your Claude Desktop configuration file with a volume mount for the output directory, then restart the application. It can also be hosted remotely over HTTP or run as a local Flask web application.
Sailor generates, validates, and renders Mermaid diagram code into PNG images. It supports all standard Mermaid types including flowcharts, sequence diagrams, ER diagrams, Gantt charts, and mindmaps. It provides tools for code analysis, visual customization such as dark themes or hand-drawn looks, and guided prompt wizards.
Sailor is compatible with Claude Desktop through either local standard input/output (stdio) Docker execution or remote streamable HTTP connections. It also works with any custom client capable of communicating with standard Model Context Protocol servers.
When connecting to a remote instance that cannot write directly to your local file system, call the validate_and_render_mermaid or get_diagram tool with return_base64_text set to true. This returns base64 image data that you can decode and save locally.