-
Notifications
You must be signed in to change notification settings - Fork 13
Labels
help-wantedExtra attention is neededExtra attention is neededtype:enhancementNew feature or requestNew feature or requesttype:refactoringCode cleanup and refactoring tasksCode cleanup and refactoring tasks
Milestone
Description
Enhance the mcp:config
command to support multiple MCP clients (Claude Desktop, Codecs, Cursor, etc.) by adding an interactive client selection flow and generating client-specific configurations.
Problem Statement
Currently, mcp:config
assumes users are working with Claude Desktop and generates configuration specifically for it. As the MCP ecosystem grows with clients like Codecs, Cursor, and others, users need a way to generate appropriate configurations for their specific client.
Current Behavior
ctx mcp:config
# Always generates Claude Desktop configuration
Desired Behavior
ctx mcp:config
# Prompts: "Which MCP client are you using?"
# Options: Claude Desktop, Codecs, Cursor, Generic
# Generates client-specific configuration
Proposed Solution
Interactive Client Selection
Add a client selection step at the beginning of the configuration flow:
- User runs
ctx mcp:config
orctx mcp:config --interactive
- Command prompts: "Which MCP client are you using?"
- Display menu with supported clients:
- Claude Desktop (default)
- Codecs
- Cursor
- Generic (for other/custom clients)
- Generate client-specific configuration based on selection
Command Options
Add new --client
option to specify client explicitly:
ctx mcp:config --client=claude # Claude Desktop
ctx mcp:config --client=codecs # Codecs
ctx mcp:config --client=cursor # Cursor
ctx mcp:config --client=generic # Generic MCP configuration
Enhanced Interactive Mode
Update the interactive flow to include client selection:
Current Flow:
- Detect OS
- Ask about project path
- Ask about global registry
- Generate config
Proposed Flow:
- Ask which MCP client to use
- Detect OS
- Ask about project path
- Ask about global registry
- Generate client-specific config
Detailed Requirements
Functional Requirements
- Client Selection Menu: Interactive prompt showing all supported clients
- Client-Specific Configuration: Generate appropriate config format for each client
- Backward Compatibility: Running
ctx mcp:config
without flags should maintain current behavior (default to Claude Desktop) - Explicit Client Option:
--client
flag to skip interactive selection - Client Detection: Optionally detect installed clients and highlight them in the menu
- Setup Instructions:
--explain
flag should show client-specific setup instructions
Technical Requirements
- Extensibility: Easy to add new clients without modifying core logic
- Cross-Platform: Support Linux, macOS, Windows (with/without WSL)
- Validation: Verify client-specific requirements before generating config
- Error Handling: Clear messages when client is not supported on current platform
User Experience Examples
Example 1: Interactive Mode with Client Selection (by default)
$ ctx mcp:config
? Which MCP client are you using?
❯ Claude Desktop (detected)
Codecs
Cursor
Generic (for other clients)
? Use global project registry? (Y/n) y
Configuration generated for Claude Desktop (Linux):
{
"mcpServers": {
"ctx": {
"command": "ctx",
"args": ["server"]
}
}
}
✓ Copy this configuration to: ~/.config/Claude/claude_desktop_config.json
Example 2: Explicit Client Selection
$ ctx mcp:config --client=cursor -c /path/to/project
Configuration generated for Cursor:
[Client-specific configuration format]
✓ Copy this configuration to: [Cursor config location]
Example 3: Generic Client
$ ctx mcp:config --client=generic --global
Generic MCP Configuration:
{
"mcpServers": {
"ctx": {
"command": "ctx",
"args": ["server"]
}
}
}
ℹ This is a generic configuration. Consult your MCP client's documentation
for the correct configuration file location and format.
Implementation Considerations
Architecture
The implementation should follow these principles:
- Registry Pattern: Manage multiple client implementations through a registry
- Strategy Pattern: Each client implements its own config generation strategy
- Extensibility: Adding new clients should require minimal changes to existing code
- Separation of Concerns: Keep client-specific logic isolated
File Structure Suggestion
src/Console/Mcp/
├── ConfigCommand.php (enhanced)
├── Client/
│ ├── ClientRegistry.php
│ ├── ClientInterface.php
│ ├── AbstractClient.php
│ ├── ClaudeDesktopClient.php
│ ├── CodecsClient.php (new)
│ ├── CursorClient.php (new)
│ └── GenericClient.php (new)
└── Config/
├── ConfigGenerator.php
└── ConfigTemplate.php
Metadata
Metadata
Assignees
Labels
help-wantedExtra attention is neededExtra attention is neededtype:enhancementNew feature or requestNew feature or requesttype:refactoringCode cleanup and refactoring tasksCode cleanup and refactoring tasks
Type
Projects
Status
Done