Skip to content

Conversation

@Goodnessmbakara
Copy link

Summary

This PR implements comprehensive MCP server deduplication to prevent duplicate server definitions across different collections, addressing the feedback from PR #272936.

Changes Made

  • Comprehensive Key Generation: Uses McpServerLaunch.hash() method which handles all launch configuration properties including:
    • Variable resolution through existing VS Code infrastructure
    • Environment variables in hash calculation
    • HTTP headers for HTTP servers
  • Priority-Based Deduplication: Implements user > workspace > extensions priority system
  • Telemetry Tracking: Added proper typed telemetry data structures for deduplication events
  • Test Coverage: Added comprehensive test suite following VS Code patterns

Addresses Reviewer Feedback

  • Variable Resolution: Now handled by existing McpServerLaunch.hash() infrastructure
  • Environment Variables: Included in comprehensive hash calculation
  • HTTP Headers: Included in hash calculation for HTTP servers
  • Workspace Priority: Now meaningful with proper deduplication logic

Related

CC: @torsknod2 (reviewer from original PR)

…ation

- Add deduplication logic to prevent duplicate server definitions
- Use McpServerLaunch.hash() for comprehensive key generation including:
  - Variable resolution through existing infrastructure
  - Environment variables in hash calculation
  - HTTP headers for HTTP servers
- Implement priority-based deduplication (user > workspace > extensions)
- Add proper telemetry tracking with typed data structures
- Add comprehensive test suite following VS Code patterns
- Addresses reviewer feedback on variable resolution and environment variables

Fixes: Server deduplication now properly handles all launch configuration properties
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.

2 participants