88from rich .panel import Panel
99
1010from mcpm .utils .config import ConfigManager
11+ from mcpm .utils .client_registry import ClientRegistry
1112
1213console = Console ()
1314config_manager = ConfigManager ()
@@ -27,15 +28,15 @@ def client(client_name, list):
2728 mcpm client claude-desktop # Set Claude Desktop as the active client
2829 """
2930 # Get the list of supported clients
30- supported_clients = config_manager .get_supported_clients ()
31+ supported_clients = ClientRegistry .get_supported_clients ()
3132
3233 # List all supported clients if requested
3334 if list :
3435 table = Table (title = "Supported MCP Clients" )
3536 table .add_column ("Client Name" , style = "cyan" )
3637 table .add_column ("Status" , style = "green" )
3738
38- active_client = config_manager .get_active_client ()
39+ active_client = ClientRegistry .get_active_client ()
3940
4041 for client in sorted (supported_clients ):
4142 status = "[bold green]ACTIVE[/]" if client == active_client else ""
@@ -46,7 +47,7 @@ def client(client_name, list):
4647
4748 # If no client name specified, show the current active client
4849 if not client_name :
49- active_client = config_manager .get_active_client ()
50+ active_client = ClientRegistry .get_active_client ()
5051 console .print (f"Current active client: [bold cyan]{ active_client } [/]" )
5152
5253 # Display some helpful information about setting clients
@@ -67,12 +68,12 @@ def client(client_name, list):
6768 return
6869
6970 # Set the active client
70- if client_name == config_manager .get_active_client ():
71+ if client_name == ClientRegistry .get_active_client ():
7172 console .print (f"[bold yellow]Note:[/] { client_name } is already the active client" )
7273 return
7374
7475 # Attempt to set the active client
75- success = config_manager .set_active_client (client_name )
76+ success = ClientRegistry .set_active_client (client_name )
7677 if success :
7778 console .print (f"[bold green]Success:[/] Active client set to { client_name } " )
7879
0 commit comments