feat: make MCP server registrations persistent across peer disconnects
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Persistent MCP servers (opt-in via `persistent: true`) survive host
disconnects — they appear as offline in mcp_list and auto-restore when
the host reconnects. Ephemeral servers (default) still clean up on
disconnect. Offline servers return a clear error on mcp_call with
time-since-disconnect info.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-08 00:22:06 +01:00
parent 56b1cc0756
commit 5398ca6833
5 changed files with 82 additions and 9 deletions

View File

@@ -682,6 +682,10 @@ export const TOOLS: Tool[] = [
},
description: "Tool definitions to expose",
},
persistent: {
type: "boolean",
description: "If true, registration survives peer disconnect. Other peers see it as 'offline' until you reconnect. Default: false",
},
},
required: ["server_name", "description", "tools"],
},