(toolName, containerStr string, mcpConfig map[string]any, config *RegistryMCPServerConfig)
| 523 | } |
| 524 | |
| 525 | func configureMCPStdioContainer(toolName, containerStr string, mcpConfig map[string]any, config *RegistryMCPServerConfig) { |
| 526 | mcpLog.Printf("Tool %s uses container: %s", toolName, containerStr) |
| 527 | config.Container = containerStr |
| 528 | config.Command = "docker" |
| 529 | config.Args = []string{"run", "--rm", "-i"} |
| 530 | |
| 531 | appendContainerEnv(config, mcpConfig["env"]) |
| 532 | appendContainerMounts(config, mcpConfig["mounts"]) |
| 533 | if entrypointStr, ok := mcpConfig["entrypoint"].(string); ok { |
| 534 | config.Entrypoint = entrypointStr |
| 535 | config.Args = append(config.Args, "--entrypoint", entrypointStr) |
| 536 | } |
| 537 | config.Args = append(config.Args, containerStr) |
| 538 | appendBuiltinArgs(config, mcpConfig["entrypointArgs"]) |
| 539 | } |
| 540 | |
| 541 | func configureMCPStdioCommand(toolName string, mcpConfig map[string]any, config *RegistryMCPServerConfig) error { |
| 542 | command, hasCommand := mcpConfig["command"] |
no test coverage detected