MCP Setup
Zindex provides 5 MCP tools that let AI agents create, edit, validate, and render diagrams natively.
Claude Desktop
Add to your claude_desktop_config.json:
Hosted mode (recommended)
{
"mcpServers": {
"zindex": {
"command": "npx",
"args": ["@zindex/mcp"],
"env": {
"ZINDEX_API_URL": "https://api.zindex.ai",
"ZINDEX_API_KEY": "your-api-key"
}
}
}
}
Local mode (no API key needed)
{
"mcpServers": {
"zindex": {
"command": "npx",
"args": ["@zindex/mcp"]
}
}
}
Local mode uses in-memory storage — diagrams are lost when the server stops.
Available tools
| Tool | Description |
|---|---|
dsp_create_scene | Create a new diagram scene |
dsp_apply_ops | Apply operations (add nodes, edges, groups, constraints) |
dsp_validate_scene | Validate a scene for structural and semantic correctness |
dsp_render_scene | Render a scene to SVG or PNG |
dsp_get_scene | Retrieve a scene by ID, optionally at a specific revision |
Environment variables
| Variable | Required | Description |
|---|---|---|
ZINDEX_API_URL | For hosted mode | URL of the Zindex API |
ZINDEX_API_KEY | For hosted mode | API key for authentication |
Example interaction
Once configured, ask your AI agent:
“Create an architecture diagram showing an API Gateway connecting to a Database and a Redis Cache”
The agent will use the MCP tools to:
dsp_create_scene— initialize the diagramdsp_apply_ops— add nodes and edgesdsp_render_scene— render to SVG or PNG