Cambiar endpoint MCP de /mcp a / para funcionar con StripPrefix
All checks were successful
build-and-deploy / build (push) Successful in 11s
build-and-deploy / deploy (push) Successful in 4s

- Traefik elimina /mcp del path antes de enviar al servidor
- El servidor ahora escucha en POST / en lugar de POST /mcp
- Permite que las peticiones a /mcp lleguen correctamente
This commit is contained in:
2025-10-13 19:41:57 -06:00
parent 4417bc08eb
commit 0dc18d2154

View File

@@ -493,8 +493,8 @@ app.get('/health', (req, res) => {
res.json({ status: 'ok', service: 'mcp-docker-server' }); res.json({ status: 'ok', service: 'mcp-docker-server' });
}); });
// Endpoint MCP // Endpoint MCP (escucha en / porque Traefik hace StripPrefix de /mcp)
app.post('/mcp', async (req, res) => { app.post('/', async (req, res) => {
try { try {
const transport = new StreamableHTTPServerTransport({ const transport = new StreamableHTTPServerTransport({
sessionIdGenerator: undefined, sessionIdGenerator: undefined,