moreWax/docker-mermaid-diagram-server
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
- Clone this repository:
git clone <your-repo-url>
cd mermaid-mcp
- 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:
- Check the container logs:
docker compose logs
- Ensure Docker is properly installed
- The server communicates via stdio - the "exit" is normal behavior
License
This project follows the license of the original mcp-server-mermaid repository.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request