Commit 72f310f
committed
feat(desktop): per-workspace MCP client config installer
Add commands to register the gateway endpoint in a project-local MCP config
inside a chosen folder, injecting `X-Mcpmux-Workspace: <folder path>` so the
gateway routes the connection to that folder's workspace binding without
relying on the client reporting MCP roots.
- list_workspace_install_clients: the supported project-local clients
(Cursor, Claude Code, VS Code/Copilot, opencode, Zed) with their config
paths. Each client's config-shape differences (top-level key mcpServers /
servers / mcp / context_servers, and the type field) live in one table.
- generate_workspace_config_snippet: copy-paste full-file snippet per client.
- install_workspace_mcp_config: create or extend each client's config,
preserving other servers, backing up an existing file, creating parent
dirs. Refuses to clobber a non-JSON (JSONC) file, reporting it instead.
Global-only clients (Windsurf, Cline) and Claude Desktop (stdio, no static
headers) are excluded — a per-workspace header needs project-local scope.
Tested: entry shape per client, merge create/extend/replace, preserve
siblings, reject JSONC/non-object, create-then-update-with-backup on disk.
Claude-Session: https://claude.ai/code/session_01Baan9JmzR43uxxRUh7CAMF
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>1 parent 429e69a commit 72f310f
3 files changed
Lines changed: 535 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
0 commit comments