theseus/bundled-addons/claude-connector
Local Dev f3a8d883e2 Theseus 0.3.125: Claude connector gets a simultaneous-session cap
New row in the connector panel: Simultaneous sessions. Three radios —
1 only / Multi / No limit — and a number input next to Multi for the
exact cap (clamped 1-100). Default stays at no limit, so existing users
see no behaviour change until they pick a value.

On the server side, initialize counts live sessions first (a GC pass over
expired ones runs so an abandoned tab doesn't permanently hold a slot)
and refuses any that would push past the cap with 429 and a message the
client surfaces to the user ("Theseus is at its simultaneous-session
cap (<N>). Disconnect a client, or raise the limit..."). Lowering the
cap below the live count is non-retroactive: no one gets kicked, but the
next connect fails until one goes away.

Settings surface widened: publicState() carries sessionLimit, and a new
set-session-limit message writes it (persisted in the add-on's storage
alongside token / port / allowEvaluate).
2026-10-27 22:30:23 +02:00
..
lib Theseus 0.3.125: Claude connector gets a simultaneous-session cap 2026-10-27 22:30:23 +02:00
addon.json Claude connector 0.2.0: connect Claude Code and Claude Desktop from the panel 2026-10-24 00:32:06 +03:00
index.js Theseus 0.3.125: Claude connector gets a simultaneous-session cap 2026-10-27 22:30:23 +02:00
panel.html Theseus 0.3.125: Claude connector gets a simultaneous-session cap 2026-10-27 22:30:23 +02:00
README.md Claude connector 0.2.0: connect Claude Code and Claude Desktop from the panel 2026-10-24 00:32:06 +03:00
stdio-shim.cjs Theseus: Claude connector, an opt-in MCP server for the signed-in profile 2026-10-23 17:45:02 +03:00

Claude connector

Built-in Theseus extension: a local MCP server through which Claude Code or Claude Desktop works in the user's tabs. Setup and safety model are in the Theseus README ("Claude connector (MCP)") and DESIGN-claude-connector.md.

file role
index.js activation, settings (add-on store), server start/stop, panel messages
lib/mcp-server.cjs Streamable HTTP + JSON-RPC, token, Host/Origin guards, sessions, SSE presence
lib/tools.cjs tool definitions and handlers; resolves tabs through api.tabControl
lib/tab-driver.cjs one tab over its own webContents.debugger (CDP 1.3)
lib/policy.cjs site approvals, upload-folder checks, password-field detection
lib/clipboard.cjs put / save / restore the system clipboard around a paste
lib/clients.cjs "Connect": registers the connector with Claude Code (its CLI, user scope) and Claude Desktop (its config file), reports status, re-registers after token/port changes
lib/action-log.cjs timestamped action log (panel + actions.log)
panel.html the sidebar panel
stdio-shim.cjs stdio ⇄ HTTP relay for Claude Desktop, run by Theseus in Node mode

Stored in <userData>/extensions-data/claude-connector.json (token, port, switches, approved origins, upload folders) and <userData>/extensions-data/claude-connector/ (endpoint.json while listening, actions.log).

Needs the host's tab-control capability, which only built-in add-ons get. Turning any extension on or off restarts every add-on, this one included, which ends the connected clients' sessions. A client that does not start a new session by itself reconnects from its MCP menu (/mcp in Claude Code).