feat: add mcp oauth support via /mcp connect (#570)

This commit is contained in:
jnjpng
2026-01-16 17:59:39 -08:00
committed by GitHub
parent 147e7f6dfd
commit 167f30972d
6 changed files with 801 additions and 20 deletions

View File

@@ -355,7 +355,12 @@ export function handleMcpUsage(ctx: McpCommandContext, msg: string): void {
ctx.buffersRef,
ctx.refreshDerived,
msg,
'Usage: /mcp [add ...]\n /mcp - list MCP servers\n /mcp add --transport <http|sse|stdio> <name> <url|command> [...] - add a new server\n\nExamples:\n /mcp add --transport http notion https://mcp.notion.com/mcp\n /mcp add --transport http api https://api.example.com --header "Authorization: Bearer token"',
"Usage: /mcp [subcommand ...]\n" +
" /mcp - Open MCP server manager\n" +
" /mcp add ... - Add a new server (without OAuth)\n" +
" /mcp connect - Interactive wizard with OAuth support\n\n" +
"Examples:\n" +
" /mcp add --transport http notion https://mcp.notion.com/mcp",
false,
);
}

View File

@@ -178,7 +178,7 @@ export const commands: Record<string, Command> = {
},
},
"/mcp": {
desc: "Manage MCP servers",
desc: "Manage MCP servers (add, connect with OAuth)",
order: 32,
handler: () => {
// Handled specially in App.tsx to show MCP server selector