Skip to content

Copilot Chat causes Pylance MCP registration error: 'Collection or definition not found for ms-python.vscode-pylance/pylanceMcp' #273351

@gusrodbot

Description

@gusrodbot

Environment

  • OS: Windows 11 Home
  • VS Code: 1.105.1 (commit 7d842fb, x64)
  • Pylance: ms-python.vscode-pylance@2025.9.1
  • Copilot Chat: github.copilot-chat@0.32.3
  • Other related extensions:
    • github.copilot@1.388.0
    • ms-python.python@2025.16.0
    • ms-python.debugpy@2025.14.1
    • ms-python.vscode-python-envs@1.10.0

Reproduction Steps

  1. Open VS Code with any workspace containing Python files.
  2. Ensure ms-python.vscode-pylance is installed and enabled.
  3. Enable github.copilot-chat extension.
  4. Reload the window or restart VS Code.
  5. Open View → Output → select "Log (Extension Host)" from the dropdown.
  6. Observe error messages related to pylanceMcp and illegal URI schemes.

Observed Behavior

When GitHub Copilot Chat extension is enabled:

  • Extension host shows errors: "Collection or definition not found for ms-python.vscode-pylance/pylanceMcp"
  • Additional errors about "Scheme contains illegal characters" appear
  • These errors appear consistently on VS Code startup/reload

When GitHub Copilot Chat extension is disabled:

  • All MCP-related errors disappear completely
  • Pylance functions normally
  • No URI scheme errors occur

Expected Behavior

GitHub Copilot Chat should not interfere with Pylance's MCP server registration. Both extensions should coexist without causing extension-host errors.

Additional Investigation

  • Root cause: The github.copilot-chat extension appears to conflict with Pylance's mcpServerDefinitionProviders contribution (id: "pylanceMcp").
  • Reproducibility: 100% reproducible - disabling Copilot Chat immediately resolves the issue, re-enabling it immediately reintroduces the errors.
  • Impact: While both extensions appear to function, the constant error logging suggests an underlying integration problem that may affect stability or performance.

Technical Details

Pylance extension defines an MCP server provider in its package.json:

"mcpServerDefinitionProviders": [
  {
    "id": "pylanceMcp",
    ...
  }
]

The conflict appears to be between this MCP provider and some MCP-related functionality in the Copilot Chat extension.

error.txt

Metadata

Metadata

Assignees

Labels

*caused-by-extensionIssue identified to be caused by an extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions