Skip to content

Commit 8b2edc9

Browse files
committed
fix: persist only copy of mcp server when scope is changed
1 parent 4d776e0 commit 8b2edc9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,8 @@ export class McpEventHandler {
633633
this.#shouldDisplayListMCPServers = false
634634

635635
if (isEditMode && originalServerName) {
636-
if (serverName !== originalServerName) {
637-
await McpManager.instance.removeServer(originalServerName)
638-
await McpManager.instance.addServer(serverName, config, configPath, personaPath)
639-
} else {
640-
await McpManager.instance.updateServer(serverName, config, configPath)
641-
}
636+
await McpManager.instance.removeServer(originalServerName)
637+
await McpManager.instance.addServer(serverName, config, configPath, personaPath)
642638
} else {
643639
// Create new server
644640
await McpManager.instance.addServer(serverName, config, configPath, personaPath)

0 commit comments

Comments
 (0)