setupMCP loads mcp.json (if present) and connects each configured server. progress receives per-server lifecycle events the caller can pipe into the TUI loading indicator. Errors connecting individual servers are logged but never fatal.
(ctx context.Context, progress mcp.ProgressFunc)
| 410 | // the TUI loading indicator. Errors connecting individual servers are |
| 411 | // logged but never fatal. |
| 412 | func setupMCP(ctx context.Context, progress mcp.ProgressFunc) []*mcp.Client { |
| 413 | cfg, err := mcp.LoadConfig("mcp.json") |
| 414 | if err != nil { |
| 415 | fmt.Fprintf(os.Stderr, "mcp: config error: %v\n", err) |
| 416 | return nil |
| 417 | } |
| 418 | return mcp.Register(ctx, cfg, tool.Default, progress) |
| 419 | } |
| 420 | |
| 421 | // registerSubagents wires up every subagent the harness exposes. |
| 422 | func registerSubagents(llm provider.Provider) { |
no test coverage detected