Skip to content

Conversation

@LittleCoinCoin
Copy link
Member

Two major feature cycles improving MCP configuration UX:

Cycle 1: Partial Configuration Updates

  • Update specific fields without re-entering entire config: Server existence detection, conditional validation (create requires command/url, update doesn't), and smart merge logic that preserves unspecified fields
  • Smart field preservation and command↔URL auto-switching: When switching between command-based and URL-based configs, opposite field types automatically clear (e.g., command→url clears command/args)
  • Enhanced reporting: UNCHANGED field detection for better user feedback
  • Commits: 2ec188e, 0746c7c, 76cae67

Cycle 2: Configuration Parameter Fixes (6 Issues)

  • Claude Desktop validation + args string splitting: Added host-specific transport validation to prevent runtime failures; implemented shlex.split() for proper handling of quoted arguments with spaces
  • Type field clearing + Gemini dual-transport: Automatic type field clearing during transport switching in partial updates; Gemini now supports both SSE (--url) and HTTP (--http-url) configurations
  • Parameter naming standardization: Renamed --headers--header and --inputs--input for CLI consistency (internal Pydantic fields remain unchanged)
  • Commits: b259a37, 3c67a92, d39eedf, 99027e8, 9cc2027, fb459a7, 625c4ce, c4a8a86

⚠️ Breaking Changes

CLI parameters renamed:

  • --headers--header
  • --inputs--input

LittleCoinCoin added 14 commits October 29, 2025 09:13
The LLM-coding-agent instructions are organization-wide material so they can be found in the appropriate git repo.
- Add 15 focused tests for MCP server partial configuration feature
- Tests cover server existence detection, partial update validation, field preservation, command/URL switching, integration workflows, and backward compatibility
- All tests follow Wobble framework standards with @regression_test and @integration_test decorators
- Test file: tests/test_mcp_cli_partial_updates.py (750 lines)
- 100% pass rate (15/15 tests passing)
- Add get_server_config() method to MCPHostConfigurationManager
- Enables detection of existing server configurations for partial update support
- Returns Optional[MCPServerConfig] - None if server doesn't exist
- Graceful error handling with debug-level logging
- Reuses existing host_registry and strategy pattern infrastructure
- Supports all MCP hosts (claude-desktop, cursor, vs-code, gemini)
- Add server existence check before validation in handle_mcp_configure()
- Implement conditional validation: create requires command/url, update does not
- Add partial update merge logic that preserves unspecified fields
- Implement command/URL switching behavior with auto-clear of opposite field type
- When switching command→url: clear command and args
- When switching url→command: clear url and headers
- Fix headers condition to allow updates without requiring url parameter
- Pass old_config to reporting system for UNCHANGED field detection
- Dynamically set operation type ('update' vs 'create') based on server existence
- Maintains backward compatibility with existing create operations
Prevent Claude Desktop from accepting remote server configurations (--url)
that will fail at runtime. Add CLI-level validation to reject --url for
Claude Desktop and Claude Code hosts.

Fixes: Issue 2 - Claude Desktop accepts --url but fails at runtime
Add shlex.split() processing to handle quoted strings in --args parameter.
Enables users to pass complex arguments like '-r --name aName' as a single
quoted string that gets properly split into individual arguments.

Handles edge cases:
- Empty strings are filtered out
- Invalid quotes trigger warning but don't fail
- Multiple quoted strings are all processed

Fixes: Issue 4 - --args string splitting for quoted arguments
Fix partial update bug where type field is not cleared when switching
between command-based and URL-based server configurations. Ensure type
field is updated to match the new transport configuration.

When switching from command to URL: type changes from 'stdio' to 'sse'
When switching from URL to command: type changes from 'sse' to 'stdio'

Includes 2 new tests validating type field updates and 2 modified tests
adding type field assertions to existing switching tests.

Fixes: Issue 1 - Type field not updated during transport switching
Add comprehensive validation for Gemini's dual-transport capability supporting
both SSE (with 'url' field) and HTTP (with 'httpUrl' field) transports.

Key changes:
- Override parent transport validator in MCPServerConfigGemini
- Validate mutual exclusion of 'url' and 'httpUrl' fields
- Support type inference from transport fields
- Add 3 comprehensive validation tests

Gemini now supports:
- stdio transport with 'command' field
- sse transport with 'url' field
- http transport with 'httpUrl' field

Fixes: Issue 3 - Gemini dual-transport validation
Merge branch 'fix/mcp-validation-enhancements' into feat/mcp-host-partial-config

Wave 2 Implementation Summary:
- Issue 1: Type field clearing during transport switching
- Issue 3: Gemini dual-transport validation

Commits:
- fix(mcp): clear type field during transport switching
- feat(mcp): implement Gemini dual-transport validation

Test Results:
- 81/81 tests passing (100% pass rate)
- 0 regressions
- 5 new/modified tests for Wave 2
Add --http-url to mutually exclusive group with --command and --url,
allowing Gemini users to create servers using only --http-url for HTTP
transport without requiring --url or --command.

Key changes:
- Add --http-url to server_type_group mutually exclusive group
- Update validation to accept http_url as valid transport option
- Update transport switching logic to handle httpUrl field
- Update error messages to mention --http-url option

This completes Issue 3 implementation by allowing Gemini's HTTP transport
to be configured directly via CLI without requiring --url first.

Related: Issue 3 - Gemini dual-transport support
Rename --headers argument to --header to match singular naming
convention used by other parameters. Update all test references
and documentation.

Changes:
- Renamed parse_headers() to parse_header()
- Updated function parameter from headers to header
- Updated argparse argument from --headers to --header
- Updated all test files to use new parameter name
- Maintained Pydantic model field name as 'headers' (internal)

Test Results: 126/128 tests passing (2 pre-existing failures)
Rename --inputs argument to --input to match singular naming
convention used by other parameters. Update all test references.

Changes:
- Renamed parse_inputs() to parse_input()
- Updated function parameter from inputs to input
- Updated argparse argument from --inputs to --input
- Updated all test files to use new parameter name
- Maintained Pydantic model field name as 'inputs' (internal)

Test Results: 126/128 tests passing (2 pre-existing failures)
Update CLIReference.md and MCPHostConfiguration.md to reflect
renamed parameters:
- --headers → --header
- --inputs → --input

Changes:
- Updated syntax examples in CLIReference.md
- Updated parameter table in CLIReference.md
- Updated configuration type descriptions in MCPHostConfiguration.md
- Updated example commands to use new parameter names
Laghari is the conventional name in the organization for the design documents and LLM coding agent outputs.
@LittleCoinCoin LittleCoinCoin force-pushed the feat/mcp-host-partial-config branch from 0cdeb3a to fd83cd9 Compare October 30, 2025 08:00
@LittleCoinCoin LittleCoinCoin merged commit d5f6da9 into dev Oct 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants