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 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
sergeibbb added a commit that referenced this pull request Nov 12, 2025
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.

@sergeibbb sergeibbb force-pushed the bug/4626-uninstall-duplicate-mcp branch from 0a1565e to 03b255a Compare November 21, 2025 16:45
@sergeibbb
Copy link
Member Author

@eamodio I have one doubt here.

I suppose, the result of the fix should give us the following:

  • User comes to us and says "I have duplication of MCP"
  • We say: "Try one of the following" (both work):
  1. Reload your IDE window
  2. Call GitLens: Reinstall GitKraken MCP in the command palette.

However, now we might have problem with the option #2.

That's because, I call deduping after the successful config call, here:
image

But it's never called twice until the version of the GK CLI is updated:
image
image

Therefore, the question is the following:

  1. Is it OK that the second recipe won't always work (only once per launch)
  2. Or is it better to move deduping command to another place? e.g. from onRegistrationCompleted to getMcpConfigurationFromCLI ?

cc @axosoft-ramint

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