docker-mermaid-diagram-server

moreWax/docker-mermaid-diagram-server

3.1

If you are the rightful owner of docker-mermaid-diagram-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A dockerized MCP server for generating and manipulating Mermaid diagrams.

Docker Mermaid Diagram Server

A dockerized MCP (Model Context Protocol) server for Mermaid diagram generation and manipulation.

Overview

This project provides a Docker container that runs an MCP server for creating, analyzing, and manipulating Mermaid diagrams. The server includes complete source code from the MCP Mermaid server project.

Features

  • Generate Mermaid diagrams from code
  • Analyze diagram structure
  • Suggest diagram improvements
  • Create workflow diagrams
  • Export diagrams in various formats
  • Validate diagram syntax

Quick Start

Using Docker Compose

  1. Clone this repository:
git clone <your-repo-url>
cd mermaid-mcp
  1. Run the server:
docker compose up

The server will:

  • Use the embedded MCP Mermaid server source code
  • Install dependencies
  • Build the project
  • Start the MCP server (communicates via stdio, not HTTP)

Alternative: Using Docker directly

If you prefer to use Docker directly instead of docker-compose:

# Run the server directly with Docker
docker run -it --rm -p 3000:3000 -v $(pwd):/app -w /app node:18 \
  bash -c "echo 'Starting Mermaid Diagram Server setup...' && \
  rm -rf mcp-mermaid-server && \
  git clone https://github.com/moreWax/mcp-server-mermaid.git mcp-mermaid-server && \
  cd mcp-mermaid-server && \
  npm install && npm run build && npm start"

Configuration

The MCP server communicates via stdio (standard input/output) following the Model Context Protocol. It does not run an HTTP server.

Testing the Server

To test that the server is working, you can send it MCP protocol messages:

# List available tools
cd mcp-mermaid-server
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npm start

Project Structure

ā”œā”€ā”€ docker-compose.yml    # Docker Compose configuration
ā”œā”€ā”€ README.md           # This file
ā”œā”€ā”€ .gitignore          # Git ignore rules
└── mcp-mermaid-server/ # Complete MCP server source code
    ā”œā”€ā”€ src/            # TypeScript source files
    ā”œā”€ā”€ package.json    # Dependencies and scripts
    └── ...             # Configuration and build files

Requirements

  • Docker
  • Docker Compose

Development

The container uses the embedded MCP Mermaid server source code, installs dependencies, builds the project, and starts the server. All source code is included in the repository.

Troubleshooting

If you encounter issues:

  1. Check the container logs:
docker compose logs
  1. Ensure Docker is properly installed
  2. The server communicates via stdio - the "exit" is normal behavior

License

This project follows the license of the original mcp-server-mermaid repository.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Links