Skip to content

Repository files navigation

Visual Paradigm MCP Server

A plugin for Visual Paradigm 17.0 that runs an MCP (Model Context Protocol) server inside VP. This lets Claude (or any other MCP client) read a diagram from the currently open project — including full visual formatting, not just the logical structure.


Requirements

Visual Paradigm 17.0
JDK to build 11 or newer (built with JDK 25, but emits Java 11 bytecode)
Maven 3.9.x — or the bundled wrapper (mvnw.cmd), which downloads it automatically

Building

cd D:\VisualParadigmMcp
.\mvnw.cmd clean package

Installing into Visual Paradigm

Copy the entire vpmcp.server directory into VP's plugin folder:

Copy-Item -Recurse -Force `
  "D:\VisualParadigmMcp\target\plugins\vpmcp.server" `
  "$env:APPDATA\VisualParadigm\plugins\"

Verifying it works

Three independent checks, in this order — each answers a different question.

1. VP menu: Tools → MCP Server

The menu label itself shows the status without clicking (MCP Server: running on port 8899 or MCP Server: NOT RUNNING). Clicking it opens a window with the endpoint address, the tool list, the open project's name, the log file path, and a ready-to-use claude mcp add command.

plugin.xml declares both menuPath and ribbonPath="Tools/MCP Server" so the item lands on the real Tools tab instead of the default Plugin/Plugins tab that VP generates for plugins without an explicit ribbonPath. That default tab's name can't be changed from plugin.xml.

If Tools has no MCP Server entry, but MCP Server Status shows up under Plugin instead — ribbonPath didn't work on your VP version (undocumented syntax, untested without a live VP instance); report it so an alternative value can be found. If the item is missing entirely, VP never loaded the plugin — move to check 2.

2. Plugin log file

<plugin directory>\vpmcp.log

e.g. %APPDATA%\VisualParadigm\plugins\vpmcp.server\vpmcp.log. On every startup the plugin logs the VP version, Java version, plugin directory, and server address; on failure, a full stack trace.

What you see What it means
File doesn't exist VP never loaded the plugin. Wrong install path, or VP rejected plugin.xml. Check %APPDATA%\VisualParadigm\vp.log.
File exists, last entry MCP server listening on … Server is running. The problem is on the client side.
File exists, entry ERROR MCP server failed to start Cause is in the stack trace — usually BindException, i.e. the port is taken.

3. Query the server directly

curl.exe -s -X POST http://127.0.0.1:8899/mcp `
  -H "Content-Type: application/json" `
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}"

A response with the tool list means the plugin is working correctly and any remaining issue is in the MCP client's configuration.

Note: messages also go to VP's message panel (View → Panes → Message), but under a separate MCP Server tab that doesn't open itself — easy to miss. The vpmcp.log file is therefore the main diagnostic channel.


Configuration

By default the server listens on 127.0.0.1:8899. If the port is taken, create an mcp.properties file next to plugin.xml:

port=8910
bind=127.0.0.1

These can also be overridden via VP system properties: -Dvpmcp.port=8910, -Dvpmcp.bind=127.0.0.1.

The server intentionally listens only on loopback and rejects requests whose Origin header isn't localhost — required by the MCP spec (DNS rebinding protection).


Connecting to Claude Code

claude mcp add --transport http visual-paradigm http://127.0.0.1:8899/mcp

Visual Paradigm must be running with a project open before the client connects.


Tool: get_diagram_by_url

Parameters

Parameter Type Required Description
vpp_url string yes Diagram address, e.g. ProjectName.vpp://diagram/YRvbHuaFYFAEMEOa. A bare ID also works: YRvbHuaFYFAEMEOa.
detail "standard" | "full" no (default standard) full adds a raw dump of all model and view properties.

Why detail exists: full can return dozens of properties per element — for an 80-shape diagram that eats the model's context window. standard provides a complete set of named logical and visual fields; switch to full only when looking for something not among the named fields.

Output format

{
  "diagram": {
    "id": "YRvbHuaFYFAEMEOa",
    "name": "Order Handling",
    "type": "BusinessProcessDiagram",
    "documentation": "...",
    "user_id": "BPD1",
    "background_color": "#FFFFFF",
    "project_name": "MOM",
    "element_count": 42
  },
  "nodes": [
    {
      "id": "view id (shape on the diagram)",
      "model_id": "model element id",
      "name": "Validate Order",
      "shape_type": "BPTask",
      "model_type": "BPTask",
      "documentation": "...",
      "description": "...",
      "stereotypes": ["critical"],
      "tagged_values": { "owner": "Sales" },
      "members": [
        { "id": "...", "name": "amount", "model_type": "Attribute",
          "type": "int", "visibility": "private",
          "multiplicity": "1", "initial_value": "0" }
      ],
      "sub_diagrams": [ { "id": "...", "name": "...", "type": "..." } ],
      "bounds": { "x": 120, "y": 80, "width": 100, "height": 50 },
      "z_order": 3,
      "parent_id": null,
      "child_ids": [],
      "custom_text": null,
      "display_image_path": null,
      "visual_properties": {
        "fill":    { "type": "solid", "color1": "#FF0000", "color2": null,
                     "transparency": 0, "gradient_style": 0,
                     "is_transparent": false, "is_opaque": true },
        "line":    { "color": "#000000", "weight": 1.0, "transparency": 0,
                     "cap": "none", "style": "Style1" },
        "font":    { "name": "Dialog", "size": 11, "color": "#FFFFFF",
                     "is_bold": true, "is_italic": false, "awt_style": 1 },
        "caption": { "is_visible": true, "side": "center",
                     "bounds": { "x": 0, "y": 0, "width": 100, "height": 20 } },
        "foreground": "#000000",
        "background": "#FF0000"
      }
    }
  ],
  "edges": [
    {
      "id": "connector view id",
      "model_id": "...",
      "name": "if error",
      "shape_type": "BPSequenceFlow",
      "model_type": "BPSequenceFlow",
      "from": "source node view id",
      "to": "target node view id",
      "from_model": { "id": "...", "name": "...", "model_type": "..." },
      "to_model":   { "id": "...", "name": "...", "model_type": "..." },
      "from_member_id": null,
      "to_member_id": null,
      "waypoints": [ { "x": 170, "y": 105 } ],
      "visual_properties": { "line": { "color": "#FF0000", "style": "Style3" }, "font": {}, "caption": {} }
    }
  ],
  "warnings": []
}

Troubleshooting

Symptom Cause and fix
No Tools → MCP Server entry and no vpmcp.log VP didn't load the plugin. Check that plugin.xml is exactly at plugins\vpmcp.server\plugin.xml and the jar at plugins\vpmcp.server\lib\vpmcp.jar. Then check %APPDATA%\VisualParadigm\vp.log.
MCP server failed to start + BindException Port 8899 is taken. Set a different one in mcp.properties.
Menu shows running, but the MCP client won't connect The server is up — use check 3 from "Verifying it works". If curl responds, the issue is in the client's configuration, not the plugin.
vpmcp.log never appears, though the menu item does The plugin directory isn't writable (e.g. installed under Program Files). Install under %APPDATA% instead.
UnsupportedClassVersionError VP's JVM is older than 11 — see Requirements.
NoClassDefFoundError at startup VP's runtime is missing a module the plugin used. Only java.base and java.desktop are available.
curl returns 403 Forbidden The request had an Origin header outside localhost. Calls from an MCP client, and from curl without an Origin header, go through fine.
isError: true with "No project is currently open" Visual Paradigm is running, but no project is open.
isError: true with "Id … is the model element …, not a diagram" The address points at a model element, not a diagram. Use a diagram address.

License

See LICENSE.

About

MCP server plug-in for Visual Paradigm — read open diagrams, including full visual formatting, via the Model Context Protocol.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages