-
Notifications
You must be signed in to change notification settings - Fork 771
Add cloud open
command to open MCP Agent Cloud portal in browser
#412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: graphite-base/412
Are you sure you want to change the base?
Conversation
cloud open
command to open MCP Agent Cloud portal in browser
This stack of pull requests is managed by Graphite. Learn more about stacking. |
The cloud portal is limited to just the api keys page for MVP so I don't think we want this command atm |
ac44aad
to
f3f0b8f
Compare
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ 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 (
|
f3f0b8f
to
40f9ee6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revisit this once the portal UI is implemented post-MVP
if server: | ||
if server.startswith("http"): | ||
# If it's a URL, try to extract server ID | ||
url = f"{base_url}/deployments/{server.split('/')[-1]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation has a potential issue with trailing slashes in URLs. If server
ends with a slash, server.split('/')[-1]
will return an empty string, resulting in an invalid URL like https://mcp-agent.com/deployments/
.
Consider handling trailing slashes explicitly:
url = f"{base_url}/deployments/{server.rstrip('/').split('/')[-1]}"
This ensures that even URLs ending with a slash will have their server ID correctly extracted.
url = f"{base_url}/deployments/{server.split('/')[-1]}" | |
url = f"{base_url}/deployments/{server.rstrip('/').split('/')[-1]}" |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
521eca9
to
157867e
Compare
Summary
Added a new mcp cloud open command that opens the MCP Agent Cloud portal in a web browser. This command can either open the main dashboard or a specific deployment details page when provided with a server ID or URL.
Changelist
Added a new open_portal function that opens the MCP Agent Cloud portal in a browser
Integrated the command into the CLI structure under the cloud namespace
Created necessary module structure with proper imports and Bazel build configuration
Refactored URL constants to use a base URL for both web portal and API endpoints
Test Plan