(mcpConfig map[string]any, toolName string, config *RegistryMCPServerConfig)
| 497 | } |
| 498 | |
| 499 | func parseMCPRegistryValue(mcpConfig map[string]any, toolName string, config *RegistryMCPServerConfig) error { |
| 500 | if registry, hasRegistry := mcpConfig["registry"]; hasRegistry { |
| 501 | registryStr, ok := registry.(string) |
| 502 | if !ok { |
| 503 | return fmt.Errorf("registry field must be a string, got %T. Example:\nmcp-servers:\n %s:\n registry: \"https://registry.npmjs.org/@my/tool\"\n command: \"npx @my/tool\"", registry, toolName) |
| 504 | } |
| 505 | config.Registry = registryStr |
| 506 | } |
| 507 | return nil |
| 508 | } |
| 509 | |
| 510 | func parseMCPStdioTypeConfig(mcpConfig map[string]any, toolName string, config *RegistryMCPServerConfig) error { |
| 511 | if container, hasContainer := mcpConfig["container"]; hasContainer { |
no test coverage detected