JSON Canvas MCP server enables creating, editing, and validating infinite canvas data with node and edge management tools
The JSON Canvas MCP Server is an implementation of the Model Context Protocol (MCP) designed to facilitate integration between AI applications and JSON Canvas, a flexible framework for creating infinitely scalable canvas data structures. This server provides essential tools for developers looking to enhance their AI applications by adding rich, interactive canvas functionalities such as node-based layouts, customizable edges with labels, and comprehensive validation mechanisms.
The core capabilities of the JSON Canvas MCP Server include:
Node Management: Support for creating nodes of various types including text, file, link, and group. Each node comes with adjustable properties like id
, x
, y
, width
, height
, and color
. Custom data can be easily added through type-specific attributes such as text
or url
.
Edge Connections: Ability to establish connections between nodes using edges that can have unique identifiers, styling with colors, and labels for clarity.
Validation: Ensures compliance with the JSON Canvas 1.0 specification by validating canvas data structures against a predefined schema.
Export Capabilities: Facilitates exporting JSON Canvas data into various formats like json
, svg
, or even images such as png
.
The JSON Canvas MCP Server is built with robust architecture to support seamless integration with MCP clients such as Claude Desktop, Continue, Cursor, and others. The server leverages the MCP protocol for communication, ensuring that it can efficiently handle data exchange between AI applications and the canvas infrastructure.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
To get started, you first need to build a Docker image for the server:
docker build -t mcp/jsoncanvas .
This command will create an image named mcp/jsoncanvas
that can be used for running the server.
Alternatively, you can build and run the server locally via virtual environment. Begin by installing the necessary tools:
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
Create a Virtual Environment and Install Dependencies:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .
Run the Tests:
pytest
Interactive Prototyping and Design: Developers can use this server to create intricate designs for applications such as user interfaces or architectural models, allowing for dynamic modifications and integrations with various tools.
Educational Tools: Teachers and students can leverage the JSON Canvas MCP Server to develop interactive educational scenarios where visual elements like text nodes and images are linked together through edges.
The server is fully compatible with MCP clients, ensuring a smooth integration experience across different platforms such as Claude Desktop, Continue, or Cursor. These clients will be able to efficiently consume the data generated by the server and use it within their application environments.
Here’s an example of how to configure the JSON Canvas MCP Server using claude_desktop_config.json
for Docker:
{
"mcpServers": {
"jsoncanvas": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"canvas-data:/data",
"mcp/jsoncanvas"
],
"env": {
"OUTPUT_PATH": "/data/output"
}
}
}
}
The server is designed to handle a wide range of use cases, ensuring compatibility and performance across different environments. The compatibility matrix lists specific MCP clients along with their current support status.
Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | ✅ |
Cursor | ❌ | ✅ | ❌ |
The JSON Canvas MCP Server can be configured through various environment variables to tailor its behavior according to specific needs. For instance, setting the OUTPUT_PATH
allows you to specify where canvas files will be saved.
{
"OUTPUT_PATH": "/data/output"
}
How do I ensure my JSON Canvas data is validated?
The server comes with validation capabilities built into the validate_canvas
tool, allowing you to check your canvas data against the JSON Canvas 1.0 specification.
Can I use this server for any type of node? Yes, the server supports a variety of node types including text, file, link, and group, making it highly versatile for different application needs.
What happens if an edge connection fails? The server will log详细的答案见上文。
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration