MeshMCP

The shared memory
for your AI swarm.

A local coordination server that holds all task state, agent mailboxes, and knowledge. Every surface — IDE, CLI, voice — speaks the same protocol and sees the same board.

MeshMCP Architecture

How MeshMCP works

MeshMCP is the single source of truth for every agent in the swarm. It runs locally, starts automatically, and requires zero configuration.

Startup

Zero configuration — starts with MeshSpace

When MeshSpace launches, its Tauri backend automatically spawns node server.js as a sidecar process on port 3456. A cryptographic auth key is generated using rand::thread_rng().fill_bytes() and stored in the Tauri secure store.

A Tokio watchdog task polls the server every 20 seconds and restarts it automatically if it crashes. MeshSpace writes the server URL and auth key to .meshpilot/mcp.json in your project directory so every Claude agent process can read it without any manual setup.

Startup sequence
MeshSpace launches → spawn node server.js
Generate auth key via rand::thread_rng()
Poll GET /health → wait up to 10s
Write .meshpilot/mcp.json to project dir
Watchdog: poll every 20s → restart on crash
Task lifecycle
todoin_progressin_reviewdone
Reviewer can reject: in_review → todo (with reason)
Stale tasks: todo → cancelled (on SWARM COMPLETE)
Task fields: id · title · description · status
assignedTo · filesOwned · priority · createdAt · updatedAt
Task management

Structured task lifecycle with deduplication

Every task moves through a defined lifecycle: todo → in_progress → in_review → done. Agents call update_task to advance their tasks. The Reviewer can reject a task back to todo with a reason, which the Builder reads from the task description on its next poll.

Task creation is deduplicated using a 120-character fingerprint of the title — if the Coordinator tries to create the same task twice, the second call is silently ignored. All writes are serialized through a _writeQueue promise chain to prevent race conditions when multiple agents write simultaneously.

Real-time events

SSE stream keeps the board live

MeshSpace subscribes to GET /events on startup and keeps the connection open. Every time an agent calls update_task or create_task, MeshMCP persists the change to SQLite and immediately broadcasts a Server-Sent Event to all connected consumers.

MeshSpace's boardStore receives the event and re-renders the Kanban column — no polling, no refresh. If the SSE connection drops, MeshSpace reconnects automatically with exponential backoff.

SSE event types
task.creatednew task added to board
task.updatedstatus or fields changed
task.deletedtask removed
chat.messageagent sent a message
project.eventswarm lifecycle signal

The full API surface

MeshMCP exposes both a REST API and an MCP tool interface so any agent — inside MeshSpace or external — can interact with the task board.

REST API

POST /tasks — create task
GET /tasks — list (filterable)
PATCH /tasks/:id — update
DELETE /tasks/:id — delete
POST /chat — send message
GET /events — SSE stream
GET /health — readiness probe

MCP tool interface

create_task
update_task
list_tasks (filter by status/assignee)
send_chat_message (2000 char limit)
cancel_stale_tasks
get_knowledge
bulk_update_tasks

Security

Every request is validated against a cryptographic Bearer key generated at startup. The key is stored in the Tauri secure store and written to .meshpilot/mcp.json for agent processes to read.

SQLite storage

Tasks, chat messages, knowledge, and settings are stored in a local SQLite database. Writes are serialized via a _writeQueue promise chain. normalizeTask() runs on every read to ensure consistent shape.

Deduplication

Task creation is deduplicated using a 120-character fingerprint of the title. If the Coordinator creates the same task twice (common in long swarms), the second call is silently ignored.

External agent support

Any MCP-compatible client can connect to MeshMCP — Claude Code, Cursor, Windsurf, or your own scripts. The same task board that MeshSpace shows is accessible to any tool that speaks the protocol.

Built with
Node.jsExpressSQLiteServer-Sent EventsBearer authPort 3456Tauri sidecarTokio watchdog

MeshMCP is the backbone of every swarm.

It starts automatically when you launch MeshSpace. No setup required.