@mcpcloud/cli 0.0.0-next-20260525192206 → 0.1.2
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 +66 -82
- package/dist/index.js +362 -8344
- package/package.json +4 -5
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
|
+
mcpsh login
|
|
9
|
+
mcpsh 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 `mcpsh 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 two equivalent binaries: `mcpsh` (short) and `mcpcloud` (full). 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
|
+
mcpsh config set-url https://your-deployment.example.com
|
|
48
48
|
|
|
49
49
|
# one-off override
|
|
50
|
-
|
|
50
|
+
mcpsh --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
|
+
mcpsh login # interactive prompt (recommended)
|
|
60
|
+
mcpsh 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
|
+
`mcpsh logout` removes the saved key. `mcpsh 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
|
+
mcpsh whoami # show current key + organizations
|
|
72
|
+
mcpsh projects list # list projects in your default org
|
|
73
|
+
mcpsh servers list # list MCP servers
|
|
74
|
+
mcpsh servers get srv_123 # detail view
|
|
75
|
+
mcpsh servers logs srv_123 # recent deployment events
|
|
76
|
+
mcpsh tools list srv_123 # tools exposed by a server
|
|
77
|
+
mcpsh skills list # list skills
|
|
78
|
+
mcpsh skills connect skl_123 --agent claude-code --apply
|
|
79
79
|
# auto-register a skill with Claude Code
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
mcpsh api-keys list # personal API keys
|
|
81
|
+
mcpsh api-keys create --name CI # mint a new key (secret shown once)
|
|
82
|
+
mcpsh api-keys revoke key_456
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Run `
|
|
85
|
+
Run `mcpsh <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,47 +113,46 @@ 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
|
+
mcpsh login [--key <secret>] # save an API key locally
|
|
117
|
+
mcpsh logout # remove the saved key
|
|
118
|
+
mcpsh whoami # show current key, base URL, and accessible orgs
|
|
119
|
+
|
|
120
|
+
mcpsh config show # print resolved config (key redacted)
|
|
121
|
+
mcpsh config set-url <url> # persist the API base URL
|
|
122
|
+
mcpsh config clear-url # remove the saved base URL
|
|
123
|
+
mcpsh config set-org <orgId> # persist a default organization
|
|
124
|
+
mcpsh config clear-org # remove the saved default organization
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
### Projects
|
|
128
128
|
|
|
129
129
|
```sh
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
mcpsh projects list [--org <id>] [--limit <n>]
|
|
131
|
+
mcpsh projects get <projectId> [--org <id>]
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
### Servers
|
|
135
135
|
|
|
136
136
|
```sh
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
mcpsh servers list [--org <id>] [--project <id>] [--limit <n>]
|
|
138
|
+
mcpsh servers get <serverId> [--org <id>]
|
|
139
|
+
mcpsh servers logs <serverId> [--org <id>] [--limit <n>]
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
### Tools
|
|
143
143
|
|
|
144
144
|
```sh
|
|
145
|
-
|
|
146
|
-
mcp tools list --server <serverId> [--org <id>] # looks up the project for you
|
|
145
|
+
mcpsh tools list <serverId> [--org <id>]
|
|
147
146
|
```
|
|
148
147
|
|
|
149
148
|
### Skills
|
|
150
149
|
|
|
151
150
|
```sh
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
mcpsh skills list [--org <id>] [--project <id>] [--limit <n>]
|
|
152
|
+
mcpsh skills get <skillId> [--org <id>]
|
|
154
153
|
|
|
155
154
|
# Print or apply the MCP configuration that wires a skill into your coding agent.
|
|
156
|
-
|
|
155
|
+
mcpsh skills connect <skillId>
|
|
157
156
|
[--org <id>]
|
|
158
157
|
[--agent claude-code|codex|claude-desktop|vscode|cursor|windsurf|antigravity]
|
|
159
158
|
[--name <connection-name>]
|
|
@@ -163,9 +162,9 @@ mcp skills connect <skillId>
|
|
|
163
162
|
### API keys
|
|
164
163
|
|
|
165
164
|
```sh
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
mcpsh api-keys list
|
|
166
|
+
mcpsh api-keys create --name <displayName>
|
|
167
|
+
mcpsh api-keys revoke <apiKeyId>
|
|
169
168
|
```
|
|
170
169
|
|
|
171
170
|
The secret returned by `api-keys create` is shown **once**. Save it immediately — you cannot retrieve it again.
|
|
@@ -175,20 +174,20 @@ The secret returned by `api-keys create` is shown **once**. Save it immediately
|
|
|
175
174
|
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.
|
|
176
175
|
|
|
177
176
|
```sh
|
|
178
|
-
|
|
177
|
+
mcpsh --json projects list | jq '.projects[].slug'
|
|
179
178
|
|
|
180
|
-
|
|
179
|
+
mcpsh --json skills connect skl_123 --agent cursor \
|
|
181
180
|
| jq '.snippet'
|
|
182
181
|
```
|
|
183
182
|
|
|
184
183
|
## Exit codes
|
|
185
184
|
|
|
186
|
-
| Code | Meaning
|
|
187
|
-
|
|
188
|
-
| `0`
|
|
189
|
-
| `1`
|
|
190
|
-
| `2`
|
|
191
|
-
| `3`
|
|
185
|
+
| Code | Meaning |
|
|
186
|
+
|---|---|
|
|
187
|
+
| `0` | Success. |
|
|
188
|
+
| `1` | Generic failure (API error, validation error, network error). |
|
|
189
|
+
| `2` | No API key configured. Run `mcpsh login` or set `MCPCLOUD_API_KEY`. |
|
|
190
|
+
| `3` | No API base URL configured. Set `MCPCLOUD_BASE_URL` or run `mcpsh config set-url <url>`. |
|
|
192
191
|
|
|
193
192
|
When an API call fails, the CLI prints the response code, status, and request id (when present) to make debugging easier:
|
|
194
193
|
|
|
@@ -204,9 +203,9 @@ The CLI stores its config at `~/.mcpcloud/config.json` with mode `0600`. Recogni
|
|
|
204
203
|
|
|
205
204
|
```jsonc
|
|
206
205
|
{
|
|
207
|
-
"apiKey": "mck_...",
|
|
208
|
-
"baseUrl": "https://your-deployment...",
|
|
209
|
-
"defaultOrganizationId": "org_..."
|
|
206
|
+
"apiKey": "mck_...", // saved by `mcpsh login`
|
|
207
|
+
"baseUrl": "https://your-deployment...", // saved by `mcpsh config set-url`
|
|
208
|
+
"defaultOrganizationId": "org_..." // saved by `mcpsh config set-org`
|
|
210
209
|
}
|
|
211
210
|
```
|
|
212
211
|
|
|
@@ -221,7 +220,7 @@ You can edit the file directly or replace it. Environment variables take precede
|
|
|
221
220
|
## Development
|
|
222
221
|
|
|
223
222
|
```sh
|
|
224
|
-
git clone https://github.com/
|
|
223
|
+
git clone https://github.com/your-org/mcp-hub
|
|
225
224
|
cd mcp-hub/packages/cli
|
|
226
225
|
|
|
227
226
|
bun install
|
|
@@ -233,25 +232,10 @@ bun run build # bundle to dist/index.js
|
|
|
233
232
|
|
|
234
233
|
The bundled output is a single Node-compatible ESM file with a `#!/usr/bin/env node` shebang.
|
|
235
234
|
|
|
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
|
-
|
|
251
235
|
## Support
|
|
252
236
|
|
|
253
237
|
- Documentation: https://mcpcloud.sh/docs
|
|
254
|
-
- Issues: https://github.com/
|
|
238
|
+
- Issues: https://github.com/your-org/mcp-hub/issues
|
|
255
239
|
- Email: support@mcpcloud.sh
|
|
256
240
|
|
|
257
241
|
## License
|