feat(cli): mcpjam projects commands for hosted projects#2592
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
7347237 to
cb104c6
Compare
5daadd6 to
afe8f4b
Compare
Internal previewPreview URL: https://mcp-inspector-pr-2592.up.railway.app |
Add the cloud command group on top of the shared platform operations: mcpjam cloud projects list mcpjam cloud servers list --project <id-or-name> mcpjam cloud servers status --project <id-or-name> status runs the same show_servers operation the MCP worker exposes — project resolution by id/name/latest, one hosted doctor call per server — so all surfaces report identical statuses. JSON output is the operation payload verbatim for scripting; human output renders aligned tables, per-server status lines with details, and a summary. Exit code stays 0 for unreachable servers: it is a status report, not an assertion. Credentials follow the established precedence (--api-key > MCPJAM_API_KEY > stored login). https://claude.ai/code/session_011awqJ5nNBHYGdN9qKF7CNy
afe8f4b to
bd47013
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (3)
WalkthroughThis PR adds a projects command suite to the MCPJam CLI for querying hosted projects and their servers. It extends 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. Comment |
Propagate the global timeout into hosted cloud operations so slow platform calls abort consistently. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0ec481f. Configure here.
…cts page through verbatim The command-level deadline in runCloudCommand arms its AbortController with a PlatformApiError(TIMEOUT), but depending on the fetch implementation the rejection can be a bare AbortError that maps to INTERNAL_ERROR. When our controller fired, throw its armed reason — covered by a test where each request stays under the per-request budget but the overall deadline trips mid-operation (Bugbot). cloud projects list now emits the operation payload verbatim in JSON mode, preserving pagination fields like nextCursor, matching the sibling commands and the MCP tool (Bugbot). https://claude.ai/code/session_011awqJ5nNBHYGdN9qKF7CNy
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cli/src/commands/cloud.ts`:
- Around line 40-61: The catch currently loses the custom timeout reason because
fetch throws a generic AbortError; update the catch in the function wrapping
execute/buildPlatformClient to inspect controller.signal.reason and, if it is a
PlatformApiError (or has code "TIMEOUT"), pass that structured error into
toCliError/throw instead of the generic caught error—i.e., check
controller.signal?.reason (and its instance/type or code), use that as the error
to convert with toCliError, otherwise fall back to toCliError(error); reference
the existing symbols controller, controller.signal.reason, PlatformApiError,
toCliError, execute, and buildPlatformClient to locate where to apply this
change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2bb347d6-98bb-498e-b245-4cd656e9dd4c
📒 Files selected for processing (3)
cli/src/commands/cloud.tscli/src/lib/platform-client.tscli/tests/cloud.test.ts
mcpjam cloud projects list -> mcpjam projects list mcpjam cloud servers list/status -> mcpjam projects servers / status "projects" carries the hosted-platform context on its own and avoids the near-collision with the local `mcpjam server` group that a top-level `servers` would create. Internal helpers renamed cloud->platform to match platform-client/platform-auth. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Summary
PR 3 of 3 (depends on #2589 and #2591 — based on the #2591 branch).
Adds the
mcpjam projectscommand group, connecting the CLI to hosted MCPJam projects via the shared platform operations from #2589 and the credentials from #2591:statusruns the sameshow_serversoperation the MCP worker exposes — project resolution by id/name/most-recent, one hosted doctor call per server at concurrency 3 — so the widget, the MCP tool, and the CLI report identical statuses from one implementation.✓/✗/-/!) with details and primitive counts, a summary line, and other-project hints.summaryfrom the JSON payload.--api-key>MCPJAM_API_KEY> storedmcpjam loginsession; unknown/ambiguous--projectsurfaces the operation's actionableNOT_FOUNDmessage (with the available-project list) as the CLI error.projects(notcloud) — "projects" only exist on the platform so the word carries the hosted context by itself, and a top-levelserversgroup would near-collide with the localmcpjam servercommands.Testing
cli/tests/projects.test.ts— in-process fixture serving/projects,/projects/:id/servers, and per-server/doctor(ready / OAUTH_REQUIRED envelope / 429 + Retry-After): JSON and human output for all three commands, bearer forwarding, project-by-name resolution, NOT_FOUND mapping, and the full status matrix (reachable/reachable (OAuth)/error (rate-limited, Retry after 7s)/skipped (stdio)) with summary counts.Full CLI suite green: 233 tests,
tsc --noEmitclean.Changeset:
@mcpjam/climinor.https://claude.ai/code/session_011awqJ5nNBHYGdN9qKF7CNy
Generated by Claude Code