Skip to content

Commit 38d54d5

Browse files
niechenclaude
andcommitted
Improve CLI help system and command descriptions
- Update main CLI description to be more direct about MCPM capabilities - Improve client and profile command descriptions with specific examples - Add consistent grey-purple footer to all commands for GitHub issues - Remove header/footer from subcommands while keeping for main CLI help - Implement custom help handling for main command with proper header/footer display - Remove duplicate information and streamline footer messaging - Use Text objects instead of markup strings to fix rendering issues Key improvements: - Main CLI: Centralized MCP server management with clear value proposition - Client command: Explains MCP clients and supported applications - Profile command: Describes workflow organization with concrete examples - Consistent support footer across all commands with proper styling - Clean main command help with ASCII art header and minimal footer 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 13792d9 commit 38d54d5

File tree

4 files changed

+55
-23
lines changed

4 files changed

+55
-23
lines changed

src/mcpm/cli.py

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
from mcpm.commands.share import share
2828
from mcpm.migration import V1ConfigDetector, V1ToV2Migrator
2929
from mcpm.utils.logging_config import setup_logging
30-
from mcpm.utils.rich_click_config import click
30+
from mcpm.utils.rich_click_config import click, get_header_text, get_footer_text
3131

3232
console = Console()
3333
client_config_manager = ClientConfigManager()
3434

3535
# Setup Rich logging early - this runs when the module is imported
3636
setup_logging()
3737

38-
# Let rich-click handle help display
39-
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
38+
# Custom context settings to handle main command help specially
39+
CONTEXT_SETTINGS = dict(help_option_names=[])
4040

4141

4242
def print_logo():
@@ -129,18 +129,32 @@ def wrapper(*args, **kwargs):
129129
context_settings=CONTEXT_SETTINGS,
130130
invoke_without_command=True,
131131
help="""
132-
A simplified tool for managing MCP servers in a global configuration.
133-
Install servers, organize them with profiles, and run them directly.
132+
Centralized MCP server management - discover, install, run, and share servers.
133+
134+
Manage servers globally, organize with profiles, monitor usage, and integrate
135+
with all MCP clients.
134136
""",
135137
)
136138
@click.option("-v", "--version", is_flag=True, help="Show version and exit.")
139+
@click.option("-h", "--help", "help_flag", is_flag=True, help="Show this message and exit.")
137140
@click.pass_context
138141
@handle_exceptions
139-
def main(ctx, version):
142+
def main(ctx, version, help_flag):
140143
"""Main entry point for MCPM CLI."""
141144
if version:
142145
print_logo()
143146
return
147+
148+
if help_flag:
149+
# Show custom help with header and footer for main command only
150+
console.print(get_header_text())
151+
# Temporarily disable global footer to avoid duplication
152+
original_footer = click.rich_click.FOOTER_TEXT
153+
click.rich_click.FOOTER_TEXT = None
154+
click.echo(ctx.get_help())
155+
click.rich_click.FOOTER_TEXT = original_footer
156+
console.print(get_footer_text())
157+
return
144158

145159
# Check for v1 configuration and offer migration (even with subcommands)
146160
detector = V1ConfigDetector()
@@ -155,9 +169,15 @@ def main(ctx, version):
155169
# Continue to execute the subcommand
156170
# If "ignore", continue to subcommand without migration
157171

158-
# If no command was invoked, show help
172+
# If no command was invoked, show help with header and footer
159173
if ctx.invoked_subcommand is None:
174+
console.print(get_header_text())
175+
# Temporarily disable global footer to avoid duplication
176+
original_footer = click.rich_click.FOOTER_TEXT
177+
click.rich_click.FOOTER_TEXT = None
160178
click.echo(ctx.get_help())
179+
click.rich_click.FOOTER_TEXT = original_footer
180+
console.print(get_footer_text())
161181

162182

163183
# Register v2.0 commands

src/mcpm/commands/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525

2626
@click.group(context_settings=dict(help_option_names=["-h", "--help"]))
2727
def client():
28-
"""Manage MCP client configurations and MCPM server integrations.
28+
"""Manage MCP client configurations (Claude Desktop, Cursor, Windsurf, etc.).
2929
30-
Commands for listing clients, managing which MCPM servers are enabled
31-
in specific MCP client configurations, and importing server configurations
32-
from clients into MCPM.
30+
MCP clients are applications that can connect to MCP servers. This command helps you
31+
view installed clients, edit their configurations to enable/disable MCPM servers,
32+
and import existing server configurations into MCPM's global configuration.
33+
34+
Supported clients: Claude Desktop, Cursor, Windsurf, Continue, Zed, and more.
3335
3436
Examples:
3537

src/mcpm/commands/profile/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
@click.group()
1515
@click.help_option("-h", "--help")
1616
def profile():
17-
"""Manage MCPM profiles."""
17+
"""Manage MCPM profiles - collections of servers for different workflows.
18+
19+
Profiles are named groups of MCP servers that work together for specific tasks or
20+
projects. They allow you to organize servers by purpose (e.g., 'web-dev', 'data-analysis')
21+
and run multiple related servers simultaneously through FastMCP proxy aggregation.
22+
23+
Examples: 'frontend' profile with browser + github servers, 'research' with filesystem + web tools."""
1824
pass
1925

2026

src/mcpm/utils/rich_click_config.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,21 @@
6363
header_text.append(" by Path Integral Institute", style="#FED2E2")
6464

6565
footer_text = Text()
66-
footer_text.append("\n")
67-
footer_text.append("◈ Feedback and Support:", style="#8F87F1 bold")
68-
footer_text.append("\n ")
69-
footer_text.append("🐛 Report a bug:", style="#C68EFD bold")
70-
footer_text.append(" https://github.com/pathintegral-institute/mcpm.sh/issues", style="#E9A5F1")
71-
footer_text.append("\n ")
72-
footer_text.append("💬 Join discussion:", style="#E9A5F1 bold")
73-
footer_text.append(" https://github.com/pathintegral-institute/mcpm.sh/discussions", style="#FED2E2")
74-
75-
click.rich_click.HEADER_TEXT = header_text
76-
click.rich_click.FOOTER_TEXT = footer_text
66+
footer_text.append("")
67+
68+
# Export header and footer for use in main command
69+
def get_header_text():
70+
return header_text
71+
72+
def get_footer_text():
73+
return footer_text
74+
75+
# Add subtle footer to all commands using Text object to avoid literal markup
76+
global_footer_text = Text()
77+
global_footer_text.append("💬 Report bugs or request features: ", style="#8B7DB8")
78+
global_footer_text.append("https://github.com/pathintegral-institute/mcpm.sh/issues", style="#8B7DB8")
79+
80+
click.rich_click.FOOTER_TEXT = global_footer_text
7781

7882
# Enable custom formatting
7983
click.rich_click.GROUP_ARGUMENTS_OPTIONS = True

0 commit comments

Comments
 (0)