Summary
The extension declares engines.vscode: ^1.50.0 but the first statement of activate() accesses vscode.lm.registerMcpServerDefinitionProvider without optional chaining. The vscode.lm namespace was only added in VS Code 1.90, so on any host before that the extension throws on activation and none of the four providers (MCP, hover, completion, diagnostics) register.
Location
packages/vscode-extension/src/extension.ts:51
export function activate(context: vscode.ExtensionContext) {
if (vscode.lm.registerMcpServerDefinitionProvider) { // ← non-optional
context.subscriptions.push(
vscode.lm?.registerMcpServerDefinitionProvider( // (chained here, but the check above already crashed)
...
Reproduction
Minimal repro of the access pattern outside of VS Code:
$ node -e 'const vscode={}; if (vscode.lm.registerMcpServerDefinitionProvider) {}'
TypeError: Cannot read properties of undefined (reading 'registerMcpServerDefinitionProvider')
On VS Code 1.50 – 1.89 the extension host triggers the same TypeError on activate(), marks the extension as failed-to-activate, and silently disables all scope linting features for that session.
Suggested fix
Either:
- if (vscode.lm.registerMcpServerDefinitionProvider) {
+ if (vscode.lm?.registerMcpServerDefinitionProvider) {
or bump engines.vscode to the version where registerMcpServerDefinitionProvider shipped (^1.99.0), so the manifest reflects the real runtime requirement.
Happy to send a PR if it's helpful.
Summary
The extension declares
engines.vscode: ^1.50.0but the first statement ofactivate()accessesvscode.lm.registerMcpServerDefinitionProviderwithout optional chaining. Thevscode.lmnamespace was only added in VS Code 1.90, so on any host before that the extension throws on activation and none of the four providers (MCP, hover, completion, diagnostics) register.Location
packages/vscode-extension/src/extension.ts:51Reproduction
Minimal repro of the access pattern outside of VS Code:
On VS Code 1.50 – 1.89 the extension host triggers the same TypeError on
activate(), marks the extension as failed-to-activate, and silently disables all scope linting features for that session.Suggested fix
Either:
or bump
engines.vscodeto the version whereregisterMcpServerDefinitionProvidershipped (^1.99.0), so the manifest reflects the real runtime requirement.Happy to send a PR if it's helpful.