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

Function parseMCPStdioTypeConfig

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

Source from the content-addressed store, hash-verified

508}
509
510func 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
525func configureMCPStdioContainer(toolName, containerStr string, mcpConfig map[string]any, config *RegistryMCPServerConfig) {
526 mcpLog.Printf("Tool %s uses container: %s", toolName, containerStr)

Callers 1

ParseMCPConfigFunction · 0.85

Calls 4

configureMCPStdioCommandFunction · 0.85
copyStringMapFromAnyFunction · 0.85
appendNetworkProxyArgsFunction · 0.85

Tested by

no test coverage detected