steep-balloon-41261
03/27/2026, 10:17 AMtall-airline-16756
03/27/2026, 10:18 AMtall-airline-16756
03/27/2026, 10:18 AM/sse GET and the /messages POST you see) are initiated by the agent process itself when the agent is created with the mcp_servers parameter. In your case, the mcp_servers list passed into SubAgent causes the agent framework to connect to those MCP HTTP endpoints (SSE for streaming updates and POST for message exchange).
Why that happens
• When an Agent is constructed with mcp_servers=mcp_servers the MCP HTTP client attempts to:
◦ Open an SSE stream (your /sse GET) to discover and receive tool/transport updates.
◦ Exchange messages and context with the MCP service via the /messages POST endpoints.
• Those requests are part of the built-in MCP integration and occur as soon as the agent initializes and connects to its configured MCP servers.
What to check next (if this is unexpected)
• Confirm the contents of the mcp_servers list you pass into SubAgent — any MCPServerHTTP entries there are the exact endpoints being contacted.
• Verify the MCP URLs are intentionally those targets (for example, https://orbit.uat.unifyapps.com/.../sse) and not a leftover/test endpoint.
• If you want the SubAgent to not contact MCP servers, create the SubAgent without mcp_servers or pass an empty list.
Quick clarification that will help me if you want more detail
• Do you control the code that constructs the mcp_servers list (and can you share how it’s built), or is that injected from elsewhere (e.g., TeamAgent or higher-level orchestrator)?
If you tell me whether mcp_servers is coming from TeamAgent or assembled when you route the SubAgent, I can point to the exact spot in the flow that triggers the HTTP calls and suggest changes (for example, how to remove or override MCP endpoints for SubAgents).
Sources: Model Context Protocol (MCP) | LiveKit Documentation, with interactive elementsrich-park-76284
03/27/2026, 10:21 AMtall-airline-16756
03/27/2026, 10:21 AMsuper().__init__(..., mcp_servers=mcp_servers)) will start the MCP client when an mcp_servers list is provided.
• That MCP client opens the SSE stream (/sse) and issues /messages calls automatically, which explains why you see those HTTP requests every time you enter the SubAgent.
Why it looks like it’s happening “out of nowhere”
• The mcp_servers list may be populated elsewhere (for example, in the TeamAgent, an orchestrator, or a factory that constructs SubAgent instances). Passing that list into the SubAgent constructor is sufficient for the base class to start the MCP connections at runtime.
• Because the work happens inside the base class, you won’t necessarily see an explicit “initialize MCP” call in your SubAgent implementation.
How to confirm the source
• Search where the SubAgent is constructed and inspect the argument passed for mcp_servers. That is the single most important place to check.
• If the SubAgent is created by TeamAgent or another builder, inspect that creation path to find where mcp_servers comes from.
Options to stop or change the behavior
• Pass an empty list or None for mcp_servers when creating the SubAgent to prevent automatic MCP connections:
◦ Example: mcp_servers=[] or mcp_servers=None (depending on constructor expectations).
• If you need some MCP servers but not for this SubAgent, ensure the creator only passes the intended list (filter out the MCP endpoints you don’t want).
• If removal isn’t possible at creation time, add an override in the higher-level creation code to prevent or delay MCP startup.
Quick diagnostic questions so I can point to the exact line to change
• Where is the SubAgent instantiated? Is it constructed inside TeamAgent code, in a factory, or in an orchestration layer you can inspect?
• Can you share (or describe) the code that builds the mcp_servers list or the call-site that creates SubAgent instances?
If you share the construction site (the few lines that call SubAgent(...)), I’ll point to the exact change to stop the automatic MCP requests.
, with interactive elementsrich-park-76284
03/27/2026, 10:32 AMif isinstance(mcp_servers, list) and len(mcp_servers) == 0:
mcp_servers = None # treat empty list as None (but keep NOT_GIVEN)
this is the what it is doing
in that where that calls happened
you have knowledge of livekit/agent/voice/agent.py
it is in that filetall-airline-16756
03/27/2026, 10:33 AMrich-park-76284
03/27/2026, 1:26 PM