import { Logger } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app/app.module'; /** MCP server of TaskStream over Streamable HTTP: `POST /mcp`. */ async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableShutdownHooks(); // Not PORT: Nx loads the workspace .env into every task, and there PORT is the API's. const port = Number(process.env['MCP_PORT'] ?? 3010); await app.listen(port); Logger.log(`🔌 MCP: http://localhost:${port}/mcp`, 'Bootstrap'); } void bootstrap();