MCPcopy Create free account
hub / github.com/github/gh-aw / configureMCPStdioContainer

Function configureMCPStdioContainer

pkg/parser/mcp.go:525–539  ·  view source on GitHub ↗
(toolName, containerStr string, mcpConfig map[string]any, config *RegistryMCPServerConfig)

Source from the content-addressed store, hash-verified

523}
524
525func 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
541func configureMCPStdioCommand(toolName string, mcpConfig map[string]any, config *RegistryMCPServerConfig) error {
542 command, hasCommand := mcpConfig["command"]

Callers 1

parseMCPStdioTypeConfigFunction · 0.85

Calls 4

appendContainerEnvFunction · 0.85
appendContainerMountsFunction · 0.85
appendBuiltinArgsFunction · 0.85
PrintfMethod · 0.45

Tested by

no test coverage detected