feat(tools): add mcp support
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user