Skip to main content
Glama
svg-whiteboard-mcp

svg-whiteboard-mcp

by lulu0119

svg-whiteboard-mcp

MCP server that keeps SVG path canvases in memory, serves a loopback HTML preview (127.0.0.1), and returns proj-airi Surface embedUrl payloads so AIRI can render chat tool results in a sandbox iframe.

Tools

Tool

Purpose

create_canvas

New canvas → id

delete_canvas

Remove canvas

list_canvases

List ids / sizes / path counts

add_path

Append SVG <path> (d, stroke, fill, …)

delete_path

Remove path by id

list_paths

Inspect paths on a canvas

present_preview

Return structuredContent.projAiriSurface with preview URL

proj_airi_present_surface

Same envelope for arbitrary http(s) URLs

Related MCP server: canvas-relay

Run (stdio)

pnpm install
pnpm build
node dist/index.js

MCP client config example:

{
  "mcpServers": {
    "svg-whiteboard": {
      "command": "node",
      "args": ["/absolute/path/to/svg-whiteboard-mcp/dist/index.js"]
    }
  }
}

Requirements

  • Node 20+

  • Host (e.g. Electron) must allow the renderer to load http://127.0.0.1:* preview URLs.

Contract

structuredContent includes:

{
  "projAiriSurface": {
    "version": 1,
    "kind": "embedUrl",
    "title": "...",
    "data": { "url": "http://127.0.0.1:PORT/preview/CANVAS_ID", "mimeType": "text/html" }
  }
}

Aligns with @proj-airi/mcp-surface-contract in the AIRI monorepo.

Available Tools

8 tools
add_pathC

Add an SVG path (d attribute) to a canvas.

Inputs: d (required), canvasId (required), fill, stroke, +2 more.

create_canvasA

Create a new SVG whiteboard canvas. Returns canvas id for add_path and present_preview.

Inputs: name (required), width, height, backgroundColor.

delete_canvasC

Delete a canvas by id.

Inputs: canvasId (required).

delete_pathC

Remove a path from a canvas.

Inputs: pathId (required), canvasId (required).

list_canvasesA

List all canvases with id, name, size, path count.

Inputs: no named parameters.

list_pathsC

List paths on a canvas (id and d) for inspection.

Inputs: canvasId (required).

present_previewA

Return proj-airi Surface (embedUrl) so AIRI and other hosts show this canvas in a sandbox iframe. The URL is served on loopback by this MCP process. Call after drawing or when the user should see the board.

Inputs: canvasId (required), title, summary.

proj_airi_present_surfaceB
Read-only

Generic proj-airi envelope: embed any safe http(s) URL in AIRI chat (sandbox iframe). Same contract as other proj-airi MCP servers.

Inputs: url (required), title, summary, mimeType.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools have distinct purposes: canvas CRUD, path CRUD, and presentation. However, present_preview and proj_airi_present_surface both involve pushing content to AIRI, which could cause ambiguity despite differing descriptions.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with lowercase and underscores, e.g., create_canvas, add_path, present_preview. The proj_airi prefix maintains consistency.

    Tool Count5/5

    Eight tools are well-scoped for an SVG whiteboard: three for canvas CRUD, three for path CRUD, and two for presentation. No tools feel extraneous or missing.

    Completeness3/5

    Core CRUD is present but missing update operations for both canvases (e.g., rename) and paths (e.g., modify d attribute). This is a notable gap that may frustrate agents.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      MCP server that turns AI into an SVG artist. One rendering engine with a rich JSON schema, AI controls all design parameters. Renders animated SVGs with CSS @keyframes and SMIL animations. Supports 16+ element types, parametric curves, pattern groups, gradient/filter/clip/mask definitions, and PNG preview. No external dependencies, runs locally via npx.
      3
      178 npm
      31
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP server for a persistent local whiteboard that lets AI assistants read, add, update, and delete canvas elements, with undo/redo and provenance tracking.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides a standalone MCP server for tldraw diagrams, enabling clients to create, edit, and persist multiple canvases over Streamable HTTP with semantic protocol v2.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to create, inspect, edit, render, and export SVG/Inkscape documents through typed drawing tools, with a deterministic offline backend and an optional bridge to a locally running Inkscape instance for limited live editing and snapshots.
      5
      BSD 3-Clause