[Bug] MCP Server hosted by extension registered via Cursor API stuck at 0 tools enabled

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

A Cursor extension that hosts an HTTP MCP Server and registers it via registerServer stays stuck at 0 tools enabled, if installed as a built .vsix package.
The same extension works after a restart (so still .vsix) OR if launched directly from cursor (running code directly).

Steps to Reproduce

In the supplied project folder:
npm install
npm package
and install the .vsix in cursor

Expected Behavior

In: Preferences > Cursor settings > Customize > MCPs,
extension-random-number shows: 1 tool is enabled

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.15.19 (user setup)
VS Code Extension API: 1.128.0
Commit: de07bee81cefe43461ebf4f40c3d2d78d15052a0
Date: 2026-08-11T05:22:54.627Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey Balint!
Thanks for the detailed report and the minimal repro repo - I built it and hit the same thing on 3.15.19 right away, so it’s not anything wrong with your extension. registerServer() should take effect immediately.

To unblock without restarting: in Cursor Settings → Tools & MCPs, open the Configure popover for your server and toggle the Extension source off, then back on. That flipped it straight to Local: Connected · 1 tool enabled for me. The Reload button in that popover doesn’t do it - it has to be the source toggle.

One heads-up: if you use Developer: Reload Window while the extension is installed, it may come back with a fetch failed instead, since the extension picks a new port on reactivation. The same source toggle clears that too.

This is an issue we’re tracking and we’ve let the team know. No timeline yet, but I’ll post here when there’s an update.