Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(connect-auth): handle missing server name in MCP auth modal

Steven Enamakel405c8146c33f
diff --git a/app/src/components/channels/mcp/ConnectAuthModal.tsx b/app/src/components/channels/mcp/ConnectAuthModal.tsx
index 48e021dcbc..5ce07cc7c1 100644
--- a/app/src/components/channels/mcp/ConnectAuthModal.tsx
+++ b/app/src/components/channels/mcp/ConnectAuthModal.tsx
@@ -29,7 +29,6 @@ import Button from '../../ui/Button';
import { ModalShell } from '../../ui/ModalShell';
import NativeSelect from '../../ui/NativeSelect';
import TextField from '../../ui/TextField';
-import ConfigHelpModal from './ConfigHelpModal';
import type { InstalledServer, McpTool, SmitheryServerDetail } from './types';
const log = debug('mcp-clients:connect-auth');
@@ -248,7 +247,6 @@ const ConnectAuthModal = ({ server, onClose, onConnected }: ConnectAuthModalProp
// the token/header fields. `detecting` until the probe returns.
const [authKind, setAuthKind] = useState<'detecting' | 'none' | 'token' | 'oauth'>('detecting');
const [oauthWaiting, setOauthWaiting] = useState(false);
- const [showConfigHelp, setShowConfigHelp] = useState(false);
const oauthPollTimer = useRef<number | null>(null);
const oauthCancelled = useRef(false);
// Host of the server's HTTP-remote endpoint (from the registry detail's
@@ -498,18 +496,7 @@ const ConnectAuthModal = ({ server, onClose, onConnected }: ConnectAuthModalProp
onClose={handleClose}
titleId={titleId}
title={t('mcp.connectAuth.title').replace('{name}', server.display_name)}
- subtitle={
- <>
- {t('mcp.connectAuth.hint')}{' '}
- <Button
- variant="tertiary"
- size="xs"
- onClick={() => setShowConfigHelp(true)}
- className="h-auto p-0 align-baseline text-[11px] font-medium text-primary-600 hover:underline dark:text-primary-400">
- {t('mcp.connectAuth.howToGetToken')}
- </Button>
- </>
- }
+ subtitle={t('mcp.connectAuth.hint')}
maxWidthClassName="max-w-md"
contentClassName="space-y-4 p-5"
closePolicy={{
@@ -569,14 +556,6 @@ const ConnectAuthModal = ({ server, onClose, onConnected }: ConnectAuthModalProp
</Button>
</p>
)}
- <Button
- variant="tertiary"
- size="xs"
- onClick={() => setShowConfigHelp(true)}
- className="h-auto gap-1 p-0 align-baseline text-[11px] font-medium text-primary-600 hover:underline dark:text-primary-400">
- {t('mcp.connectAuth.findToken')}
- <span aria-hidden="true">↗</span>
- </Button>
</div>
)}
@@ -737,19 +716,6 @@ const ConnectAuthModal = ({ server, onClose, onConnected }: ConnectAuthModalProp
))}
</div>
- {/* Stacked configuration-help chat modal (above this one). Rendered
- inside this Dialog's own tree — not as a separate top-level
- sibling — so Radix's aria-hidden-others bookkeeping recognizes it
- as part of the same branch instead of hiding this dialog behind
- it. */}
- {showConfigHelp && (
- <ConfigHelpModal
- qualifiedName={server.qualified_name}
- displayName={server.display_name}
- description={server.description}
- onClose={() => setShowConfigHelp(false)}
- />
- )}
</>
</ModalShell>
);
diff --git a/app/src/components/channels/mcp/InstalledServerDetail.tsx b/app/src/components/channels/mcp/InstalledServerDetail.tsx
index 23cb7cd922..1334977faa 100644
--- a/app/src/components/channels/mcp/InstalledServerDetail.tsx
+++ b/app/src/components/channels/mcp/InstalledServerDetail.tsx
@@ -9,8 +9,6 @@ import { useT } from '../../../lib/i18n/I18nContext';
import { mcpClientsApi } from '../../../services/api/mcpClientsApi';
import Button from '../../ui/Button';
import TextField from '../../ui/TextField';
-import { clearConfigChat } from './ConfigAssistantPanel';
-import ConfigHelpModal from './ConfigHelpModal';
import ConnectAuthModal, { authHintMessageKey } from './ConnectAuthModal';
import McpStatusBadge from './McpStatusBadge';
import McpToolList from './McpToolList';
@@ -19,11 +17,6 @@ import type { ConnStatus, InstalledServer, McpTool, ServerStatus } from './types
const log = debug('mcp-clients:detail');
-// The "how do I get the token" AI assistant lives on this detail page (not the
-// Connect modal, which stays focused on entering the credential). It auto-runs a
-// server-specific prompt and can web-research the provider's docs.
-const SHOW_CONFIG_ASSISTANT = true;
-
interface InstalledServerDetailProps {
server: InstalledServer;
connStatus: ConnStatus | undefined;
@@ -51,7 +44,6 @@ const InstalledServerDetail = ({
const [busy, setBusy] = useState(false);
const [error, setError] = useState<string | null>(null);
const [confirmUninstall, setConfirmUninstall] = useState(false);
- const [showAssistant, setShowAssistant] = useState(false);
// Reconfigure form: when open, renders one input per env key so the user can
// supply replacement values and reconnect without uninstall/reinstall
// (issue #3039 env-reconfiguration). Values are never pre-filled from the
@@ -69,11 +61,6 @@ const InstalledServerDetail = ({
// (declared required fields + custom headers) before we actually connect.
const [connectModalOpen, setConnectModalOpen] = useState(false);
- // The help chat persists (cached by qualified_name) while this server's detail
- // page is open, so closing/reopening the modal keeps the conversation. Clear
- // it when we leave this server (unmount → back to list, or switch servers).
- useEffect(() => () => clearConfigChat(server.qualified_name), [server.qualified_name]);
-
// Poll-driven safety net: if the server leaves `connected` by ANY path —
// background status poll, parent prop change, auth expiry — not just the
// explicit disconnect/uninstall handlers, drop the staged playground so its
@@ -177,19 +164,6 @@ const InstalledServerDetail = ({
[server.env_keys]
);
- // The config assistant suggests values — seed the reconfigure form with them
- // so the user can confirm/complete before we persist + reconnect. Suggested
- // sets may be partial; the form requires every key so a reconnect never drops
- // a required var (issue #3039 gap B6 — suggested values were never persisted).
- const handleApplySuggestedEnv = useCallback(
- (env: Record<string, string>) => {
- log('suggested_env received, opening reconfigure form keys=%o', Object.keys(env));
- setShowAssistant(false);
- openReconfigure(env);
- },
- [openReconfigure]
- );
-
const handleSaveReconfigure = useCallback(() => {
void runBusy(async () => {
// Replace-all semantics (update_env DELETEs then INSERTs): every key must
@@ -307,16 +281,6 @@ const InstalledServerDetail = ({
{server.enabled ? t('mcp.detail.disable') : t('mcp.detail.enable')}
</Button>
- {SHOW_CONFIG_ASSISTANT && (
- <Button
- variant="secondary"
- size="sm"
- disabled={busy}
- onClick={() => setShowAssistant(prev => !prev)}>
- {showAssistant ? t('mcp.connectAuth.hideHelp') : t('mcp.connectAuth.howToGetToken')}
- </Button>
- )}
-
{confirmUninstall ? (
<div className="flex items-center gap-1.5">
<span className="text-xs text-coral-600 dark:text-coral-400 font-medium">
@@ -428,17 +392,6 @@ const InstalledServerDetail = ({
/>
</div>
- {/* Config-help chat (stacked modal). */}
- {SHOW_CONFIG_ASSISTANT && showAssistant && (
- <ConfigHelpModal
- qualifiedName={server.qualified_name}
- displayName={server.display_name}
- description={server.description}
- onClose={() => setShowAssistant(false)}
- onApplySuggestedEnv={handleApplySuggestedEnv}
- />
- )}
-
{/* Tool Execution Playground modal. Gated on BOTH a selected tool
AND a live connection — a disconnected server's tool list is
stale by definition, and the upstream RPC will reject calls