Skip to content

Commit 53ed4ef

Browse files
fix: print server config when edit (#45)
* fix: print server config when edit * feat: group the cli commands display
1 parent 124cb93 commit 53ed4ef

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

src/mcpm/cli.py

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
pop,
1818
profile,
1919
remove,
20+
router,
2021
search,
2122
stash,
2223
transfer,
23-
router,
2424
)
2525

2626
console = Console()
@@ -120,26 +120,39 @@ def main(ctx, help_flag):
120120
# Display available commands in a table
121121
console.print("[bold]Commands:[/]")
122122
commands_table = Table(show_header=False, box=None, padding=(0, 2, 0, 0))
123-
commands_table.add_row(" [cyan]add[/]", "Add an MCP server directly to a client.")
123+
commands_table.add_row("[yellow]client[/]")
124124
commands_table.add_row(" [cyan]client[/]", "Manage the active MCPM client.")
125-
commands_table.add_row(" [cyan]config[/]", "Manage MCPM configuration.")
126-
commands_table.add_row(" [cyan]inspector[/]", "Launch the MCPM Inspector UI to examine servers.")
127-
commands_table.add_row(" [cyan]list/ls[/]", "List all installed MCP servers.")
128-
commands_table.add_row(" [cyan]remove/rm[/]", "Remove an installed MCP server.")
125+
126+
commands_table.add_row("[yellow]server[/]")
129127
commands_table.add_row(" [cyan]search[/]", "Search available MCP servers.")
128+
commands_table.add_row(" [cyan]add[/]", "Add an MCP server directly to a client.")
129+
commands_table.add_row(" [cyan]cp[/]")
130+
commands_table.add_row(" [cyan]copy[/]", "Copy a server from one client/profile to another.")
131+
commands_table.add_row(" [cyan]mv[/]")
132+
commands_table.add_row(" [cyan]move[/]", "Move a server from one client/profile to another.")
133+
commands_table.add_row(" [cyan]rm[/]")
134+
commands_table.add_row(" [cyan]remove[/]", "Remove an installed MCP server.")
135+
commands_table.add_row(" [cyan]ls[/]")
136+
commands_table.add_row(" [cyan]list[/]", "List all installed MCP servers.")
130137
commands_table.add_row(" [cyan]stash[/]", "Temporarily store a server configuration aside.")
131138
commands_table.add_row(" [cyan]pop[/]", "Restore a previously stashed server configuration.")
139+
140+
commands_table.add_row("[yellow]profile[/]")
132141
commands_table.add_row(" [cyan]profile[/]", "Manage MCPM profiles.")
133-
commands_table.add_row(" [cyan]move/mv[/]", "Move a server from one client/profile to another.")
134-
commands_table.add_row(" [cyan]copy/cp[/]", "Copy a server from one client/profile to another.")
135142
commands_table.add_row(" [cyan]activate[/]", "Activate a profile.")
136143
commands_table.add_row(" [cyan]deactivate[/]", "Deactivate a profile.")
144+
145+
commands_table.add_row("[yellow]router[/]")
137146
commands_table.add_row(" [cyan]router[/]", "Manage MCP router service.")
147+
148+
commands_table.add_row("[yellow]util[/]")
149+
commands_table.add_row(" [cyan]config[/]", "Manage MCPM configuration.")
150+
commands_table.add_row(" [cyan]inspector[/]", "Launch the MCPM Inspector UI to examine servers.")
138151
console.print(commands_table)
139152

140153
# Additional helpful information
141154
console.print("")
142-
console.print("[italic]Run [bold]mcpm CLIENT -h[/] for more information on a command.[/]")
155+
console.print("[italic]Run [bold]mcpm -h[/] for more information on a command.[/]")
143156

144157

145158
# Register commands

src/mcpm/commands/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def edit_client():
196196
if server_count > 0:
197197
console.print("\n[bold]MCP Server Details:[/]")
198198
for server_name, server_config in config_json.get("mcpServers", {}).items():
199-
print_server_config(server_name, server_config)
199+
print_server_config(client_manager.from_client_format(server_name, server_config))
200200

201201
except json.JSONDecodeError:
202202
console.print("[yellow]Warning: Config file contains invalid JSON[/]")

0 commit comments

Comments
 (0)