detectFromMCPConfigs scans MCP server configurations for runtime commands
(tools *ToolsConfig, requirements map[string]*RuntimeRequirement)
| 192 | |
| 193 | // detectFromMCPConfigs scans MCP server configurations for runtime commands |
| 194 | func detectFromMCPConfigs(tools *ToolsConfig, requirements map[string]*RuntimeRequirement) { |
| 195 | if tools == nil { |
| 196 | return |
| 197 | } |
| 198 | |
| 199 | allTools := tools.ToMap() |
| 200 | workflowLog.Printf("Scanning %d MCP configurations for runtime commands", len(allTools)) |
| 201 | |
| 202 | // Scan custom MCP tools for runtime commands |
| 203 | // Skip containerized MCP servers as they don't need host runtime setup |
| 204 | for _, tool := range tools.Custom { |
| 205 | // Skip if the MCP server is containerized (has Container field set or Type is "docker") |
| 206 | if tool.Container != "" || tool.Type == "docker" { |
| 207 | runtimeSetupLog.Printf("Skipping runtime detection for containerized MCP server (container=%s, type=%s)", tool.Container, tool.Type) |
| 208 | continue |
| 209 | } |
| 210 | |
| 211 | // For non-containerized custom MCP servers, check the Command field |
| 212 | if tool.Command != "" { |
| 213 | if runtime, found := commandToRuntime[tool.Command]; found { |
| 214 | updateRequiredRuntime(runtime, "", requirements) |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | // detectFromMCPScripts scans mcp-scripts tool definitions for language runtimes. |
| 222 | func detectFromMCPScripts(mcpScripts *MCPScriptsConfig, requirements map[string]*RuntimeRequirement) { |