Objective
Eliminate the duplicate MCPServerConfig type definition by using parser.MCPServerConfig as the single source of truth.
Context
MCPServerConfig is defined in two locations:
pkg/cli/mcp_gateway_command.go:30 - Simplified subset (5 fields)
pkg/parser/mcp.go:81 - Complete definition (13 fields)
The CLI version is a subset of the parser version. All fields use omitempty, so the CLI can safely use the full parser type and ignore unused fields.
Approach
- Remove
MCPServerConfig definition from pkg/cli/mcp_gateway_command.go
- Add import for
github.com/githubnext/gh-aw/pkg/parser in CLI files
- Update all CLI references to use
parser.MCPServerConfig
- Verify that CLI code works correctly with the extended type (unused fields are ignored)
- Run tests to ensure no regression
Files to Modify
pkg/cli/mcp_gateway_command.go - Remove duplicate type, import parser package, update references
- Any other files in
pkg/cli/ that reference MCPServerConfig
Acceptance Criteria
Estimated Effort
1-2 hours
Related to #7369
AI generated by Plan Command for discussion #7368