Change summary
internal/llm/agent/mcp-tools.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Detailed changes
@@ -10,6 +10,7 @@ import (
"log/slog"
"maps"
"net/http"
+ "os"
"os/exec"
"strings"
"sync"
@@ -415,7 +416,7 @@ func createMCPTransport(ctx context.Context, m config.MCPConfig, resolver config
return nil, fmt.Errorf("mcp stdio config requires a non-empty 'command' field")
}
cmd := exec.CommandContext(ctx, home.Long(command), m.Args...)
- cmd.Env = m.ResolvedEnv()
+ cmd.Env = append(os.Environ(), m.ResolvedEnv()...)
return &mcp.CommandTransport{
Command: cmd,
}, nil