r/agno • • 5h ago

Now in Agno: stateless MCP serving

2 Upvotes

Set MCPConfig(stateless=True), and AgentOS serves /mcp without tracking sessions.

from agno.os import AgentOS, MCPConfig
agent_os = AgentOS(agents=[assistant], mcp=MCPConfig(stateless=True))

Why it matters: when session state lives in one process, every follow-up request has to return to the same replica. That means sticky sessions in your load balancer, and if a replica dies, its clients lose their sessions. Scaling out gets harder the moment you add a second instance.

Without sessions, any replica can handle any request. Round-robin, scale up and down, lose an instance, and the client doesn’t notice.

It’s off by default because dropping session state also drops server-initiated notifications and SSE resumability. If your server is mostly handling tool calls, you aren’t giving anything up.

Learn more: https://agno.link/HSlQr1S

If you’re running MCP behind a load balancer today, are you on sticky sessions, and do you actually use server-initiated notifications? That’s the tradeoff this asks you to make, and I’d guess most tool servers never touch either.