Skip to content

Commit 728fea3

Browse files
Simplify MCP connection handling and remove health checks
- 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 <[email protected]>
1 parent 7872b5f commit 728fea3

File tree

3 files changed

+65
-193
lines changed

3 files changed

+65
-193
lines changed

src/components/MCPTab.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export function MCPTab() {
99
const [showAddForm, setShowAddForm] = useState(false);
1010
const [newServerName, setNewServerName] = useState('');
1111
const [newServerUrl, setNewServerUrl] = useState('');
12-
const [authType, setAuthType] = useState<'none' | 'oauth'>('none');
1312

1413
// Collapsible section states
1514
const [showSummary, setShowSummary] = useState(true);
@@ -21,7 +20,6 @@ export function MCPTab() {
2120
await addMcpServer({
2221
name: 'Example Server',
2322
url: 'https://example-server.modelcontextprotocol.io/sse',
24-
authType: 'oauth',
2523
});
2624
} catch (error) {
2725
console.error('Failed to add example server:', error);
@@ -36,13 +34,11 @@ export function MCPTab() {
3634
await addMcpServer({
3735
name: newServerName,
3836
url: newServerUrl,
39-
authType,
4037
});
4138

4239
// Reset form
4340
setNewServerName('');
4441
setNewServerUrl('');
45-
setAuthType('none');
4642
setShowAddForm(false);
4743
} catch (error) {
4844
console.error('Failed to add custom server:', error);
@@ -175,21 +171,6 @@ export function MCPTab() {
175171
required
176172
/>
177173
</div>
178-
179-
<div>
180-
<label className="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1">
181-
Authentication
182-
</label>
183-
<select
184-
value={authType}
185-
onChange={(e) => setAuthType(e.target.value as 'none' | 'oauth')}
186-
className="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
187-
>
188-
<option value="none">None</option>
189-
<option value="oauth">OAuth</option>
190-
</select>
191-
</div>
192-
193174
<button
194175
type="submit"
195176
disabled={isLoading || !newServerName.trim() || !newServerUrl.trim()}

0 commit comments

Comments
 (0)