-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Uninstalls duplicate MCP #4746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uninstalls duplicate MCP #4746
Conversation
0c2be54 to
4c73222
Compare
4c73222 to
ac2e892
Compare
ac2e892 to
0a1565e
Compare
There was a problem hiding this 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
onRegistrationCompletedto accept additional parameters and call a new uninstall method - Added
uninstallExternalMcpmethod 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); |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
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.
Description
Fixes #4626
Checklist
Fixes $XXX -orCloses #XXX -prefix to auto-close the issue that your PR addresses