enable_mcp_server=True when creating your AgentOS instance:
Why use MCP?
The MCP protocol has become the industry standard to handle connecting AI applications with external tools and data sources. By exposing your AgentOS as an MCP server, external clients that can handle MCP-compatible applications will be able to connect to your AgentOS and interact with it.Example
enable_mcp_example.py
/mcp endpoint.
You can see a complete example here.
Available MCP Tools
When you expose your AgentOS as an MCP server, the following MCP tools will be available:get_agentos_config
Get the configuration of the AgentOS
run_agent
Run the desired Agent
agent_id(str): The ID of the agent to runmessage(str): The message to send to the agent
run_team
Run the desired Team
team_id(str): The ID of the team to runmessage(str): The message to send to the team
run_workflow
Run the desired Workflow
workflow_id(str): The ID of the workflow to runmessage(str): The message to send to the workflow
get_sessions_for_agent
Get the list of sessions for the desired Agent
agent_id(str): The ID of the agent to get the sessions fordb_id(str): The ID of the database to useuser_id(Optional[str]): The ID of the user to get the sessions forsort_by(Optional[str]): The field to sort the sessions by. Defaults tocreated_atsort_order(Optional[str]): The order to sort the sessions by. Defaults todesc
get_sessions_for_team
Get the list of sessions for the desired Team
team_id(str): The ID of the team to get the sessions fordb_id(str): The ID of the database to useuser_id(Optional[str]): The ID of the user to get the sessions forsort_by(Optional[str]): The field to sort the sessions by. Defaults tocreated_atsort_order(Optional[str]): The order to sort the sessions by. Defaults todesc
get_sessions_for_workflow
Get the list of sessions for the desired Workflow
workflow_id(str): The ID of the workflow to get the sessions fordb_id(str): The ID of the database to useuser_id(Optional[str]): The ID of the user to get the sessions forsort_by(Optional[str]): The field to sort the sessions by. Defaults tocreated_atsort_order(Optional[str]): The order to sort the sessions by. Defaults todesc
create_memory
Create a new user memory
db_id(str): The ID of the database to usememory(str): The memory content to storeuser_id(str): The user this memory is abouttopics(Optional[list[str]]): The topics of the memory
get_memories_for_user
Get the list of memories for the given user
user_id(str): The ID of the user to get the memories fordb_id(Optional[str]): The ID of the database to usesort_by(Optional[str]): The field to sort the memories by. Defaults tocreated_atsort_order(Optional[str]): The order to sort the memories by. Defaults todesc
update_memory
Update the desired memory
db_id(str): The ID of the database to usememory_id(str): The ID of the memory to updatememory(str): The memory content to storeuser_id(str): The ID of the user to update the memory for
delete_memory
Delete the desired memory
db_id(str): The ID of the database to usememory_id(str): The ID of the memory to delete