This guide explains how to integrate UML-MCP with Claude Desktop for generating diagrams directly in your conversations.
Claude Desktop can connect to the UML-MCP server through the Model Context Protocol (MCP), allowing you to generate and visualize UML diagrams and other supported diagram types within your Claude conversations.
Make sure you have the UML-MCP server properly installed and configured on your system. See the Installation guide for details.
Claude Desktop requires specific configuration to connect to the UML-MCP server:
/path/to/uml-mcp/server.py (replace with actual path)/path/to/uml-mcp (replace with actual path)Example configuration (see also config/claude_desktop_config.json and config/README.md in the repo):
{
"mcpServers": {
"UML-MCP-Server": {
"command": "python",
"args": ["/path/to/uml-mcp/server.py"],
"cwd": "/path/to/uml-mcp"
}
}
}
Example prompt:
Create a UML class diagram for a simple e-commerce system with Customer, Product, and Order classes.
If Claude Desktop cannot connect to the UML-MCP server:
If diagrams aren’t being generated correctly:
You can customize how diagrams appear in Claude Desktop by modifying the templates in the UML-MCP server. See Advanced Configuration for details.
Claude Desktop works best with SVG and PNG formats. You can specify the preferred format in your prompts to Claude or configure defaults in the UML-MCP server.