@awesomate/hosting-mcp 0.7.1 → 0.7.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
CHANGED
|
@@ -14,14 +14,24 @@ which redeems a setup code for a scoped access token (stored at
|
|
|
14
14
|
(Support Plus+), and registers this server. The **`awesomate-hosting` skill**
|
|
15
15
|
(bundled under `skill/`) makes Claude plan-aware and enforces snapshot-before-change.
|
|
16
16
|
|
|
17
|
-
Manual registration
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
Manual registration — add to `~/.claude.json` under `mcpServers` (the
|
|
18
|
+
bootstrap does this automatically; never bake `AWESOMATE_PAT` into the env,
|
|
19
|
+
that pins the registration to one stale account forever):
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
"awesomate-hosting": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "--package=@awesomate/hosting-mcp", "awesomate-hosting-mcp"]
|
|
25
|
+
}
|
|
21
26
|
```
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
If you use `claude mcp add` instead, keep the `--package=` form — the claude
|
|
29
|
+
CLI pre-scans the whole argv for its own global `-p`/`--print` flag (even
|
|
30
|
+
after `--`), so a bare `-p <pkg>` breaks its option parsing.
|
|
31
|
+
|
|
32
|
+
Account resolution: `AWESOMATE_PAT` env → `AWESOMATE_ACCOUNT` env →
|
|
33
|
+
`.awesomate.json` folder pin → sole/default profile in
|
|
34
|
+
`~/.awesomate/credentials.json` (multi-account since 0.7.0).
|
|
25
35
|
|
|
26
36
|
## Tools (v0.1 — read-only)
|
|
27
37
|
|
package/package.json
CHANGED
|
@@ -215,7 +215,9 @@ Git skills drive the Git workflow; this skill just deploys the result.
|
|
|
215
215
|
effort) generates an SSH keypair and registers the public key. If the SSH
|
|
216
216
|
step fails (e.g. hosting not fully provisioned), the token + skill + MCP are
|
|
217
217
|
still set up. The Connect-Claude-Code prompt from the hub runs this via
|
|
218
|
-
`npx -
|
|
218
|
+
`npx -y --package=@awesomate/hosting-mcp awesomate-hosting-bootstrap`.
|
|
219
|
+
(Always the `--package=` form — a bare `-p` breaks the claude CLI's argv
|
|
220
|
+
pre-scan if the command is ever wrapped in `claude mcp add`.)
|
|
219
221
|
- `ssh-connect.sh` — open a jailed SSH session (or run one remote command).
|
|
220
222
|
- `wp.sh` — run a WP-CLI command against a live site over that SSH.
|
|
221
223
|
- `deploy.sh` — snapshot-first Studio→live deploy (files, optional DB).
|
|
@@ -287,9 +287,16 @@ function installSkill() {
|
|
|
287
287
|
return true;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
+
// --package= (with the =) instead of -p: the claude CLI pre-scans the FULL
|
|
291
|
+
// argv for its own global -p/--print flag — even after the `--` separator —
|
|
292
|
+
// so any `claude mcp add … -- npx -y -p pkg bin` flips it into print mode and
|
|
293
|
+
// it rejects the scope flag as "unknown option" (marlins bug report,
|
|
294
|
+
// 2026-07-28). npx treats both forms identically at runtime; the = form keeps
|
|
295
|
+
// the value glued to the token so these args are safe to copy anywhere.
|
|
296
|
+
// The explicit package must stay: this package ships two bins.
|
|
290
297
|
const CLEAN_ENTRY = {
|
|
291
298
|
command: 'npx',
|
|
292
|
-
args: ['-y', '
|
|
299
|
+
args: ['-y', '--package=@awesomate/hosting-mcp', 'awesomate-hosting-mcp'],
|
|
293
300
|
};
|
|
294
301
|
const MANUAL_ADD_JSON = JSON.stringify({ mcpServers: { 'awesomate-hosting': CLEAN_ENTRY } }, null, 2);
|
|
295
302
|
|
|
@@ -349,7 +356,15 @@ function ensureMcpRegistration() {
|
|
|
349
356
|
}
|
|
350
357
|
}
|
|
351
358
|
|
|
352
|
-
if (changed)
|
|
359
|
+
if (changed) {
|
|
360
|
+
writeJsonFile(claudeJsonPath, cfg);
|
|
361
|
+
// Read back and verify — never trust a write (or a CLI exit code) alone.
|
|
362
|
+
const verify = readJsonFile(claudeJsonPath);
|
|
363
|
+
const written = verify?.mcpServers?.['awesomate-hosting'];
|
|
364
|
+
if (!written || written.command !== CLEAN_ENTRY.command || !JSON.stringify(written.args ?? []).includes('awesomate-hosting-mcp')) {
|
|
365
|
+
throw new Error(`wrote ${claudeJsonPath} but the awesomate-hosting entry did not verify on read-back`);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
353
368
|
|
|
354
369
|
// Project-scope .mcp.json in cwd.
|
|
355
370
|
const mcpJsonPath = join(cwd, '.mcp.json');
|