Feat(desktop) Add mcp auth from TUI and VS Code support#13085
Feat(desktop) Add mcp auth from TUI and VS Code support#13085lesserevil wants to merge 15 commits intoanomalyco:devfrom
Conversation
…pen events in vscode extension
…o match provider expectations
…nstance conflicts
…ol results
The MCP tool wrapper in prompt.ts iterated result.content expecting raw
CallToolResult from the MCP SDK, but convertMcpTool already extracts text
and returns a flat { output, title, metadata } shape — so result.content
was always undefined, causing TypeError on every MCP tool call.
The MCP SDK's OAuthClientProvider.state() is a generator, not a retriever — the SDK never calls saveState(). The previous implementation threw when no state was pre-saved, causing all transport connections to fail silently for OAuth-protected servers. Also fixes the VS Code extension SSE endpoint path, adds payload unwrapping for global events, and promotes transport connection failure logs from debug to info for better diagnostics.
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several potentially related PRs that address similar MCP authentication features: Most Relevant:
Other related:
These PRs suggest that MCP OAuth authentication features are being actively developed across multiple components (TUI, app, remote servers). PR #11925 and #11477 appear to be the closest potential duplicates, as they also implement MCP OAuth authentication support in similar contexts. |
Fixed! |
Closes #12061
This PR adds two features:
Auth isn't done automatically, only when you 'enable' the mcp. If we did them all at once, we could get ugly auth storms.
Tested via manual testing on multiple MCPs, both from remote and local VSCode connections.