KosmoKrator

rendering

PlantUML MCP Integration for Vercel AI SDK

Connect PlantUML to Vercel AI SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

1 functions 0 read 1 write No credentials auth

Connect PlantUML to Vercel AI SDK

Use KosmoKrator as a local integration gateway for Vercel AI SDK agents and scripts.

Create an MCP client that starts or connects to the KosmoKrator gateway for the selected integration. The gateway is local, scoped to this integration, and starts with --write=deny so Vercel AI SDK can inspect read-capable tools without receiving write access by default.

PlantUML MCP Config for Vercel AI SDK

Prefer CLI JSON calls when a workflow only needs one deterministic integration operation.

{
  "mcpServers": {
    "kosmokrator-plantuml": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=plantuml",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=plantuml --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only PlantUML instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

PlantUML Tools Visible to Vercel AI SDK

Vercel AI SDK sees stable MCP tool names generated from the PlantUML integration catalog.

MCP toolSource functionTypeDescription
integration__plantuml__render_plantuml plantuml.render_plantuml Write Render a PlantUML diagram to a PNG image. Pass valid PlantUML syntax and get back a markdown image embed. Supported diagram types: class, sequence, activity, component, state, use case, object, deployment, timing, network (nwdiag), wireframe (salt), Gantt, mindmap, WBS, JSON, YAML, ERD. Example syntax: ``` @startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another request Bob --> Alice: Another response @enduml ``` Tips: - Always wrap syntax in @startuml / @enduml - Use `->` for solid arrows, `-->` for dashed arrows - Use `class ClassName { }` blocks for class diagrams - Use `(*) -->` for activity diagram start - Use `[Component]` for component diagrams - Use `state "Name" as s1` for state diagrams

Related PlantUML Pages