UML-MCP
About
UML-MCP Server is a UML diagram generation tool based on MCP (Model Context Protocol), which can help users generate various types of UML diagrams through natural language description or directly writing PlantUML and Mermaid and Kroki
Details
- Transport
- SSE
- License
- MIT license
Explore
- Multiple Diagram Types: Support for UML diagrams (Class, Sequence, Activity, etc.), Mermaid, D2, and more
- MCP Integration: Seamless integration with LLM assistants supporting the Model Context Protocol
- Playground Links: Direct links to online editors for each diagram type
- Multiple Output Formats: SVG, PNG, PDF, and other format options
- Easy Configuration: Works with local and remote diagram rendering services
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
UML-MCPCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
- Python 3.10 or higher
- pip (Python package installer)
Start the MCP server:
``bash`
python mcp_server.py
This will start the server using stdio for communication with MCP clients.
- MCP_OUTPUT_DIR - Directory to save generated diagrams (default: ./output)KROKI_SERVER
- - URL of the Kroki server (default: https://kroki.io)PLANTUML_SERVER
- - URL of the PlantUML server (default: http://plantuml-server:8080)USE_LOCAL_KROKI
- - Use local Kroki server (true/false)USE_LOCAL_PLANTUML` - Use local PlantUML server (true/false)
-
pip install -r requirements.txt
bashlist_diagram_types
List supported diagram types with Kroki backend, description, and formats (same data as uml://types resource). Use when the client cannot read resources.
generate_uml_batch
Generate multiple diagrams in one call. Each item is like generate_uml (diagram_type, code, output_format?, theme?, scale?). Optional shared output_dir for all items. Returns a list of per-index results or errors.
generate_uml
Generate any UML or diagram by type (class, sequence, mermaid, d2, etc.)
validate_uml
Validate diagram type, format, code length, and basic syntax locally before render (no Kroki call). Returns errors and suggestions.
The server implements multiple diagram generation tools:
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"uml-mcp": {
"uml-mcp": {
"transport": "http",
"url": "https://uml-mcp.vercel.app/mcp"
},
"sequential-thinking": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sequential-thinking"
]
}
}
}
}
McpServers
{
"uml-mcp": {
"transport": "http",
"url": "https://uml-mcp.vercel.app/mcp"
},
"sequential-thinking": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sequential-thinking"
]
}
}
🌟 Features
- Multiple Diagram Types: Support for UML diagrams (Class, Sequence, Activity, etc.), Mermaid, D2, and more - MCP Integration: Seamless integration with LLM assistants supporting the Model Context Protocol - Playground Links: Direct links to online editors for each diagram type - Multiple Output Formats: SVG, PNG, PDF, and other format options - Easy Configuration: Works with local and remote diagram rendering services📋 Supported Diagram Types
UML-MCP supports a wide variety of diagram types: | Category | Diagram Types | |----------|---------------| | UML | Class, Sequence, Activity, Use Case, State, Component, Deployment, Object | | Other | Mermaid, D2, Graphviz, ERD, BlockDiag, BPMN, C4 with PlantUML |🚀 Getting Started
Prerequisites
- Python 3.10 or higher - pip (Python package installer)Installation
1. Clone the repository: ``bash
git clone https://github.com/yourusername/uml-mcp.git
cd uml-mcp
`
2. Install the dependencies:
`bash
pip install -r requirements.txt
`
3. For development environments:
`bash
pip install -r requirements-dev.txt
`
Running the Server
Start the MCP server:
`bash
python mcp_server.py
`
This will start the server using stdio for communication with MCP clients.
🔧 Configuration
Editor Integration
Cursor
To integrate with Cursor:
`bash
python mcp/install_to_cursor.py
`
Or manually configure in Cursor settings:
`json
"mcpServers": {
"UML-MCP-Server": {
"command": "python",
"args": ["/path/to/uml-mcp/mcp_server.py"],
"output_dir": "/path/to/output"
}
}
`
Environment Variables
- MCP_OUTPUT_DIR - Directory to save generated diagrams (default: ./output)
- KROKI_SERVER - URL of the Kroki server (default: https://kroki.io)
- PLANTUML_SERVER - URL of the PlantUML server (default: http://plantuml-server:8080)
- USE_LOCAL_KROKI - Use local Kroki server (true/false)
- USE_LOCAL_PLANTUML - Use local PlantUML server (true/false)
📚 Documentation
For detailed documentation, visit the docs directory or our documentation site.
🧩 Architecture
UML-MCP is built with a modular architecture:
- MCP Server Core: Handles MCP protocol communication
- Diagram Generators: Supporting different diagram types
- Tools: Expose diagram generation functionality through MCP
- Resources: Provide templates and examples for various diagram types
🛠️ Local Development
For local development:
1. Set up local PlantUML and/or Kroki servers:
``bashSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



