# Serve MCP statelessly so any replica can answer any request

> MCPConfig(stateless=True) serves /mcp without session tracking, so a multi-instance deployment no longer needs session affinity in front of it.

- Published: 2026-09-04
- Author: Sannya Singal
- Categories: Changelog
- Canonical: https://www.agno.com/articles/serve-mcp-statelessly-so-any-replica-can-answer-any-request
- Markdown: https://www.agno.com/articles/serve-mcp-statelessly-so-any-replica-can-answer-any-request.md

We added `MCPConfig(stateless=True)`, which serves `/mcp` without tracking sessions. With it on, any replica can answer any request, so a multi-instance deployment no longer needs session affinity in front of it.

```python
from agno.os import AgentOS, MCPConfig

agent_os = AgentOS(agents=[assistant], mcp=MCPConfig(stateless=True))
```

We left it off by default, because dropping session state also drops server-initiated notifications and SSE resumability. Turn it on when horizontal scale matters more than those.

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/14_mcp/stateless.py), and learn more about the [AgentOS MCP server](https://docs.agno.com/features/mcp-server) in the documentation.
