Bugfix: How to resolve route conflicts between McpController and Mcp...

Documentation for Sessions

🐛 Bugfix: How to resolve route conflicts between McpController and Mcp...

Date: 2026-01-23
Time: 16:08:20 UTC
Session: editor2-63.6
Agent: backend
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How to resolve route conflicts between McpController and McpGatewayController?

Task: Not specified


🎯 Decision Made

Chosen:

Rename McpController from @Controller('mcp') to @Controller('mcp-internal')

Options Considered:


💭 Reasoning

Both controllers were registered at /ai-api/mcp/, causing authentication bypass (McpController had no auth guards while McpGatewayController had JwtOrApiKeyGuard). The conflict caused /preflight to hit the public controller, bypassing authentication. Renaming to mcp-internal separates internal vs external access paths: /ai-api/mcp/ for external authenticated access, /ai-api/mcp-internal/* for internal unauthenticated access.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation