fix: no banner when run profile in stdio mode - #251
Conversation
WalkthroughThe stdio execution path in run_profile_fastmcp now calls proxy.run_stdio_async(show_banner=False), aligning with a public API change that adds an optional show_banner parameter (default True) to mcpm.fastmcp_integration.proxy.run_stdio_async. Other execution paths and behavior remain unchanged. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as Profile Runner
participant Proxy as FastMCP Proxy
participant Stdio as Stdio Server
User->>CLI: run_profile_fastmcp(...)
alt stdio mode
CLI->>Proxy: run_stdio_async(show_banner=false)
note right of Proxy: Suppress startup banner
Proxy->>Stdio: Initialize and run loop
Stdio-->>Proxy: IO events
Proxy-->>CLI: Completion/Status
else http/sse modes
CLI->>Proxy: start_http()/start_sse()
Proxy-->>CLI: Running servers
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a UI/UX issue by suppressing the FastMCP banner when running profiles in stdio mode to prevent unnecessary output that could interfere with stdio communication.
- Adds
show_banner=Falseparameter toproxy.run_stdio_async()call in stdio mode
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/mcpm/commands/profile/run.py (2)
112-116: Consider also hiding the banner in HTTP/SSE for consistency with run command UX.In src/mcpm/commands/run.py, run_http_async is called with show_banner=False. Doing the same here keeps the profile-run UX consistent and avoids duplicate banners alongside the Rich panel.
transport = "sse" if sse_mode else "http" - await proxy.run_http_async( - host=host, port=actual_port, transport=transport, uvicorn_config={"log_level": get_uvicorn_log_level()} - ) + await proxy.run_http_async( + host=host, + port=actual_port, + show_banner=False, + transport=transport, + uvicorn_config={"log_level": get_uvicorn_log_level()}, + )
45-70: Optional: Add a unit test to assert the stdio path disables the banner.A lightweight test can monkeypatch create_mcpm_proxy to a stub whose run_stdio_async records kwargs, then invoke run_profile_fastmcp in stdio mode and assert show_banner is False. This guards against regressions.
If helpful, I can draft a pytest using monkeypatch to simulate the proxy and event loop without running real IO.
Also applies to: 118-121
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/mcpm/commands/profile/run.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
Always format Python code with
ruff.
Files:
src/mcpm/commands/profile/run.py
🧬 Code graph analysis (1)
src/mcpm/commands/profile/run.py (2)
src/mcpm/commands/run.py (2)
run_server_with_fastmcp(35-110)run(139-216)src/mcpm/fastmcp_integration/proxy.py (1)
create_proxy_for_profile(130-146)
🔇 Additional comments (1)
src/mcpm/commands/profile/run.py (1)
118-121: Unable to confirmshow_bannersupport in FastMCP’srun_stdio_asyncI wasn’t able to locate a local definition of
run_stdio_asyncorrun_http_asyncin ourmcpm/fastmcp_integration/proxy.py; these methods are provided by the external FastMCP library. Please manually verify that in the FastMCP version we depend on, both:
FastMCP.run_stdio_async(show_banner: bool)FastMCP.run_http_async(show_banner: bool)actually accept a
show_bannerparameter and suppress the banner when set toFalse. If confirmed, suppressing the banner here is correct and matches the behavior insrc/mcpm/commands/run.py.Locations passing
show_banner=False:
- src/mcpm/commands/run.py line 92
- src/mcpm/commands/profile/run.py line 120
Once you’ve confirmed against FastMCP’s public API or source, this change can be approved.
|
Summary Review
Nice quality-of-life improvement! |
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
## [2.7.1](v2.7.0...v2.7.1) (2025-09-04) ### Bug Fixes * no banner when run profile in stdio mode ([#251](#251)) ([7e243fc](7e243fc))
|
🎉 This PR is included in version 2.7.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
User description
do not show fastmcp banner when running profile in stdio mode
Resolves #243
PR Type
Bug fix
Description
Diagram Walkthrough
File Walkthrough
run.py
Disable banner for stdio mode executionsrc/mcpm/commands/profile/run.py
show_banner=Falseparameter torun_stdio_async()callSummary by CodeRabbit