Skip to content

Commit e37f10a

Browse files
waleedlatif1claude
andcommitted
fix(mcp): allow OAuth flow for DCR-only servers; detect secret-only edits
- Drop oauthClientId requirement on auth-failed bypass so DCR-capable servers can submit and trigger auto-OAuth - Use oauthClientSecretTouched in hasChanges so clearing the stored secret enables submit Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0968598 commit e37f10a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ export function McpServerFormModal({
431431
if (formData.url !== originalData.url) return true
432432
if (formData.transport !== originalData.transport) return true
433433
if ((formData.oauthClientId || '') !== (originalData.oauthClientId || '')) return true
434-
if ((formData.oauthClientSecret || '') !== (originalData.oauthClientSecret || '')) return true
434+
if (oauthClientSecretTouched) return true
435435
const currentHeaders = formData.headers || []
436436
const origHeaders = originalData.headers || []
437437
if (currentHeaders.length !== origHeaders.length) return true
@@ -443,7 +443,7 @@ export function McpServerFormModal({
443443
return true
444444
}
445445
return false
446-
}, [mode, formData, originalData])
446+
}, [mode, formData, originalData, oauthClientSecretTouched])
447447

448448
const parseJsonConfig = useCallback(
449449
(json: string): { name: string; url: string; headers: Record<string, string> } | null => {
@@ -524,7 +524,7 @@ export function McpServerFormModal({
524524
errorText.includes('unauthorized') ||
525525
errorText.includes('oauth') ||
526526
errorText.includes('authentication')
527-
if (!(oauthClientId && looksLikeAuthRequired)) {
527+
if (!looksLikeAuthRequired) {
528528
setSubmitError(
529529
connectionResult.error || 'Connection test failed. Please check the URL and try again.'
530530
)

0 commit comments

Comments
 (0)