A dockerized MCP (Model Context Protocol) server for Mermaid diagram generation and manipulation.
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.
- Generate Mermaid diagrams from code
- Analyze diagram structure
- Suggest diagram improvements
- Create workflow diagrams
- Export diagrams in various formats
- Validate diagram syntax
- Clone this repository:
git clone <your-repo-url>
cd mermaid-mcp- Run the server:
docker compose upThe server will:
- Use the embedded MCP Mermaid server source code
- Install dependencies
- Build the project
- Start the MCP server (communicates via stdio, not HTTP)
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"The MCP server communicates via stdio (standard input/output) following the Model Context Protocol. It does not run an HTTP 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├── 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
- Docker
- Docker Compose
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.
If you encounter issues:
- Check the container logs:
docker compose logs- Ensure Docker is properly installed
- The server communicates via stdio - the "exit" is normal behavior
This project follows the license of the original mcp-server-mermaid repository.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request