Skip to content
Changelog

Public AgentOS MCP servers check the tools they actually expose

ContributorAshpreet BediFounder & CEO

September 8, 20261 min read

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),
)

Three public MCP configurations, each with default_tools=False and stateless=True. A custom function starts. An exposed agent is rejected. An exposed agent with lifecycle_tools=False starts. The error for the exposed agent explains how to disable continue_run and cancel_run.

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.

Shipped around the same time