Fix OAuth metadata endpoint in separate mode

Remove incorrect mcpAuthMetadataRouter call when running in separate mode.
The resource server should not serve OAuth metadata endpoints - only the
auth server should provide these endpoints.
This commit is contained in:
Basil Hosmer 2025-09-15 02:10:36 -04:00
commit 56a43ac67f
No known key found for this signature in database

View file

@ -227,12 +227,9 @@ if (AUTH_MODE === 'integrated') {
}
}
// Serve resource metadata only (not auth endpoints)
app.use(mcpAuthMetadataRouter({
oauthMetadata: authMetadata,
resourceServerUrl: new URL(BASE_URI),
resourceName: "MCP Everything Server"
}));
// In separate mode, we don't serve OAuth metadata endpoints
// The auth server handles all OAuth metadata
// We only need to configure the bearer auth middleware
// Configure bearer auth with external verifier
const externalVerifier = new ExternalAuthVerifier(AUTH_SERVER_URL);