-
Notifications
You must be signed in to change notification settings - Fork 54
Closed as not planned
Labels
Description
Objective
Enhance the gh aw mcp inspect command with interactive server selection using Huh forms, improving user experience when working with multiple MCP servers.
Context
Issue #14013 identified that while Huh forms are used in 8 CLI files, several commands like mcp inspect could benefit from enhanced interactivity. Currently, users must specify servers via command-line flags.
Approach
- Create
selectMCPServer()function inpkg/cli/mcp_inspect.go - Use
huh.NewSelect()with server options - Integrate with existing
console.IsAccessibleMode()for accessibility - Fall back to flag-based selection when
--serveris explicitly provided
Implementation Details
func selectMCPServer(servers []string) (string, error) {
options := make([]huh.Option[string], len(servers))
for i, server := range servers {
options[i] = huh.NewOption(server, server)
}
var selected string
form := huh.NewForm(
huh.NewGroup(
huh.NewSelect[string]().
Title("Which MCP server would you like to inspect?").
Options(options...).
Value(&selected),
),
).WithAccessible(console.IsAccessibleMode())
return selected, form.Run()
}Files to Modify
- Update:
pkg/cli/mcp_inspect.go- Add interactive server selection - Update:
pkg/cli/mcp_inspect_command.go- Wire up interactive mode
Acceptance Criteria
- Interactive server selection when no
--serverflag provided - Accessibility mode support (ACCESSIBLE, NO_COLOR, TERM=dumb)
- TTY detection - skip interactive prompt when output is piped
- Command-line flag takes precedence over interactive prompt
- Tests cover interactive and flag-based selection
Related to Terminal Stylist Analysis: Console Output Patterns in gh-aw #14013
AI generated by Plan Command for #14013
- expires on Feb 8, 2026, 1:01 AM UTC
Reactions are currently unavailable