Cursor Integration¶
Connect UML-MCP to Cursor to generate diagrams in the editor.
Overview¶
Cursor connects to UML-MCP as an MCP server so you can generate and view UML and other supported diagram types in the editor.
Quick setup (hosted MCP)¶
This repository ships a minimal project MCP config at .cursor/mcp.json:
- Clone or open this repo in Cursor (or copy that
mcpServersblock into your user MCP settings). - Restart Cursor.
- Confirm uml-mcp appears under Cursor Settings → MCP.
No local Python install is required for the hosted endpoint. The MCP route is /mcp, not the site root.
On every push to main, the CD pipeline (.github/workflows/deploy.yml) smoke-tests the hosted MCP endpoint with JSON-RPC tools/list and list_diagram_types against the Vercel URL. CI validates .cursor/mcp.json on each PR.
Diagram skill for Cursor¶
Use the canonical skill at .skill/skills/uml-mcp-diagrams/SKILL.md:
- Cursor Settings → Rules → Add skill and point at that file, or
- Symlink/copy it into your user skills directory if your Cursor build expects skills outside the repo.
Claude Code users should install the Claude Code plugin instead (/uml-mcp:uml-diagrams), which bundles the same workflow under plugins/uml-mcp/skills/uml-diagrams/.
Local stdio MCP (optional)¶
To run the server from this clone with file output, merge config/cursor_config.json into your MCP settings:
- Windows:
%APPDATA%\Cursor\User\globalStorage\cursor.mcp\mcp.json - macOS:
~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json - Linux:
~/.config/Cursor/User/globalStorage/cursor.mcp/mcp.json
Set cwd to the repo root and adjust env (KROKI_SERVER, MCP_OUTPUT_DIR, MCP_DIAGRAM_FALLBACK) per Configuration.
Smithery registry (alternative)¶
If you use the Smithery CLI (Node.js 20+):
npm install -g @smithery/cli@latest
smithery auth login
smithery mcp add antoinebou12/uml --client cursor
Restart Cursor after the command finishes.
Test the integration¶
Example prompt:
Troubleshooting¶
Server connection issues¶
- For hosted MCP, verify the URL ends with
/mcp. - For local stdio, run
uv run python server.pymanually and check paths inconfig/cursor_config.json. - Review Cursor MCP logs for connection errors.
Diagram generation problems¶
- Call
list_diagram_typesor readuml://typeswhen unsure ofdiagram_type. - Use
validate_umlon pasted source before retrying generate_uml. - Prefer
output_formatsvgfor shareable URLs on the hosted server.
Optional: Sequential Thinking MCP¶
UML-MCP does not bundle Sequential Thinking. For multi-step planning before generate_uml, add a second MCP server entry in Cursor if you use that tool, then call UML-MCP with the final diagram source.