Skip to content

MCP API ​

Planar starts an embedded Model Context Protocol server for local agent integrations.

Connect ​

The server binds to loopback at:

text
http://127.0.0.1:3131/sse

Send client messages to /messages (or /message). The server supports the MCP methods initialize, tools/list, tools/call, resources/list, and resources/read.

It accepts local Tauri and localhost origins and rejects browser-origin requests from unrelated pages. The server is intended for agents running on the same machine as Planar.

Initialize ​

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-03-26",
    "capabilities": {},
    "clientInfo": { "name": "my-agent", "version": "1.0.0" }
  }
}

After initialization, send the initialized notification, then call tools/list to discover the live schemas. The Tools reference is a readable index of the current surface; runtime discovery remains authoritative.

Resources ​

The server exposes the project asset index at planar://assets. Images can be returned as MCP image content or referenced through the image tools.

Prefer start_generate_image for long-running work. It returns a job_id immediately; poll with get_job_status, then fetch the image with get_job_result.