Skip to content

MCP registry servers disabled on restart #278830

@abhishekgupta-lab

Description

@abhishekgupta-lab

MCP Registry Servers Disabled on Restart

Issue Description

MCP servers installed from a custom registry are incorrectly marked as "disabled" after restarting VSCode, even though they were installed from an authorized registry source.

Steps to Reproduce

  1. Configure VSCode to use a custom MCP registry:

    {
      "chat.mcp.gallery.enabled": true,
      "chat.mcp.gallery.serviceUrl": "http://localhost:9000/mcp_registry",
      "chat.mcp.access": "registry"
    }
  2. Install an MCP server from the registry

  3. Verify the server works correctly

  4. Restart VSCode

  5. Bug: Server shows as "disabled" with message about access restrictions

Expected Behavior

MCP servers installed from the registry should remain enabled after restart, since they came from an authorized source.

Actual Behavior

Registry-installed servers are marked as disabled on every restart, requiring manual re-enabling.

Root Cause

Race condition during VSCode startup:

  1. Local MCP configurations load from settings
  2. Enablement checks run (getRuntimeStatus() and getEnablementStatus())
  3. Gallery metadata fetches from registry (async)
  4. Servers register in mcpService.servers collection

The enablement checks (step 2) run before gallery metadata loads (step 3), causing:

  • mcpServer.gallery is false during the check window
  • Servers incorrectly identified as non-registry servers
  • Access control logic disables them

Environment

  • VS Code Version: 1.107.0 (or any version with MCP support)
  • OS: macOS (reproducible on all platforms)
  • MCP Access Setting: "registry"
  • Custom Registry: Any custom MCP registry URL

Impact

  • Severity: High - Breaks user experience for custom registry users
  • Workaround: Manually re-enable servers after each restart (poor UX)
  • Affected Users: Anyone using custom MCP registries with chat.mcp.access: "registry"

Additional Context

This issue only affects custom registries because the official Microsoft registry may have different timing characteristics. The bug is in the client-side enablement logic, not the registry API.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions