diff --git a/vibn-frontend/app/api/mcp/route.ts b/vibn-frontend/app/api/mcp/route.ts index bc2b1abe..02f7e764 100644 --- a/vibn-frontend/app/api/mcp/route.ts +++ b/vibn-frontend/app/api/mcp/route.ts @@ -5241,11 +5241,19 @@ async function toolDevServerStart( } if (!isHealthy) { + let recentLogs = ""; + try { + recentLogs = await tailDevServerLog(project.id, row.id, 50); + } catch (logErr: any) { + recentLogs = `Failed to retrieve logs: ${logErr.message || String(logErr)}`; + } + return NextResponse.json({ result: { ok: false, error: "Server failed to start or bind to port within the timeout window.", + logs: recentLogs, healthCheck: { status: 500, output: failureOutput,