Skip to content

Conversation

@sergeibbb
Copy link
Member

Description

Fixes #4626

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

sergeibbb added a commit that referenced this pull request Nov 12, 2025
sergeibbb added a commit that referenced this pull request Nov 12, 2025
@sergeibbb sergeibbb force-pushed the bug/4626-uninstall-duplicate-mcp branch from 0c2be54 to 4c73222 Compare November 12, 2025 13:49
sergeibbb added a commit that referenced this pull request Nov 12, 2025
@sergeibbb sergeibbb force-pushed the bug/4626-uninstall-duplicate-mcp branch from 4c73222 to ac2e892 Compare November 12, 2025 14:16
sergeibbb added a commit that referenced this pull request Nov 12, 2025
@sergeibbb sergeibbb force-pushed the bug/4626-uninstall-duplicate-mcp branch from ac2e892 to 0a1565e Compare November 12, 2025 14:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes issue #4626 by preventing duplicate MCP (Model Context Protocol) configurations. When the GitKraken MCP is registered, it now automatically uninstalls any existing external MCP configuration with the same app name to avoid duplication.

Key changes:

  • Modified onRegistrationCompleted to accept additional parameters and call a new uninstall method
  • Added uninstallExternalMcp method to remove duplicate external MCP configurations
  • Updated CHANGELOG.md to document the fix

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/env/node/gk/mcp/integration.ts Added logic to uninstall external MCP configurations after successful registration to prevent duplicates
CHANGELOG.md Added entry documenting the fix for MCP duplication issue #4626

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

this.container.telemetry.setGlobalAttribute('gk.mcp.registrationCompleted', true);
await this.uninstallExternalMcp(cliPath, appName);
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The uninstall operation happens after registration completes, which could lead to a race condition if another process is using the external MCP. Consider uninstalling the external MCP before registration instead of after, to prevent potential conflicts.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uninstall duplicate GK MCP servers

2 participants