LabscoMCP early access ↗
Cam10001110101MCP SERVER

JSON Canvas MCP Server

Build and rework Obsidian .canvas boards from a conversation — nodes, edges, colours and groups — then export the board as Markdown or SVG.

by Cam10001110101 ↗Diagrams & ChartsCommunity

LABSCO SUMMARY

A canvas an agent can keep editing, not just draw once.

Editing is what makes it worth wiring up: nodes and edges go in and out of a stored board in a single atomic write, so a rejected operation leaves the file exactly as it was instead of half-changed. Markdown and SVG are the two export targets that exist today — PNG is written up as a proposal, not built.

What it is

An MCP server for JSON Canvas, the open infinite-canvas format Obsidian uses for its .canvas files. It writes canvases from node and edge objects, reads and edits stored ones, checks data against the JSON Canvas 1.0 specification, and exports a board to Markdown or SVG. Hosts that support the MCP Apps UI extension render a pan/zoom preview inline; text-only clients get the same canvas as structured output.

What you get

  • A canvas written from nodes and optional edges into a date-prefixed .canvas file, answered with the path and the node and edge counts — create_canvas
  • Stored boards read back as their nodes and edges, and the available files listed — read_canvas, list_canvases
  • Nodes and edges added, updated and removed in one atomic write, where a failed operation leaves the file unchanged and removing a node cascades to its edges — edit_canvas
  • Canvas data checked against the JSON Canvas 1.0 specification before it goes anywhere — validate_canvas
  • A board exported as an edge-ordered Markdown outline or a standalone SVG image, returned with its MIME type — export_canvas
  • Case-insensitive substring search across stored canvases, or scoped to one, returning the filename, id, field and a snippet per match — search_canvases
  • Two resources to build against: the JSON Schema at canvas://schema and a two-node worked example at canvas://examples/basic

Requirements

No account and no key. The published package is mcp-server-jsoncanvas 0.2.0 on PyPI, run with uvx over stdio; a container image ships at ghcr.io/cam10001110101/obsidian-jsoncanvas. OUTPUT_PATH is the directory canvases are written to and read from. Set MCP_TRANSPORT to streamable-http to serve over HTTP instead: it binds to 127.0.0.1 and carries no authentication, so anyone who can reach the port can read and write your canvas files — front it with an authenticating reverse proxy before exposing it, and set MCP_CORS_ORIGINS to the origins you trust rather than leaving the * default.

Setup effort

One command — docker run -i --rm -v canvas-data:/data mcp/jsoncanvas