feat(mcp): use project config as SSOT and sync enabled servers to ~/.claude.json
- Add McpConfig to MultiAppConfig and persist MCP servers in ~/.cc-switch/config.json - Add Tauri commands: get_mcp_config, upsert_mcp_server_in_config, delete_mcp_server_in_config, set_mcp_enabled, sync_enabled_mcp_to_claude, import_mcp_from_claude - Only write enabled MCPs to ~/.claude.json (mcpServers) and strip UI-only fields (enabled/source) - Frontend: update API wrappers and MCP panel to read/write via config.json; seed presets on first open; import from ~/.claude.json - Fix warnings (remove unused mut, dead code) - Verified with cargo check and pnpm typecheck
This commit is contained in:
@@ -75,3 +75,9 @@ export interface McpStatus {
|
||||
userConfigExists: boolean;
|
||||
serverCount: number;
|
||||
}
|
||||
|
||||
// 新:来自 config.json 的 MCP 列表响应
|
||||
export interface McpConfigResponse {
|
||||
configPath: string;
|
||||
servers: Record<string, McpServer>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user