From 728fea3665b5ebafea99e7254942084d45324aab Mon Sep 17 00:00:00 2001 From: Jerome Date: Wed, 18 Jun 2025 18:33:55 +0100 Subject: [PATCH] Simplify MCP connection handling and remove health checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove auth type selection from UI - servers will auto-detect OAuth when needed - Remove auto-reconnect logic and health checks to reduce complexity - Always initialize OAuth provider for all connections - Simplify transport selection - always try streamable-http first, then SSE - Remove unused config options (transport preference, auto-reconnect) - Add TODO comment about CORS issues for failed fetch errors - Make authType and transport optional in connection types - Clean up connection state notifications for better UI updates 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/components/MCPTab.tsx | 19 ---- src/mcp/connection.ts | 233 +++++++++++--------------------------- src/types/mcp.ts | 6 +- 3 files changed, 65 insertions(+), 193 deletions(-) diff --git a/src/components/MCPTab.tsx b/src/components/MCPTab.tsx index c77f497..c8f136d 100644 --- a/src/components/MCPTab.tsx +++ b/src/components/MCPTab.tsx @@ -9,7 +9,6 @@ export function MCPTab() { const [showAddForm, setShowAddForm] = useState(false); const [newServerName, setNewServerName] = useState(''); const [newServerUrl, setNewServerUrl] = useState(''); - const [authType, setAuthType] = useState<'none' | 'oauth'>('none'); // Collapsible section states const [showSummary, setShowSummary] = useState(true); @@ -21,7 +20,6 @@ export function MCPTab() { await addMcpServer({ name: 'Example Server', url: 'https://example-server.modelcontextprotocol.io/sse', - authType: 'oauth', }); } catch (error) { console.error('Failed to add example server:', error); @@ -36,13 +34,11 @@ export function MCPTab() { await addMcpServer({ name: newServerName, url: newServerUrl, - authType, }); // Reset form setNewServerName(''); setNewServerUrl(''); - setAuthType('none'); setShowAddForm(false); } catch (error) { console.error('Failed to add custom server:', error); @@ -175,21 +171,6 @@ export function MCPTab() { required /> - -
- - -
-