2929
3030
3131@click .group (context_settings = CONTEXT_SETTINGS , invoke_without_command = True )
32- @click .option (
33- "-h" , "--help" , "help_flag" , is_flag = True , help = "Show this message and exit."
34- )
32+ @click .option ("-h" , "--help" , "help_flag" , is_flag = True , help = "Show this message and exit." )
3533@click .version_option (version = __version__ )
3634@click .pass_context
3735def main (ctx , help_flag ):
@@ -45,9 +43,7 @@ def main(ctx, help_flag):
4543 active_client = config_manager .get_active_client ()
4644 if not active_client :
4745 console .print ("[bold red]Error:[/] No active client set." )
48- console .print (
49- "Please run 'mcpm client <client-name>' to set an active client."
50- )
46+ console .print ("Please run 'mcpm client <client-name>' to set an active client." )
5147 console .print ("Available clients:" )
5248
5349 # Show available clients
@@ -100,28 +96,16 @@ def main(ctx, help_flag):
10096
10197 # Display active client information and main help
10298 if active_client :
103- client_status = (
104- "[green]✓[/]"
105- if installed_clients .get (active_client , False )
106- else "[yellow]⚠[/]"
107- )
108- console .print (
109- f"[bold magenta]Active client:[/] [yellow]{ active_client } [/] { client_status } "
110- )
99+ client_status = "[green]✓[/]" if installed_clients .get (active_client , False ) else "[yellow]⚠[/]"
100+ console .print (f"[bold magenta]Active client:[/] [yellow]{ active_client } [/] { client_status } " )
111101 else :
112- console .print (
113- "[bold red]No active client set![/] Please run 'mcpm client <client-name>' to set one."
114- )
102+ console .print ("[bold red]No active client set![/] Please run 'mcpm client <client-name>' to set one." )
115103 console .print ("" )
116104
117105 # Display usage info
118- console .print (
119- "[bold green]Usage:[/] [white]mcpm [OPTIONS] COMMAND [ARGS]...[/]"
120- )
106+ console .print ("[bold green]Usage:[/] [white]mcpm [OPTIONS] COMMAND [ARGS]...[/]" )
121107 console .print ("" )
122- console .print (
123- "[bold green]Description:[/] [white]A tool for managing MCP servers across various clients.[/]"
124- )
108+ console .print ("[bold green]Description:[/] [white]A tool for managing MCP servers across various clients.[/]" )
125109 console .print ("" )
126110
127111 # Display options
@@ -133,34 +117,24 @@ def main(ctx, help_flag):
133117 # Display available commands in a table
134118 console .print ("[bold]Commands:[/]" )
135119 commands_table = Table (show_header = False , box = None , padding = (0 , 2 , 0 , 0 ))
136- commands_table .add_row (
137- " [cyan]add[/]" , "Add an MCP server directly to a client."
138- )
120+ commands_table .add_row (" [cyan]add[/]" , "Add an MCP server directly to a client." )
139121 commands_table .add_row (" [cyan]client[/]" , "Manage the active MCPM client." )
140122 commands_table .add_row (" [cyan]config[/]" , "Manage MCPM configuration." )
141123 commands_table .add_row (
142124 " [cyan]edit[/]" ,
143125 "View or edit the active MCPM client's configuration file." ,
144126 )
145- commands_table .add_row (
146- " [cyan]inspector[/]" , "Launch the MCPM Inspector UI to examine servers."
147- )
127+ commands_table .add_row (" [cyan]inspector[/]" , "Launch the MCPM Inspector UI to examine servers." )
148128 commands_table .add_row (" [cyan]list[/]" , "List all installed MCP servers." )
149129 commands_table .add_row (" [cyan]remove[/]" , "Remove an installed MCP server." )
150130 commands_table .add_row (" [cyan]search[/]" , "Search available MCP servers." )
151- commands_table .add_row (
152- " [cyan]stash[/]" , "Temporarily store a server configuration aside."
153- )
154- commands_table .add_row (
155- " [cyan]pop[/]" , "Restore a previously stashed server configuration."
156- )
131+ commands_table .add_row (" [cyan]stash[/]" , "Temporarily store a server configuration aside." )
132+ commands_table .add_row (" [cyan]pop[/]" , "Restore a previously stashed server configuration." )
157133 console .print (commands_table )
158134
159135 # Additional helpful information
160136 console .print ("" )
161- console .print (
162- "[italic]Run [bold]mcpm CLIENT -h[/] for more information on a command.[/]"
163- )
137+ console .print ("[italic]Run [bold]mcpm CLIENT -h[/] for more information on a command.[/]" )
164138
165139
166140# Register commands
0 commit comments