Generate and render Mermaid diagrams as images using LLMs.
Get a picture of your Mermaid! ๐จ
Sailor combines a beautiful web interface with an MCP (Model Context Protocol) server for generating and rendering Mermaid diagrams. Use the web UI for interactive diagram creation, or integrate with Claude Desktop for AI-powered diagram generation through natural language.
Choose your preferred way to use Sailor:
git clone https://github.com/aj-geddes/sailor.git
cd sailor
cd backend
cp .env.example .env
# Edit .env with your API keys
docker-compose up -d
Prerequisites: Docker Desktop + Claude Desktop
git clone https://github.com/aj-geddes/sailor.git
cd sailor
docker build -f Dockerfile.mcp-stdio -t sailor-mcp .
Add the following to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"sailor-mermaid": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"C:\\Users\\YourName\\Pictures:/output",
"sailor-mcp"
]
}
}
}
Note: Replace C:\\Users\\YourName\\Pictures
with your desired output directory.
Completely close and reopen Claude Desktop to load the new configuration.
Once configured, you can use natural language commands in Claude Desktop:
Images are automatically saved to your configured output directory.
request_mermaid_generation
Request AI to generate Mermaid diagram code based on your description.
validate_and_render_mermaid
Validate and render existing Mermaid code as an image.
get_mermaid_examples
Get examples of different Mermaid diagram types.
default
, dark
, forest
, neutral
classic
, handDrawn
transparent
, white
TB
(top-bottom), LR
(left-right), BT
, RL
sailor/
โโโ backend/ # Web UI Flask application
โ โโโ app.py # Main Flask server
โ โโโ static/ # Frontend files (HTML/CSS/JS)
โ โโโ requirements.txt # Web UI dependencies
โ โโโ .env.example # Environment template
โโโ src/
โ โโโ sailor_mcp/ # MCP server implementation
โ โโโ server.py # Main MCP server
โ โโโ stdio_wrapper.py # Claude Desktop communication
โ โโโ renderer.py # Mermaid rendering engine
โ โโโ validators.py # Syntax validation
โ โโโ prompts.py # AI prompt templates
โโโ tests/ # Comprehensive test suite
โโโ Dockerfile.mcp-stdio # MCP server container
โโโ docker-compose.yml # Multi-service setup
โโโ setup.py # Python package setup
โโโ requirements.txt # MCP dependencies
# Setup environment
cd backend
cp .env.example .env
# Edit .env with your API keys
# Install dependencies
pip install -r requirements.txt
# Run Flask development server
python app.py
# Access at http://localhost:5000
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
# Install Playwright browsers
playwright install chromium
# Run tests
pytest
# Run MCP server directly
python -m sailor_mcp.stdio_wrapper
# Run everything with Docker Compose
docker-compose up --build
# Web UI: http://localhost:5000
# MCP Server: Available for Claude Desktop integration
docker images | grep sailor-mcp
Test the server manually:
docker run -i --rm sailor-mcp
Check Docker logs:
docker logs $(docker ps -a | grep sailor-mcp | awk '{print $1}')
MIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Made with โค๏ธ for Claude Desktop users
Interact with various build systems including Gradle, Maven, NPM/Yarn, Cargo, Python, Makefile, and CMake.
MCP server empowers LLMs to interact with JSON files efficiently. With JSON MCP, you can split, merge, etc.
A command-line interface wrapper for the Google Gemini API, enabling interaction with Gemini's Search and Chat tools.
Set up and interact with your unstructured data processing workflows in Unstructured Platform
Navigate your OpenTelemetry resources, investigate incidents and query metrics, logs and traces on Dash0.
A server for Zep, a long-term memory store for AI applications, requiring a ZEP_API_KEY for access.
A comprehensive MCP server for managing OPNsense firewalls, offering over 300 tools for configuration and monitoring.
MCP Server for PGYER platform, supports uploading, querying apps, etc.
Work on dataset metadata with MLCommons Croissant validation and creation.
Tools for Xcode project management, building, testing, archiving, code signing, and iOS development utilities.