@mcpcloud/cli 0.1.3 → 0.2.0
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 -67
- package/dist/index.js +8329 -365
- 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,47 +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
|
-
|
|
146
|
-
|
|
145
|
+
mcp tools list --project <projectId> [--org <id>]
|
|
146
|
+
mcp tools list --server <serverId> [--org <id>] # looks up the project for you
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
### Skills
|
|
150
150
|
|
|
151
151
|
```sh
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
mcp skills list [--org <id>] [--project <id>] [--limit <n>]
|
|
153
|
+
mcp skills get <skillId> [--org <id>]
|
|
154
154
|
|
|
155
155
|
# Print or apply the MCP configuration that wires a skill into your coding agent.
|
|
156
|
-
|
|
156
|
+
mcp skills connect <skillId>
|
|
157
157
|
[--org <id>]
|
|
158
158
|
[--agent claude-code|codex|claude-desktop|vscode|cursor|windsurf|antigravity]
|
|
159
159
|
[--name <connection-name>]
|
|
@@ -163,9 +163,9 @@ mcpsh skills connect <skillId>
|
|
|
163
163
|
### API keys
|
|
164
164
|
|
|
165
165
|
```sh
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
mcp api-keys list
|
|
167
|
+
mcp api-keys create --name <displayName>
|
|
168
|
+
mcp api-keys revoke <apiKeyId>
|
|
169
169
|
```
|
|
170
170
|
|
|
171
171
|
The secret returned by `api-keys create` is shown **once**. Save it immediately — you cannot retrieve it again.
|
|
@@ -175,20 +175,20 @@ The secret returned by `api-keys create` is shown **once**. Save it immediately
|
|
|
175
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.
|
|
176
176
|
|
|
177
177
|
```sh
|
|
178
|
-
|
|
178
|
+
mcp --json projects list | jq '.projects[].slug'
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
mcp --json skills connect skl_123 --agent cursor \
|
|
181
181
|
| jq '.snippet'
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
## Exit codes
|
|
185
185
|
|
|
186
|
-
| Code | Meaning
|
|
187
|
-
|
|
188
|
-
| `0`
|
|
189
|
-
| `1`
|
|
190
|
-
| `2`
|
|
191
|
-
| `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>`. |
|
|
192
192
|
|
|
193
193
|
When an API call fails, the CLI prints the response code, status, and request id (when present) to make debugging easier:
|
|
194
194
|
|
|
@@ -204,9 +204,9 @@ The CLI stores its config at `~/.mcpcloud/config.json` with mode `0600`. Recogni
|
|
|
204
204
|
|
|
205
205
|
```jsonc
|
|
206
206
|
{
|
|
207
|
-
"apiKey": "mck_...",
|
|
208
|
-
"baseUrl": "https://your-deployment...",
|
|
209
|
-
"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`
|
|
210
210
|
}
|
|
211
211
|
```
|
|
212
212
|
|
|
@@ -221,7 +221,7 @@ You can edit the file directly or replace it. Environment variables take precede
|
|
|
221
221
|
## Development
|
|
222
222
|
|
|
223
223
|
```sh
|
|
224
|
-
git clone https://github.com/
|
|
224
|
+
git clone https://github.com/MCPCloud-sh/mcp-hub
|
|
225
225
|
cd mcp-hub/packages/cli
|
|
226
226
|
|
|
227
227
|
bun install
|
|
@@ -233,10 +233,25 @@ bun run build # bundle to dist/index.js
|
|
|
233
233
|
|
|
234
234
|
The bundled output is a single Node-compatible ESM file with a `#!/usr/bin/env node` shebang.
|
|
235
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
|
+
|
|
236
251
|
## Support
|
|
237
252
|
|
|
238
253
|
- Documentation: https://mcpcloud.sh/docs
|
|
239
|
-
- Issues: https://github.com/
|
|
254
|
+
- Issues: https://github.com/MCPCloud-sh/mcp-hub/issues
|
|
240
255
|
- Email: support@mcpcloud.sh
|
|
241
256
|
|
|
242
257
|
## License
|