We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87504d7 commit fe7118dCopy full SHA for fe7118d
1 file changed
apps/sim/app/api/mcp/servers/route.ts
@@ -113,7 +113,8 @@ export const POST = withRouteHandler(
113
const serverId = body.url ? generateMcpServerId(workspaceId, body.url) : generateId()
114
115
let resolvedAuthType: 'none' | 'headers' | 'oauth' = body.authType ?? 'headers'
116
- if (!body.authType && body.url && !body.headers) {
+ const hasHeaders = body.headers && Object.keys(body.headers).length > 0
117
+ if (!body.authType && body.url && !hasHeaders) {
118
try {
119
resolvedAuthType = await detectMcpAuthType(body.url)
120
logger.info(`[${requestId}] Probed ${body.url}: authType=${resolvedAuthType}`)
0 commit comments