Agno's PublicSurface(mcp=True) looks at the tools your MCPConfig will register. A server that only serves custom functions never registers continue_run or cancel_run, so it starts as configured, with lifecycle_tools left on.
agent_os = AgentOS(
...,
public=PublicSurface(agents=[assistant], mcp=True),
mcp=MCPConfig(tools=[search_help_center], default_tools=False, stateless=True),
)
Publishing an agent, team or workflow as an MCP tool adds continue_run and cancel_run automatically, and a public MCP server can't expose those two tools. Set lifecycle_tools=False or exclude_tags={"lifecycle"}, and the PublicSurface error names both settings if you miss it.
Learn more about MCPConfig and Public Surface in the documentation.
Frequently asked questions
No. PublicSurface(mcp=True) checks the tools the server will actually expose. A server that only serves custom functions never registers continue_run or cancel_run, so AgentOS accepts it as written.
Publishing an agent, team or workflow as an MCP tool adds continue_run and cancel_run, and a public server can't expose them. Set lifecycle_tools=False or exclude_tags={"lifecycle"} on MCPConfig.
