| 28 | } |
| 29 | |
| 30 | func (c McpServerConfig) IsStdio() bool { return c.Command != nil } |
| 31 | func (c McpServerConfig) IsHTTP() bool { return c.URL != nil } |
| 32 | |
| 33 | func (c McpServerConfig) Validate() []string { |
| 34 | var warnings []string |
| 35 | if c.Command == nil && c.URL == nil { |
| 36 | warnings = append(warnings, "MCP server '"+c.Name+"': missing 'command' or 'url' — server will be skipped.") |
| 37 | } |
| 38 | if c.Command != nil && c.URL != nil { |
| 39 | warnings = append(warnings, "MCP server '"+c.Name+"': both 'command' and 'url' set — using 'command' (stdio).") |
| 40 | } |
| 41 | return warnings |
| 42 | } |