# Public AgentOS MCP servers check the tools they actually expose

> Agno's PublicSurface checks the lifecycle tools an AgentOS MCP server actually exposes, so a public server of custom functions starts with lifecycle_tools left on.

- Published: 2026-09-08
- Author: Ashpreet Bedi
- Categories: Changelog
- Canonical: https://www.agno.com/articles/public-agentos-mcp-servers-check-the-tools-they-actually-expose
- Markdown: https://www.agno.com/articles/public-agentos-mcp-servers-check-the-tools-they-actually-expose.md

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.

```python
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.](https://www.agno.com/images/v3-0-8-public-mcp-configs.png)

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](https://docs.agno.com/agent-os/mcp/mcp#mcpconfig) and [Public Surface](https://docs.agno.com/agent-os/public-surface) in the documentation.
