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:

{
  "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

ToolDescription
dsp_create_sceneCreate a new diagram scene
dsp_apply_opsApply operations (add nodes, edges, groups, constraints)
dsp_validate_sceneValidate a scene for structural and semantic correctness
dsp_render_sceneRender a scene to SVG or PNG
dsp_get_sceneRetrieve a scene by ID, optionally at a specific revision

Environment variables

VariableRequiredDescription
ZINDEX_API_URLFor hosted modeURL of the Zindex API
ZINDEX_API_KEYFor hosted modeAPI 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:

  1. dsp_create_scene — initialize the diagram
  2. dsp_apply_ops — add nodes and edges
  3. dsp_render_scene — render to SVG or PNG