{"id":28769084,"url":"https://github.com/antoinebou12/uml-mcp","last_synced_at":"2025-08-28T06:36:56.122Z","repository":{"id":285491657,"uuid":"958318828","full_name":"antoinebou12/uml-mcp","owner":"antoinebou12","description":"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","archived":false,"fork":false,"pushed_at":"2025-08-15T11:31:37.000Z","size":5862,"stargazers_count":36,"open_issues_count":16,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T15:35:37.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoinebou12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-01T02:10:30.000Z","updated_at":"2025-08-07T08:40:41.000Z","dependencies_parsed_at":"2025-08-04T21:22:00.059Z","dependency_job_id":null,"html_url":"https://github.com/antoinebou12/uml-mcp","commit_stats":null,"previous_names":["antoinebou12/uml-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antoinebou12/uml-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinebou12%2Fuml-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinebou12%2Fuml-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinebou12%2Fuml-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinebou12%2Fuml-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoinebou12","download_url":"https://codeload.github.com/antoinebou12/uml-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinebou12%2Fuml-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272453932,"owners_count":24937487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-17T13:03:38.284Z","updated_at":"2025-08-28T06:36:56.116Z","avatar_url":"https://github.com/antoinebou12.png","language":"Python","funding_links":[],"categories":["Python","📚 Projects (1974 total)","Content Creation"],"sub_categories":["MCP Servers"],"readme":"# UML-MCP: A Diagram Generation Server with MCP Interface\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![smithery badge](https://smithery.ai/badge/@antoinebou12/uml)](https://smithery.ai/server/@antoinebou12/uml)\n\nUML-MCP is a powerful diagram generation server that implements the Model Context Protocol (MCP), enabling seamless diagram creation directly from AI assistants and other applications. \n\n## 🌟 Features\n\n- **Multiple Diagram Types**: Support for UML diagrams (Class, Sequence, Activity, etc.), Mermaid, D2, and more\n- **MCP Integration**: Seamless integration with LLM assistants supporting the Model Context Protocol\n- **Playground Links**: Direct links to online editors for each diagram type\n- **Multiple Output Formats**: SVG, PNG, PDF, and other format options\n- **Easy Configuration**: Works with local and remote diagram rendering services\n\n## 📋 Supported Diagram Types\n\nUML-MCP supports a wide variety of diagram types:\n\n| Category | Diagram Types |\n|----------|---------------|\n| UML | Class, Sequence, Activity, Use Case, State, Component, Deployment, Object |\n| Other | Mermaid, D2, Graphviz, ERD, BlockDiag, BPMN, C4 with PlantUML |\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Python 3.10 or higher\n- pip (Python package installer)\n\n### Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/uml-mcp.git\ncd uml-mcp\n```\n\n2. Install the dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n3. For development environments:\n\n```bash\npip install -r requirements-dev.txt\n```\n\n### Running the Server\n\nStart the MCP server:\n\n```bash\npython mcp_server.py\n```\n\nThis will start the server using stdio for communication with MCP clients.\n\n## 🔧 Configuration\n\n### Editor Integration\n\n#### Cursor\n\nTo integrate with Cursor:\n\n```bash\npython mcp/install_to_cursor.py\n```\n\nOr manually configure in Cursor settings:\n\n```json\n\"mcpServers\": {\n  \"UML-MCP-Server\": {\n    \"command\": \"python\",\n    \"args\": [\"/path/to/uml-mcp/mcp_server.py\"],\n    \"output_dir\": \"/path/to/output\"\n  }\n}\n```\n\n### Environment Variables\n\n- `MCP_OUTPUT_DIR` - Directory to save generated diagrams (default: `./output`)\n- `KROKI_SERVER` - URL of the Kroki server (default: `https://kroki.io`)\n- `PLANTUML_SERVER` - URL of the PlantUML server (default: `http://plantuml-server:8080`)\n- `USE_LOCAL_KROKI` - Use local Kroki server (true/false)\n- `USE_LOCAL_PLANTUML` - Use local PlantUML server (true/false)\n\n## 📚 Documentation\n\nFor detailed documentation, visit the [docs](./docs) directory or our [documentation site](https://uml-mcp.readthedocs.io/).\n\n## 🧩 Architecture\n\nUML-MCP is built with a modular architecture:\n\n- **MCP Server Core**: Handles MCP protocol communication\n- **Diagram Generators**: Supporting different diagram types\n- **Tools**: Expose diagram generation functionality through MCP\n- **Resources**: Provide templates and examples for various diagram types\n\n## 🛠️ Local Development\n\nFor local development:\n\n1. Set up local PlantUML and/or Kroki servers:\n\n```bash\n# PlantUML\ndocker run -d -p 8080:8080 plantuml/plantuml-server\n\n# Kroki\ndocker run -d -p 8000:8000 yuzutech/kroki\n```\n\n2. Configure environment variables:\n\n```bash\nexport USE_LOCAL_PLANTUML=true\nexport PLANTUML_SERVER=http://localhost:8080\nexport USE_LOCAL_KROKI=true  \nexport KROKI_SERVER=http://localhost:8000\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 👏 Acknowledgements\n\n- [PlantUML](https://plantuml.com/) - UML diagram generation\n- [Kroki](https://kroki.io/) - Unified diagram generation service\n- [Mermaid](https://mermaid.js.org/) - Generation of diagrams from text\n- [D2](https://d2lang.com/) - Modern diagram scripting language\n\n# UML-MCP Server\n\nAn MCP Server that provides UML diagram generation capabilities through various diagram rendering engines.\n\n## Components\n\n### Resources\n\nThe server provides several resources via the `uml://` URI scheme:\n\n- `uml://types`: List of available UML diagram types\n- `uml://templates`: Templates for creating UML diagrams\n- `uml://examples`: Example UML diagrams for reference\n- `uml://formats`: Supported output formats for diagrams\n- `uml://server-info`: Information about the UML-MCP server\n\n### Tools\n\nThe server implements multiple diagram generation tools:\n\n#### Universal UML Generator\n- `generate_uml`: Generate any UML diagram\n  - Parameters: `diagram_type`, `code`, `output_dir`\n\n#### Specific UML Diagram Tools\n- `generate_class_diagram`: Generate UML class diagrams\n  - Parameters: `code`, `output_dir`\n- `generate_sequence_diagram`: Generate UML sequence diagrams\n  - Parameters: `code`, `output_dir`\n- `generate_activity_diagram`: Generate UML activity diagrams\n  - Parameters: `code`, `output_dir`\n- `generate_usecase_diagram`: Generate UML use case diagrams\n  - Parameters: `code`, `output_dir`\n- `generate_state_diagram`: Generate UML state diagrams\n  - Parameters: `code`, `output_dir`\n- `generate_component_diagram`: Generate UML component diagrams\n  - Parameters: `code`, `output_dir`\n- `generate_deployment_diagram`: Generate UML deployment diagrams\n  - Parameters: `code`, `output_dir`\n- `generate_object_diagram`: Generate UML object diagrams\n  - Parameters: `code`, `output_dir`\n\n#### Other Diagram Formats\n- `generate_mermaid_diagram`: Generate diagrams using Mermaid syntax\n  - Parameters: `code`, `output_dir`\n- `generate_d2_diagram`: Generate diagrams using D2 syntax\n  - Parameters: `code`, `output_dir`\n- `generate_graphviz_diagram`: Generate diagrams using Graphviz DOT syntax\n  - Parameters: `code`, `output_dir`\n- `generate_erd_diagram`: Generate Entity-Relationship diagrams\n  - Parameters: `code`, `output_dir`\n\n### Prompts\n\nThe server provides prompts to help create UML diagrams:\n\n- `class_diagram`: Create a UML class diagram showing classes, attributes, methods, and relationships\n- `sequence_diagram`: Create a UML sequence diagram showing interactions between objects over time\n- `activity_diagram`: Create a UML activity diagram showing workflows and business processes\n\n## Configuration\n\n### Install\n\n#### Claude Desktop\n\nOn MacOS: `~/Library/Application\\ Support/Claude/claude_desktop_config.json`  \nOn Windows: `%APPDATA%/Claude/claude_desktop_config.json`\n\n\u003cdetails\u003e\n  \u003csummary\u003eClaude Desktop Configuration\u003c/summary\u003e\n  \n  ```json\n  {\n    \"mcpServers\": {\n      \"uml_diagram_generator\": {\n        \"command\": \"python\",\n        \"args\": [\n          \"/path/to/uml-mcp/mcp_server.py\"\n        ]\n      }\n    }\n  }\n  ```\n\u003c/details\u003e\n\n#### Cursor Integration\n\nThe UML-MCP Server can also be integrated with Cursor:\n\n\u003cdetails\u003e\n  \u003csummary\u003eCursor Configuration\u003c/summary\u003e\n  \n  ```json\n  {\n    \"mcpServers\": {\n      \"uml_diagram_generator\": {\n        \"command\": \"python\",\n        \"args\": [\n          \"/path/to/uml-mcp/mcp_server.py\"\n        ]\n      }\n    }\n  }\n  ```\n\u003c/details\u003e\n\n## Usage\n\n### Command Line Arguments\n\n```\nusage: mcp_server.py [-h] [--debug] [--host HOST] [--port PORT] [--transport {stdio,http}] [--list-tools]\n\nUML-MCP Diagram Generation Server\n\noptions:\n  -h, --help            show this help message and exit\n  --debug               Enable debug logging\n  --host HOST           Server host (default: 127.0.0.1)\n  --port PORT           Server port (default: 8000)\n  --transport {stdio,http}\n                        Transport protocol (default: stdio)\n  --list-tools          List available tools and exit\n```\n\n### Environment Variables\n\n- `LOG_LEVEL`: Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)\n- `UML_MCP_OUTPUT_DIR`: Directory to store generated diagram files\n- `KROKI_SERVER`: Kroki server URL for diagram rendering\n- `PLANTUML_SERVER`: PlantUML server URL for diagram rendering\n- `LIST_TOOLS`: Set to \"true\" to display tools and exit\n\n### Example: Generating a Class Diagram\n\n```python\nresult = tool.call(\"generate_class_diagram\", {\n    \"code\": \"\"\"\n        @startuml\n        class User {\n          -id: int\n          -name: string\n          +login(): boolean\n        }\n        class Order {\n          -id: int\n          +addItem(item: string): void\n        }\n        User \"1\" -- \"many\" Order\n        @enduml\n    \"\"\",\n    \"output_dir\": \"/path/to/output\"\n})\n```\n\n## Development\n\n### Building and Running\n\n```bash\n# Clone the repository\ngit clone https://github.com/your-username/uml-mcp.git\ncd uml-mcp\n\n# Install dependencies\npip install -r requirements.txt\n\n# Run the server\npython mcp_server.py\n```\n\n### Debugging\n\nFor debugging, you can run the server with:\n\n```bash\npython mcp_server.py --debug\n```\n\nDebug logs will be stored in the `logs/` directory.\n\n### Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run specific tests\npytest tests/test_diagram_tools.py\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoinebou12%2Fuml-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoinebou12%2Fuml-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoinebou12%2Fuml-mcp/lists"}