From 0550de2093fe1b8caea030ef60fe01c6406fa1aa Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Thu, 6 Nov 2025 12:16:36 -0700 Subject: [PATCH] Added environment variables for agents for the global_tools and mcp_servers settings --- src/config/agent.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/config/agent.rs b/src/config/agent.rs index c77ca43..7ade6f2 100644 --- a/src/config/agent.rs +++ b/src/config/agent.rs @@ -530,6 +530,16 @@ impl AgentConfig { if let Some(v) = read_env_value::(&with_prefix("top_p")) { self.top_p = v; } + if let Ok(v) = env::var(with_prefix("global_tools")) { + if let Ok(v) = serde_json::from_str(&v) { + self.global_tools = v; + } + } + if let Ok(v) = env::var(with_prefix("mcp_servers")) { + if let Ok(v) = serde_json::from_str(&v) { + self.mcp_servers = v; + } + } if let Some(v) = read_env_value::(&with_prefix("agent_session")) { self.agent_session = v; }