- collectMcpServerNames takes an includeDisabled flag (default true); the
/mcp completer now passes false for test/reconnect/reauth/unauth, whose
handlers (#resolveServerForAuth, reconnectServer) can never resolve a
disabled-only discovered name (dropped from mcpManager, absent from
mcpServers). enable/disable keep offering it since #handleSetEnabled
handles that case for both directions.
- Moved the /mcp autocomplete CHANGELOG entry from the now-released
## [17.1.0] section (where an earlier upstream merge relocated it) back
under ## [Unreleased].
/mcp remove <name> only ever succeeds against a config-file mcpServers
entry (project scope by default, user scope via --scope user) —
runtime-discovered-only servers have no config entry and always fail
with "not found in <scope> config". Restrict remove completions to
config-file names, and tag a user-only name with --scope user so the
inserted command is directly executable.
- collectMcpServerNames now unions userConfig.disabledServers so a
third-party-discovered server that was /mcp disable'd (and thus dropped
from mcpManager.getAllServerNames()) still tab-completes as an /mcp
enable target.
- collectMcpServerNames accepts an optional preloaded { userConfig,
projectConfig }; #handleList() passes what it already read instead of
re-reading both config files a second time.
- /mcp's argument completer catches collectMcpServerNames failures (e.g.
malformed config JSON) and returns null instead of letting the
rejection escape un-awaited callers.
Adds an exported collectMcpServerNames() helper (used by both /mcp list
and the new completer) and a runtime-bound getArgumentCompletions for
/mcp that resolves server names after enable/disable/test/remove/
reconnect/reauth/unauth, filtered by the typed prefix. Subcommands with
a different argument shape (add, smithery-search, ...) keep returning
null, and subcommand-name completion is unaffected.
Closes#5654.