UNPKG

qwen-mcp-manager

Version:

MCP Server for managing other MCP servers in qwen-code

42 lines 1.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.uninstallMcpPackage = void 0; exports.uninstallMcpPackage = { name: 'uninstall_mcp_package', description: '卸载并从 settings.json 移除', inputSchema: {}, // This will be loaded from the JSON schema file handler: async (args, context) => { const { name } = args; const { configManager } = context; try { // 1. 执行 uninstall 脚本(若存在)(简化) // TODO: Implement uninstall script execution in V5 // 2. 从 settings.json 删除 mcpServers[name] (简化) // In a real implementation, this would involve reading the config, // deleting the entry, backing up the original, and writing the new config atomically. // For now, we just log the action. console.log(`Uninstalling package ${name}`); // For now, just return a success message // In a real implementation, this would involve actual file I/O and error handling return { content: [ { type: 'text', text: `成功卸载包: ${name}` } ] }; } catch (error) { return { content: [ { type: 'text', text: `卸载包失败: ${error.message}` } ] }; } } }; //# sourceMappingURL=uninstall_mcp_package.js.map