@mcpcloud/cli 0.1.2 → 0.2.0-next-20260525195652
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -66
- package/dist/index.js +8547 -565
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -5,14 +5,14 @@ The official command-line interface for [MCPCloud](https://mcpcloud.sh) — mana
|
|
|
5
5
|
```sh
|
|
6
6
|
npm install -g @mcpcloud/cli
|
|
7
7
|
export MCPCLOUD_BASE_URL=https://your-deployment.example.com # ask your admin
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
mcp login
|
|
9
|
+
mcp whoami
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
> **Note**
|
|
13
|
-
> MCPCloud is in private beta. The CLI does **not** ship with a default API base URL — set `MCPCLOUD_BASE_URL` (or `
|
|
13
|
+
> MCPCloud is in private beta. The CLI does **not** ship with a default API base URL — set `MCPCLOUD_BASE_URL` (or `mcp config set-url <url>`) using the URL provided by your MCPCloud admin. A built-in default will be added when the platform launches publicly.
|
|
14
14
|
|
|
15
|
-
The package installs
|
|
15
|
+
The package installs three equivalent binaries: `mcp` (primary), `mcpsh`, and `mcpcloud`. They all point at the same executable — use whichever you prefer.
|
|
16
16
|
|
|
17
17
|
## Requirements
|
|
18
18
|
|
|
@@ -44,10 +44,10 @@ The CLI does not assume any default base URL. Use whichever method fits your env
|
|
|
44
44
|
export MCPCLOUD_BASE_URL=https://your-deployment.example.com
|
|
45
45
|
|
|
46
46
|
# persist for your user account (writes to ~/.mcpcloud/config.json)
|
|
47
|
-
|
|
47
|
+
mcp config set-url https://your-deployment.example.com
|
|
48
48
|
|
|
49
49
|
# one-off override
|
|
50
|
-
|
|
50
|
+
mcp --base-url https://your-deployment.example.com whoami
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
The lookup order is: `--base-url` flag → `MCPCLOUD_BASE_URL` env var → saved `baseUrl` in `~/.mcpcloud/config.json`. If none are set the CLI exits with code `3` and a clear message.
|
|
@@ -56,50 +56,50 @@ The lookup order is: `--base-url` flag → `MCPCLOUD_BASE_URL` env var → saved
|
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
58
|
# Save a key to ~/.mcpcloud/config.json (mode 0600)
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
mcp login # interactive prompt (recommended)
|
|
60
|
+
mcp login --key mck_xxx # non-interactive (avoid: writes to shell history)
|
|
61
61
|
|
|
62
62
|
# Or use an environment variable (recommended for CI)
|
|
63
63
|
export MCPCLOUD_API_KEY=mck_xxx
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
`
|
|
66
|
+
`mcp logout` removes the saved key. `mcp config show` prints the current resolved config (with the API key redacted).
|
|
67
67
|
|
|
68
68
|
## Quick start
|
|
69
69
|
|
|
70
70
|
```sh
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
mcp whoami # show current key + organizations
|
|
72
|
+
mcp projects list # list projects in your default org
|
|
73
|
+
mcp servers list # list MCP servers
|
|
74
|
+
mcp servers get srv_123 # detail view
|
|
75
|
+
mcp servers logs srv_123 # recent deployment events
|
|
76
|
+
mcp tools list srv_123 # tools exposed by a server
|
|
77
|
+
mcp skills list # list skills
|
|
78
|
+
mcp skills connect skl_123 --agent claude-code --apply
|
|
79
79
|
# auto-register a skill with Claude Code
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
mcp api-keys list # personal API keys
|
|
81
|
+
mcp api-keys create --name CI # mint a new key (secret shown once)
|
|
82
|
+
mcp api-keys revoke key_456
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Run `
|
|
85
|
+
Run `mcp <command> --help` on any command for the full option list.
|
|
86
86
|
|
|
87
87
|
## Global flags
|
|
88
88
|
|
|
89
|
-
| Flag
|
|
90
|
-
|
|
91
|
-
| `--json`
|
|
92
|
-
| `--base-url <url>` | Override the API base URL for one invocation (useful for staging).
|
|
93
|
-
| `-v, --version`
|
|
94
|
-
| `-h, --help`
|
|
89
|
+
| Flag | Description |
|
|
90
|
+
| ------------------ | --------------------------------------------------------------------------------------- |
|
|
91
|
+
| `--json` | Emit raw JSON on stdout. Errors come back as `{ "error": { "code", "message", ... } }`. |
|
|
92
|
+
| `--base-url <url>` | Override the API base URL for one invocation (useful for staging). |
|
|
93
|
+
| `-v, --version` | Print the CLI version. |
|
|
94
|
+
| `-h, --help` | Show help for any command. |
|
|
95
95
|
|
|
96
96
|
## Environment variables
|
|
97
97
|
|
|
98
|
-
| Variable
|
|
99
|
-
|
|
100
|
-
| `MCPCLOUD_API_KEY`
|
|
101
|
-
| `MCPCLOUD_BASE_URL` | API base URL. **Required** — there is no built-in default.
|
|
102
|
-
| `MCPCLOUD_ORG_ID`
|
|
98
|
+
| Variable | Description |
|
|
99
|
+
| ------------------- | ------------------------------------------------------------- |
|
|
100
|
+
| `MCPCLOUD_API_KEY` | API key used for authentication (overrides the saved config). |
|
|
101
|
+
| `MCPCLOUD_BASE_URL` | API base URL. **Required** — there is no built-in default. |
|
|
102
|
+
| `MCPCLOUD_ORG_ID` | Default organization ID for commands that require one. |
|
|
103
103
|
|
|
104
104
|
The organization for each command is resolved in this order:
|
|
105
105
|
|
|
@@ -113,46 +113,47 @@ The organization for each command is resolved in this order:
|
|
|
113
113
|
### Authentication & config
|
|
114
114
|
|
|
115
115
|
```sh
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
116
|
+
mcp login [--key <secret>] # save an API key locally
|
|
117
|
+
mcp logout # remove the saved key
|
|
118
|
+
mcp whoami # show current key, base URL, and accessible orgs
|
|
119
|
+
|
|
120
|
+
mcp config show # print resolved config (key redacted)
|
|
121
|
+
mcp config set-url <url> # persist the API base URL
|
|
122
|
+
mcp config clear-url # remove the saved base URL
|
|
123
|
+
mcp config set-org <orgId> # persist a default organization
|
|
124
|
+
mcp config clear-org # remove the saved default organization
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
### Projects
|
|
128
128
|
|
|
129
129
|
```sh
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
mcp projects list [--org <id>] [--limit <n>]
|
|
131
|
+
mcp projects get <projectId> [--org <id>]
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
### Servers
|
|
135
135
|
|
|
136
136
|
```sh
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
mcp servers list [--org <id>] [--project <id>] [--limit <n>]
|
|
138
|
+
mcp servers get <serverId> [--org <id>]
|
|
139
|
+
mcp servers logs <serverId> [--org <id>] [--limit <n>]
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
### Tools
|
|
143
143
|
|
|
144
144
|
```sh
|
|
145
|
-
|
|
145
|
+
mcp tools list --project <projectId> [--org <id>]
|
|
146
|
+
mcp tools list --server <serverId> [--org <id>] # looks up the project for you
|
|
146
147
|
```
|
|
147
148
|
|
|
148
149
|
### Skills
|
|
149
150
|
|
|
150
151
|
```sh
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
mcp skills list [--org <id>] [--project <id>] [--limit <n>]
|
|
153
|
+
mcp skills get <skillId> [--org <id>]
|
|
153
154
|
|
|
154
155
|
# Print or apply the MCP configuration that wires a skill into your coding agent.
|
|
155
|
-
|
|
156
|
+
mcp skills connect <skillId>
|
|
156
157
|
[--org <id>]
|
|
157
158
|
[--agent claude-code|codex|claude-desktop|vscode|cursor|windsurf|antigravity]
|
|
158
159
|
[--name <connection-name>]
|
|
@@ -162,9 +163,9 @@ mcpsh skills connect <skillId>
|
|
|
162
163
|
### API keys
|
|
163
164
|
|
|
164
165
|
```sh
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
mcp api-keys list
|
|
167
|
+
mcp api-keys create --name <displayName>
|
|
168
|
+
mcp api-keys revoke <apiKeyId>
|
|
168
169
|
```
|
|
169
170
|
|
|
170
171
|
The secret returned by `api-keys create` is shown **once**. Save it immediately — you cannot retrieve it again.
|
|
@@ -174,20 +175,20 @@ The secret returned by `api-keys create` is shown **once**. Save it immediately
|
|
|
174
175
|
Every command supports `--json` for piping into another tool. In JSON mode the CLI emits a single JSON document on success and a `{ "error": { ... } }` envelope on failure. No human-readable text is mixed in.
|
|
175
176
|
|
|
176
177
|
```sh
|
|
177
|
-
|
|
178
|
+
mcp --json projects list | jq '.projects[].slug'
|
|
178
179
|
|
|
179
|
-
|
|
180
|
+
mcp --json skills connect skl_123 --agent cursor \
|
|
180
181
|
| jq '.snippet'
|
|
181
182
|
```
|
|
182
183
|
|
|
183
184
|
## Exit codes
|
|
184
185
|
|
|
185
|
-
| Code | Meaning
|
|
186
|
-
|
|
187
|
-
| `0`
|
|
188
|
-
| `1`
|
|
189
|
-
| `2`
|
|
190
|
-
| `3`
|
|
186
|
+
| Code | Meaning |
|
|
187
|
+
| ---- | ---------------------------------------------------------------------------------------- |
|
|
188
|
+
| `0` | Success. |
|
|
189
|
+
| `1` | Generic failure (API error, validation error, network error). |
|
|
190
|
+
| `2` | No API key configured. Run `mcp login` or set `MCPCLOUD_API_KEY`. |
|
|
191
|
+
| `3` | No API base URL configured. Set `MCPCLOUD_BASE_URL` or run `mcp config set-url <url>`. |
|
|
191
192
|
|
|
192
193
|
When an API call fails, the CLI prints the response code, status, and request id (when present) to make debugging easier:
|
|
193
194
|
|
|
@@ -203,9 +204,9 @@ The CLI stores its config at `~/.mcpcloud/config.json` with mode `0600`. Recogni
|
|
|
203
204
|
|
|
204
205
|
```jsonc
|
|
205
206
|
{
|
|
206
|
-
"apiKey": "mck_...",
|
|
207
|
-
"baseUrl": "https://your-deployment...",
|
|
208
|
-
"defaultOrganizationId": "org_..."
|
|
207
|
+
"apiKey": "mck_...", // saved by `mcp login`
|
|
208
|
+
"baseUrl": "https://your-deployment...", // saved by `mcp config set-url`
|
|
209
|
+
"defaultOrganizationId": "org_...", // saved by `mcp config set-org`
|
|
209
210
|
}
|
|
210
211
|
```
|
|
211
212
|
|
|
@@ -220,7 +221,7 @@ You can edit the file directly or replace it. Environment variables take precede
|
|
|
220
221
|
## Development
|
|
221
222
|
|
|
222
223
|
```sh
|
|
223
|
-
git clone https://github.com/
|
|
224
|
+
git clone https://github.com/MCPCloud-sh/mcp-hub
|
|
224
225
|
cd mcp-hub/packages/cli
|
|
225
226
|
|
|
226
227
|
bun install
|
|
@@ -232,10 +233,25 @@ bun run build # bundle to dist/index.js
|
|
|
232
233
|
|
|
233
234
|
The bundled output is a single Node-compatible ESM file with a `#!/usr/bin/env node` shebang.
|
|
234
235
|
|
|
236
|
+
## Releasing
|
|
237
|
+
|
|
238
|
+
The CLI is released independently of the dashboard via [Changesets](https://github.com/changesets/changesets). When you land a PR that changes anything under `packages/cli/src/`, the workflow's `pr-checks` job requires a changeset describing the bump:
|
|
239
|
+
|
|
240
|
+
```sh
|
|
241
|
+
# From the repo root, after staging your CLI changes:
|
|
242
|
+
bunx changeset
|
|
243
|
+
# → pick @mcpcloud/cli, choose patch | minor | major, write a one-line summary.
|
|
244
|
+
# Commit the generated .changeset/<name>.md alongside your code change.
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
On merge to `main`, [`.github/workflows/cli-release.yml`](../../.github/workflows/cli-release.yml) opens (or updates) a "chore(cli): version packages" PR that bumps `packages/cli/package.json`, writes `CHANGELOG.md`, and consumes the pending changesets. Merging that PR publishes to npm (`prepublishOnly` re-runs typecheck + test + build as a gate) and creates a `@mcpcloud/cli@<version>` GitHub Release.
|
|
248
|
+
|
|
249
|
+
A Homebrew distribution (`brew install mcpcloud` via a custom tap with standalone bottles) is tracked separately — see issue tracker.
|
|
250
|
+
|
|
235
251
|
## Support
|
|
236
252
|
|
|
237
253
|
- Documentation: https://mcpcloud.sh/docs
|
|
238
|
-
- Issues: https://github.com/
|
|
254
|
+
- Issues: https://github.com/MCPCloud-sh/mcp-hub/issues
|
|
239
255
|
- Email: support@mcpcloud.sh
|
|
240
256
|
|
|
241
257
|
## License
|