Konva.js Canvas
FreeNot checkedEnables 2D canvas drawing using Konva.js with tools for creating shapes, layers, groups, and exporting PNG images.
About
Enables 2D canvas drawing using Konva.js with tools for creating shapes, layers, groups, and exporting PNG images.
README
An MCP (Model Context Protocol) server that gives AI assistants the ability to draw on a 2D canvas using Konva.js, running headlessly on Node.js.
Architecture
Claude ←stdio→ Python MCP (FastMCP) ←HTTP→ Node.js bridge (Express + Konva)
- Python MCP server (
server/) — exposes 12 tools over stdio using FastMCP, proxies calls to the bridge. - Node.js bridge (
bridge/) — runs Konva.js headlessly via thecanvaspackage, manages canvas state, renders PNGs.
Prerequisites
Installation
# Install Node.js bridge dependencies
cd bridge
npm install
# Python dependencies are managed automatically by uv — no manual step needed
Usage
Run as MCP server (for Claude Desktop or Claude Code)
cd server
uv run python main.py
The server starts the Node.js bridge as a subprocess, waits for it to be ready, then begins accepting MCP requests over stdio.
Claude Desktop config
Add to claude_desktop_config.json:
{
"mcpServers": {
"konva-canvas": {
"command": "uv",
"args": ["run", "--directory", "/path/to/konva-mcp/server", "python", "main.py"]
}
}
}
Claude Code config (.mcp.json)
{
"mcpServers": {
"konva-canvas": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/konva-mcp/server", "python", "main.py"]
}
}
}
Run the bridge standalone (for testing)
cd bridge
node server.js
The bridge listens on a random free port by default (overridable via BRIDGE_PORT env var) and prints BRIDGE_READY when ready.
Tools
| Tool | Description |
|---|---|
create_canvas |
Create a new canvas (Stage + default layer). Returns canvas_id and layer_id. |
add_layer |
Add a layer to an existing canvas. Layers render bottom-to-top. |
create_shape |
Draw a shape on a layer. See shape types below. |
update_shape |
Update position, size, color, or other attributes of a shape. |
delete_shape |
Permanently remove a shape. |
transform_shape |
Move, rotate, scale, or flip a shape. |
create_group |
Group multiple shapes into a single addressable unit. |
list_shapes |
List all shapes on a canvas, optionally filtered by layer. |
clear_layer |
Remove all shapes from a layer (layer itself remains). |
get_canvas_state |
Return the full JSON state of the canvas. |
preview_canvas |
Render the canvas and return it as an inline image for visual inspection. |
export_canvas |
Export the finished canvas as a PNG file. |
Shape types
rect, circle, ellipse, line, arrow, text, path, star, regular_polygon, wedge, ring, arc
Recommended workflow
create_canvas→ getcanvas_idandlayer_id- Add shapes with
create_shape - Call
preview_canvasafter each major section to visually inspect progress - Fix anything with
update_shapeordelete_shape - Call
export_canvaswhen the design is complete
Project structure
konva-mcp/
├── bridge/
│ ├── server.js # Express entry point
│ └── src/
│ ├── canvasManager.js # Canvas state (Map of canvas_id → Stage)
│ └── handlers/ # Action dispatcher and per-action handlers
└── server/
├── main.py # Entry point: finds free port, starts bridge, runs MCP
├── pyproject.toml
└── src/
├── mcp_server.py # FastMCP tool definitions (12 tools)
├── bridge_client.py # httpx async HTTP client
└── bridge_process.py # asyncio subprocess manager
Dependencies
Node.js bridge
konva^10.2.0 — 2D canvas librarycanvas^3.2.1 — headless Canvas API for Node.jsexpress^5.2.1 — HTTP servernanoid^5 — unique ID generation
Python MCP server
fastmcp>=3.1.0 — MCP server frameworkhttpx>=0.28.1 — async HTTP client
Installing Konva.js Canvas
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/bilaltahseen/konva-mcpFAQ
Is Konva.js Canvas MCP free?
Yes, Konva.js Canvas MCP is free — one-click install via Unyly at no cost.
Does Konva.js Canvas need an API key?
No, Konva.js Canvas runs without API keys or environment variables.
Is Konva.js Canvas hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Konva.js Canvas in Claude Desktop, Claude Code or Cursor?
Open Konva.js Canvas on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
LibreOffice Tools
Enables AI agents to read, write, and edit Office documents via LibreOffice with token-efficient design. Supports multiple formats including DOCX, XLSX, PPTX, a
by passerbyflutterdannote/figma-use
Full Figma control: create shapes, text, components, set styles, auto-layout, variables, export. 80+ tools.
by dannoteLogo.dev
Search and retrieve company logos by brand or domain. Customize size, format, and theme to match your design needs. Accelerate design, prototyping, and content
by NOVA-3951Design Inspiration Server
Searches top design platforms like Dribbble and Behance to provide UI inspiration, color palettes, and layout patterns via the Serper API. It allows users to re
by YonasValentinCompare Konva.js Canvas with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All design MCPs
