Logo: UML-MCP-Server

UML-MCP-Server

Communautéit
Swayingleaves

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…

EditeurSwayingleaves
Repositoryuml-mcp-server
SproochPython
Forks
13
Stären
28
Disponibel Tools
0
Transporttypstdio
Kategorien
Linken
  • Tools mat KI-Workflows verbannen

    UML-MCP-Server bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 0

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 28, Forks: 13.

UML-MCP-Server

English | 中文

smithery badge

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 code.

Functional Features

  • Supports multiple UML diagram types: class diagram, sequence diagram, activity diagram, use case diagram, state diagram, component diagram, deployment diagram, object diagram
  • UML diagrams can be generated through natural language description
  • You can directly use PlantUML code to generate UML diagrams
  • Return PlantUML code and accessible URL links for easy sharing and viewing
  • Simultaneously save the generated UML diagram locally and provide the local file path
  • Support custom save path and specify the output directory for UML images
  • As an MCP server, it can integrate with clients that support MCP, such as Claude
  • A comprehensive logging system that records server operating status and operation logs

Installation

Installing via Smithery

To install UML Diagram Generation Tool for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @Swayingleaves/uml-mcp-server --client claude

Manual Installation

  1. Clone repository:
bash
git clone https://github.com/yourusername/UML-MCP-Server.git
cd UML-MCP-Server
  1. Create and activate a virtual environment:
bash
python -m venv uml-mcp-venv
source uml-mcp-venv/bin/activate  # Linux/Mac
# Or
uml-mcp-venv\Scripts\activate  # Windows
  1. Install dependencies:
bash
pip install -r requirements.txt

Usage Method

Used as a Python Library

python
from fix_plantuml import generate_uml

# Create UML code
uml_code = """
@startuml
Title: Simple Class Diagram

class User {
-String name
-String email
+login()
+logout()
}

class Order {
-int id
-Date date
+process()
}

User "1" -- "many" Order: places
@enduml
"""

# Generate URLs, code, and local paths for UML diagrams
result = generate_uml(uml_code)

# Output result
print("PlantUML code: ")
print(result["code"])
print("\nPlantUML URL:")
print(result["url"])
print("\nLocal file path: ")
print(result["local_path"])

Configure MCP in Cursor

The Cursor supports MCP (Model Context Protocol) servers, allowing you to directly generate UML diagrams using UML-MCP Server in the Cursor. The configuration steps are as follows:

  1. Ensure that the latest version of Cursor IDE (which supports MCP functionality) is installed.

  2. Open the configuration file of Cursor:

  • On macOS: ~/Library/Application Support/Cursor/config.json
  • On Windows: %APPDATA%\Cursor\config.json
  • On Linux: ~/.config/Cursor/config.json
  1. Add or modify the 'mcpServer' section in the configuration file:
json
{
    "mcpServers": {
        "UML-MCP-Server": {
            "command": "uv",
            "args": [
                "--directory",
                "/Users/yourpath/UML-MCP-Server",
                "run",
                "uml_mcp_server.py"
            ],
            "output_dir": "/Users/yourpath/uml-output"
        }
    }
}

Configuration Description:

  • UML-MCP-Server: The name of the MCP server can be modified as needed
  • Command: Use UV as the running command
  • args:
    • directory: Specify the absolute path of the project directory
    • run: Run the command
    • uml_mcp_server.py: Main program file
  • output_dir: Specify the output directory for UML images

Please modify the following path according to your actual situation:

  • Replace '/Users/Yourpath/UML-MCP Server' with the actual path of your UML-MCP Server project
  • Replace '/Users/Yourpath/uml-output' with the directory path where you want to save the UML image
  1. Save the configuration file and restart the Cursor.

  2. Use UML-MCP Server in Cursor:

  • Open a new chat window
  • In the toolbar at the bottom of the chat interface, you will see the "UML-MCP Server" tool icon
  • Clicking on this icon will bring up the options menu for UML tools
  • Select the UML diagram type you need (such as "Generate Class Diagram", "Generate Sequence Diagram", etc.)

Using UML Tools in Cursor

In the Cursor, you can input:

For example:

1. Understand the certification process of the project
2. Generate UML code for the authentication process and generate a flowchart through UML-MCP Server
3. Attention: "output_dir": "/Users/my-project/uml-output"

The Results Returned by UML Tools

Regardless of how UML tools are used, Cursor will call UML-MCP-Server and return the following:

  1. PlantUML Code - You can copy this code to use in other PlantUML tools
  2. PlantUML URL - You can open this URL in a browser to view the generated UML diagram
  3. Local file path - The generated UML image is saved in this local path

For example:

Class diagram generated:

PlantUML code:
@startuml
Title: User and Order System
class User {
-String name
-String email
+login()
+logout()
}
class Order {
-int id
-Date date
+process()
}
User "1" -- "many" Order: places
@enduml

PlantUML URL:
http://www.plantuml.com/plantuml/png/~1UDgCqB5Bn0G1k1zYWM_EfPYQYY0Qd9oQc9oQaPcKYYcKc9gMYaiKc9gK...

Local file path:
/Users/username/projects/UML-MCP-Server/output/class_diagram_12345.png

You can view the generated UML diagram in the following ways:

  • Click on the returned URL link to view in the browser
  • Open the local file path in the file browser to view the saved image
  • In Cursor, you can use Markdown syntax to directly display images in the chat window

Troubleshooting

If you encounter problems while using UML-MCP Server, you can try the following steps:

  1. Check log files: View the log files in the 'logs' directory for error details
  2. Verify Dependency Installation: Ensure that all dependencies are installed correctly
  3. Check network connection: Ensure that PlantUML server (www.plantuml.com) can be accessed
  4. Check output directory permissions: Ensure that the program has permission to write to the 'output' directory

Common problems and solutions:

  • Unable to generate UML diagram: Check for error messages in the log, which may be due to network issues or temporary unavailability of PlantUML server
  • Image not saved locally: Check if the 'output' directory exists and has write permission
  • MCP server cannot start: Check the log file to ensure there are no port conflicts or other program errors

Contribution

Welcome to contribute code, report issues, or provide improvement suggestions! Please participate in project development through GitHub Issues or Pull Requests.

License

This project adopts the MIT license. Please refer to the LICENSE document for details.

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "swayingleaves-uml-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

UML-MCP-Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal UML-MCP-Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung, fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector: D'Optioun „Dësen Apparat“ ass ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Setzt de kopéierte Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

UML-MCP-Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a setzt d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Setzt d'MCP-Serverkonfiguratioun fir UML-MCP-Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert d'Säit, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "swayingleaves-uml-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "uml-mcp-server"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vun der Integratioun UML-MCP-Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vun der Integratioun UML-MCP-Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat UML-MCP-Server bei dëser Aufgab hëllefen?
UML-MCP-Server
Jo. Ech hunn et gelies.
Dat hunn ech mat UML-MCP-Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server UML-MCP-Server benotzt?

UML-MCP-Server ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech UML-MCP-Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir UML-MCP-Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat UML-MCP-Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann UML-MCP-Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech UML-MCP-Server MCP mat TypingMind?

UML-MCP-Server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann den MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt UML-MCP-Server MCP an TypingMind zur Verfügung?

UML-MCP-Server stellt MCP-Funktioune zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir UML-MCP-Server MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann UML-MCP-Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇