(mcpConfig map[string]any, toolName string, config *RegistryMCPServerConfig)
| 508 | } |
| 509 | |
| 510 | func parseMCPStdioTypeConfig(mcpConfig map[string]any, toolName string, config *RegistryMCPServerConfig) error { |
| 511 | if container, hasContainer := mcpConfig["container"]; hasContainer { |
| 512 | if containerStr, ok := container.(string); ok { |
| 513 | configureMCPStdioContainer(toolName, containerStr, mcpConfig, config) |
| 514 | } |
| 515 | } else { |
| 516 | if err := configureMCPStdioCommand(toolName, mcpConfig, config); err != nil { |
| 517 | return err |
| 518 | } |
| 519 | } |
| 520 | copyStringMapFromAny(mcpConfig["env"], config.Env) |
| 521 | appendNetworkProxyArgs(mcpConfig["network"], &config.ProxyArgs) |
| 522 | return nil |
| 523 | } |
| 524 | |
| 525 | func configureMCPStdioContainer(toolName, containerStr string, mcpConfig map[string]any, config *RegistryMCPServerConfig) { |
| 526 | mcpLog.Printf("Tool %s uses container: %s", toolName, containerStr) |
no test coverage detected