Skip to content

Commit 0f89493

Browse files
committed
Not used anymore
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent 59a855d commit 0f89493

3 files changed

Lines changed: 1 addition & 13 deletions

File tree

pkg/secrets/gather.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ package secrets
33
import (
44
"context"
55
"fmt"
6-
"os"
76
"sort"
87

98
"github.com/docker/cagent/pkg/config"
109
latest "github.com/docker/cagent/pkg/config/v2"
1110
"github.com/docker/cagent/pkg/environment"
1211
"github.com/docker/cagent/pkg/gateway"
1312
"github.com/docker/cagent/pkg/model/provider"
14-
"github.com/docker/cagent/pkg/tools/mcp"
1513
)
1614

1715
// GatherMissingEnvVars finds out which environment variables are required by the models and tools.
@@ -80,10 +78,6 @@ func GatherEnvVarsForTools(ctx context.Context, cfg *latest.Config) ([]string, e
8078

8179
for _, ref := range gatherMCPServerReferences(cfg) {
8280
mcpServerName := gateway.ParseServerRef(ref)
83-
if mcpServerURL := os.Getenv(mcp.ENV_DOCKER_MCP_URL_PREFIX + mcpServerName); mcpServerURL != "" {
84-
// This MCP server is configured at runtime to be remote. We don't need to know its secrets.
85-
continue
86-
}
8781

8882
secrets, err := gateway.RequiredEnvVars(ctx, mcpServerName, gateway.DockerCatalogURL)
8983
if err != nil {

pkg/teamloader/teamloader.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,7 @@ func getToolsForAgent(ctx context.Context, a *latest.AgentConfig, parentDir stri
305305

306306
case toolset.Type == "mcp" && toolset.Ref != "":
307307
mcpServerName := gateway.ParseServerRef(toolset.Ref)
308-
if mcpServerURL := os.Getenv(mcp.ENV_DOCKER_MCP_URL_PREFIX + mcpServerName); mcpServerURL != "" {
309-
t = append(t, mcp.NewToolsetCommand("socat", []string{"STDIO", fmt.Sprintf("TCP:mcp-%s:4444", mcpServerName)}, nil, toolset.Tools))
310-
} else {
311-
t = append(t, mcp.NewGatewayToolset(mcpServerName, toolset.Config, toolset.Tools, envProvider))
312-
}
308+
t = append(t, mcp.NewGatewayToolset(mcpServerName, toolset.Config, toolset.Tools, envProvider))
313309

314310
case toolset.Type == "mcp" && toolset.Command != "":
315311
t = append(t, mcp.NewToolsetCommand(toolset.Command, toolset.Args, env, toolset.Tools))

pkg/tools/mcp/gateway.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import (
1616
"github.com/docker/cagent/pkg/tools"
1717
)
1818

19-
const ENV_DOCKER_MCP_URL_PREFIX = "DOCKER_MCP_URL_"
20-
2119
type GatewayToolset struct {
2220
mcpServerName string
2321
config any

0 commit comments

Comments
 (0)