Skip to content

Commit 72f310f

Browse files
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

File tree

apps/desktop/src-tauri/src/commands/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub mod server_manager;
2121
pub mod settings;
2222
pub mod space;
2323
pub mod workspace_binding;
24+
pub mod workspace_install;
2425

2526
// Re-export commands for convenience
2627
pub use builtin_servers::*;
@@ -40,3 +41,4 @@ pub use server_manager::*;
4041
pub use settings::*;
4142
pub use space::*;
4243
pub use workspace_binding::*;
44+
pub use workspace_install::*;

0 commit comments

Comments
 (0)