feat(tools): add mcp support

This commit is contained in:
Sergio Sánchez Vallés
2026-02-12 10:01:30 +01:00
parent 554ba81473
commit e89afe61f1
8 changed files with 146 additions and 11 deletions

View File

@@ -329,6 +329,7 @@ def gateway(
cron_service=cron,
restrict_to_workspace=config.tools.restrict_to_workspace,
session_manager=session_manager,
mcp_servers=config.tools.mcp_servers,
)
# Set cron callback (needs agent)
@@ -431,6 +432,7 @@ def agent(
brave_api_key=config.tools.web.search.api_key or None,
exec_config=config.tools.exec,
restrict_to_workspace=config.tools.restrict_to_workspace,
mcp_servers=config.tools.mcp_servers,
)
# Show spinner when logs are off (no output to miss); skip when logs are on
@@ -447,6 +449,7 @@ def agent(
with _thinking_ctx():
response = await agent_loop.process_direct(message, session_id)
_print_agent_response(response, render_markdown=markdown)
await agent_loop._close_mcp()
asyncio.run(run_once())
else: