File tree Expand file tree Collapse file tree
app/workspace/[workspaceId]/settings/components/mcp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,10 +152,6 @@ interface MCPProps {
152152 initialServerId ?: string | null
153153}
154154
155- /**
156- * MCP Settings component for managing Model Context Protocol servers.
157- * Handles server CRUD operations, connection testing, and environment variable integration.
158- */
159155export function MCP ( { initialServerId } : MCPProps ) {
160156 const params = useParams ( )
161157 const workspaceId = params . workspaceId as string
Original file line number Diff line number Diff line change @@ -6,14 +6,6 @@ const logger = createLogger('McpOauthProbe')
66
77const PROBE_TIMEOUT_MS = 5000
88
9- /**
10- * Lightweight unauthenticated probe to determine the auth mode required by
11- * a remote MCP server.
12- *
13- * - 200/2xx → server accepts unauthenticated requests; treat as `none`.
14- * - 401 with `WWW-Authenticate: Bearer resource_metadata=...` → `oauth`.
15- * - anything else → fall back to `headers` (caller can let the user paste a token).
16- */
179export async function detectMcpAuthType ( url : string ) : Promise < McpAuthType > {
1810 const controller = new AbortController ( )
1911 const timer = setTimeout ( ( ) => controller . abort ( ) , PROBE_TIMEOUT_MS )
Original file line number Diff line number Diff line change @@ -148,10 +148,6 @@ export class SimMcpOauthProvider implements OAuthClientProvider {
148148 }
149149}
150150
151- /**
152- * Load workspace-shared pre-registered OAuth credentials for a server, if any.
153- * Decrypts the stored client_secret. Returns undefined when DCR should be used.
154- */
155151export async function loadPreregisteredClient (
156152 serverId : string
157153) : Promise < PreregisteredClient | undefined > {
Original file line number Diff line number Diff line change @@ -162,8 +162,6 @@ class McpService {
162162 }
163163
164164 /**
165- * Create and connect to an MCP client.
166- *
167165 * For `authType === 'oauth'` configs, a per-user `SimMcpOauthProvider` is
168166 * built and attached so the SDK can drive the standard MCP OAuth flow.
169167 */
@@ -412,9 +410,8 @@ class McpService {
412410 result . reason instanceof McpOauthAuthorizationRequiredError ||
413411 result . reason instanceof UnauthorizedError
414412 ) {
415- // Pending user authorization or expired refresh — not a hard failure.
416- // Force the row back to 'disconnected' so the settings UI surfaces the
417- // "Connect with OAuth" button instead of leaving stale 'connected' state.
413+ // Force 'disconnected' so the settings UI surfaces the re-auth button
414+ // instead of a stale 'connected' state when refresh has expired.
418415 logger . info ( `[${ requestId } ] Skipping server ${ server . name } : OAuth authorization pending` )
419416 statusUpdates . push (
420417 db
You can’t perform that action at this time.
0 commit comments