Skip to content

Commit 56a43ac

Browse files
committed
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.
1 parent 67d9a94 commit 56a43ac

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,9 @@ if (AUTH_MODE === 'integrated') {
227227
}
228228
}
229229

230-
// Serve resource metadata only (not auth endpoints)
231-
app.use(mcpAuthMetadataRouter({
232-
oauthMetadata: authMetadata,
233-
resourceServerUrl: new URL(BASE_URI),
234-
resourceName: "MCP Everything Server"
235-
}));
230+
// In separate mode, we don't serve OAuth metadata endpoints
231+
// The auth server handles all OAuth metadata
232+
// We only need to configure the bearer auth middleware
236233

237234
// Configure bearer auth with external verifier
238235
const externalVerifier = new ExternalAuthVerifier(AUTH_SERVER_URL);

0 commit comments

Comments
 (0)