MCPTools class. Read more about using MCP tools here.
Your MCPTools will work normally within AgentOS. Their lifecycle is automatically handled, you don’t need to handle their connection and disconnection.
If you are using
MCPTools within AgentOS, you should not use reload=True when serving your AgentOS.
This can break the MCP connection during the FastAPI lifecycle.Example
mcp_tools_example.py
Refreshing the connection to MCP servers is not automatically handled. You can use
refresh_connection to manually refresh a connection.