-
Notifications
You must be signed in to change notification settings - Fork 36.4k
Description
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
-
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" } -
Install an MCP server from the registry
-
Verify the server works correctly
-
Restart VSCode
-
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:
- Local MCP configurations load from settings
- Enablement checks run (
getRuntimeStatus()andgetEnablementStatus()) - Gallery metadata fetches from registry (async)
- Servers register in
mcpService.serverscollection
The enablement checks (step 2) run before gallery metadata loads (step 3), causing:
mcpServer.galleryisfalseduring 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.