@vibetocloud/mcp 1.0.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/dist/index.js +59798 -0
- package/package.json +28 -0
- package/skills/.claude-plugin/marketplace.json +15 -0
- package/skills/.claude-plugin/plugin.json +11 -0
- package/skills/README.md +47 -0
- package/skills/skills/vibetocloud-debug/SKILL.md +98 -0
- package/skills/skills/vibetocloud-deploy/SKILL.md +141 -0
- package/skills/skills/vibetocloud-onboard/SKILL.md +417 -0
- package/skills/skills/vibetocloud-platform-logs/SKILL.md +51 -0
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vibetocloud/mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Claude Code MCP server and skills for deploying applications on vibetocloud",
|
|
5
|
+
"bin": {
|
|
6
|
+
"vibetocloud-mcp": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/",
|
|
10
|
+
"skills/"
|
|
11
|
+
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
17
|
+
"esbuild": "^0.28.0",
|
|
18
|
+
"express": "^4.21.2",
|
|
19
|
+
"@vibetocloud/shared": "1.0.0"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"dev": "pnpm -w exec tsx apps/mcp-server/src/index.ts",
|
|
23
|
+
"dev:http": "pnpm -w exec tsx apps/mcp-server/src/index.ts http",
|
|
24
|
+
"build": "pnpm -w exec nest build mcp-server && node scripts/generate-mcp-json.mjs",
|
|
25
|
+
"build:npm": "node apps/mcp-server/scripts/bundle.mjs",
|
|
26
|
+
"lint": "pnpm -w exec eslint apps/mcp-server libs/shared"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vibetocloud",
|
|
3
|
+
"description": "vibetocloud platform skills for Claude Code",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "vibetocloud"
|
|
6
|
+
},
|
|
7
|
+
"plugins": [
|
|
8
|
+
{
|
|
9
|
+
"name": "vibetocloud",
|
|
10
|
+
"description": "Deploy and debug applications on the vibetocloud platform from Claude Code.",
|
|
11
|
+
"version": "1.0.0",
|
|
12
|
+
"source": "./"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
package/skills/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Vibetocloud Claude Code Plugin
|
|
2
|
+
|
|
3
|
+
Claude Code skills for deploying and debugging applications on the vibetocloud platform.
|
|
4
|
+
|
|
5
|
+
## Skills
|
|
6
|
+
|
|
7
|
+
| Command | Purpose |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `/vibetocloud-onboard` | Authenticate, set up git remote, scaffold docker-compose.yml, configure secrets, and push code |
|
|
10
|
+
| `/vibetocloud-deploy` | Push latest code, trigger a deployment, and poll until done |
|
|
11
|
+
| `/vibetocloud-debug` | Inspect running services and tail logs |
|
|
12
|
+
| `/vibetocloud-platform-logs` | Open an SSH tunnel to the platform host and view Grafana logs |
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
Run this once to install the plugin (MCP server + skills):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @vibetocloud/mcp setup
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then restart Claude Code. The slash commands and vibetocloud tools will be available in any project.
|
|
23
|
+
|
|
24
|
+
The plugin manifest declares the MCP server, so a single `claude plugin install` registers everything. To remove it all again:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
claude plugin uninstall vibetocloud
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Typical workflow
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
# First time: onboard your project
|
|
34
|
+
/vibetocloud-onboard
|
|
35
|
+
|
|
36
|
+
# Every time you want to deploy
|
|
37
|
+
/vibetocloud-deploy
|
|
38
|
+
|
|
39
|
+
# When something breaks
|
|
40
|
+
/vibetocloud-debug
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## State
|
|
44
|
+
|
|
45
|
+
Skills share state via `.vibetocloud/config.json` in your project root. This file is added to `.gitignore` automatically by the onboard skill — it contains your session token and should never be committed.
|
|
46
|
+
|
|
47
|
+
To re-authenticate or switch environments, run `/vibetocloud-onboard` again.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vibetocloud-debug
|
|
3
|
+
description: Inspect running services and tail logs to diagnose issues on vibetocloud.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vibetocloud Debug
|
|
7
|
+
|
|
8
|
+
Announce at start: "I'm using vibetocloud-debug to inspect your application."
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Step 1 — Load config
|
|
13
|
+
|
|
14
|
+
Read `.vibetocloud/config.json` using the Read tool.
|
|
15
|
+
|
|
16
|
+
If the file does not exist or any of `token`, `appId`, `orgId` are empty, stop and tell the user:
|
|
17
|
+
"Run `/vibetocloud-onboard` first to set up your project."
|
|
18
|
+
|
|
19
|
+
Verify the token is still valid by calling `org_authenticate` with:
|
|
20
|
+
```json
|
|
21
|
+
{ "token": "<token>" }
|
|
22
|
+
```
|
|
23
|
+
If it fails, tell the user: "Your session has expired. Run `/vibetocloud-onboard` to sign in again."
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 2 — Service overview
|
|
28
|
+
|
|
29
|
+
Call `app_services_list` with:
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"token": "<token>",
|
|
33
|
+
"applicationId": "<appId>",
|
|
34
|
+
"environment": "<environment>"
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Display the result as a table:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Service Status CPU Memory Uptime
|
|
42
|
+
──────────────────────────────────────────────────
|
|
43
|
+
api running 2.1% 128 MB 2h 14m
|
|
44
|
+
worker stopped — — —
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If no services are returned, tell the user: "No services are running in this environment. Try deploying first with `/vibetocloud-deploy`."
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Step 3 — Select service
|
|
52
|
+
|
|
53
|
+
If there is only one service, proceed with it automatically.
|
|
54
|
+
|
|
55
|
+
If there are multiple services, ask: "Which service would you like to debug? (<list service names>)"
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 4 — Tail logs
|
|
60
|
+
|
|
61
|
+
Call `app_service_tail_logs` with:
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"token": "<token>",
|
|
65
|
+
"applicationId": "<appId>",
|
|
66
|
+
"environment": "<environment>",
|
|
67
|
+
"service": "<selected service name>"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The response contains `{ lines: string[], nextSince: number }`. Display all lines. Note the `nextSince` value.
|
|
72
|
+
|
|
73
|
+
Ask the user: "Continue tailing new lines? (yes / no)"
|
|
74
|
+
|
|
75
|
+
If **yes**: call `app_service_tail_logs` again with the same parameters plus `"since": <nextSince>`. Display any new lines. Update `nextSince`. Repeat until the user says no.
|
|
76
|
+
|
|
77
|
+
If **no**: proceed to Step 5.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Step 5 — Service actions
|
|
82
|
+
|
|
83
|
+
Offer the following options:
|
|
84
|
+
|
|
85
|
+
1. **Restart this service** — call `app_service_restart` with:
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"token": "<token>",
|
|
89
|
+
"applicationId": "<appId>",
|
|
90
|
+
"environment": "<environment>",
|
|
91
|
+
"service": "<selected service name>"
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
After restarting, return to Step 2 to show updated service status.
|
|
95
|
+
|
|
96
|
+
2. **Debug a different service** — return to Step 3.
|
|
97
|
+
|
|
98
|
+
3. **Exit** — done.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vibetocloud-deploy
|
|
3
|
+
description: Push latest code to vibetocloud, trigger a deployment, and poll until success or failure.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vibetocloud Deploy
|
|
7
|
+
|
|
8
|
+
Announce at start: "I'm using vibetocloud-deploy to deploy your application."
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Step 1 — Load config
|
|
13
|
+
|
|
14
|
+
Read `.vibetocloud/config.json` using the Read tool.
|
|
15
|
+
|
|
16
|
+
If the file does not exist or any of `token`, `appId`, `orgId` are empty, stop and tell the user:
|
|
17
|
+
"Run `/vibetocloud-onboard` first to set up your project."
|
|
18
|
+
|
|
19
|
+
**Token freshness check:**
|
|
20
|
+
|
|
21
|
+
Decode the JWT payload to check expiry: split the token by `.`, take the second segment, base64-decode it (pad with `=` to make the length a multiple of 4 if needed), and parse as JSON. Read the `exp` field (Unix timestamp in seconds).
|
|
22
|
+
|
|
23
|
+
If `exp - (Date.now() / 1000) < 3600` (less than 1 hour remaining):
|
|
24
|
+
1. Call `org_refresh_token` with `{ "token": "<current token>" }`.
|
|
25
|
+
2. If successful: update `token` in `.vibetocloud/config.json` with the new token and use it for all subsequent calls.
|
|
26
|
+
3. If it fails: warn the user — "Could not refresh your session token. If API calls fail with an auth error, run `/vibetocloud-onboard` to sign in again."
|
|
27
|
+
|
|
28
|
+
If more than 1 hour remains, or if the token cannot be decoded, proceed without refreshing.
|
|
29
|
+
|
|
30
|
+
Do **not** call `org_authenticate` here. The token will be validated by the first real API call; if it is expired the call will return an error, at which point tell the user: "Your session has expired. Run `/vibetocloud-onboard` to sign in again."
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Step 2 — Confirm environment
|
|
35
|
+
|
|
36
|
+
Use the AskUserQuestion tool with options `["dev", "staging", "production"]` to ask:
|
|
37
|
+
"Which environment would you like to deploy to?" (pre-select the value from config).
|
|
38
|
+
|
|
39
|
+
If the selected environment differs from config, update `environment` in `.vibetocloud/config.json`.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Step 3 — Push latest code
|
|
44
|
+
|
|
45
|
+
Get the current branch:
|
|
46
|
+
```bash
|
|
47
|
+
git rev-parse --abbrev-ref HEAD
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Push to the platform remote (use `remote` from config, defaulting to `origin` if the field is empty):
|
|
51
|
+
```bash
|
|
52
|
+
git push <remote> <current branch>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If the push fails, report the error and stop — do not trigger a deploy with stale code.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 4 — Trigger deployment
|
|
60
|
+
|
|
61
|
+
Call `org_deploy` with:
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"token": "<token>",
|
|
65
|
+
"applicationId": "<appId>",
|
|
66
|
+
"environment": "<environment>",
|
|
67
|
+
"branch": "<current branch>"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The response contains `{ id: "<buildId>", ... }`.
|
|
72
|
+
|
|
73
|
+
Tell the user: "Deployment started (build ID: <buildId>). Polling for status…"
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Step 5 — Poll status
|
|
78
|
+
|
|
79
|
+
Call `org_deploy_status` every 15 seconds with:
|
|
80
|
+
```json
|
|
81
|
+
{ "token": "<token>", "buildId": "<buildId>" }
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The response `data.status` is one of: `pending` | `running` | `success` | `failed` | `cancelled`.
|
|
85
|
+
|
|
86
|
+
Show the `data.message` field from each response so the user sees live step progress.
|
|
87
|
+
|
|
88
|
+
Continue polling until status is `success`, `failed`, or `cancelled`.
|
|
89
|
+
|
|
90
|
+
> **Build stall:** if the platform reports "EC2 deploy stalled" in the failure reason, the build produced no output for 10 minutes. This usually means a package install or large Docker layer download is hanging. Check your Dockerfile for slow `RUN` commands and consider layer caching improvements (e.g. copy `package.json` and run `npm install` before copying the rest of the source).
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Step 6 — Report outcome
|
|
95
|
+
|
|
96
|
+
**On `success`:**
|
|
97
|
+
|
|
98
|
+
Call `app_services_list` with:
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"token": "<token>",
|
|
102
|
+
"applicationId": "<appId>",
|
|
103
|
+
"environment": "<environment>"
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Display a summary of running services (serviceName, status, instanceCount). Tell the user: "✅ Deployment successful. Your application is live."
|
|
108
|
+
|
|
109
|
+
**On `failed`:**
|
|
110
|
+
|
|
111
|
+
Find the failed step in `data.steps` (the step where `status === "failed"`). Display:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
❌ Deployment failed at step: <step name>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If the failed step has a `failureReason`, display it in full:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Failure reason:
|
|
121
|
+
<failureReason>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The `failureReason` for the "Deploying your application" step contains the `docker compose up --build` output. Read it carefully and help the user understand what went wrong:
|
|
125
|
+
|
|
126
|
+
- **Image build error** (e.g. `COPY` path not found, `RUN` command failed, package not found): tell the user which line in their `Dockerfile` is causing the failure and suggest a fix.
|
|
127
|
+
- **Container start failure** (e.g. port already in use, missing environment variable, crash on startup): explain the cause and ask if they want to add missing secrets or adjust `docker-compose.yml`.
|
|
128
|
+
- **Image pull failure** (e.g. private registry, image not found): remind the user that vibetocloud builds from source — the `image:` key must reference a public image or use `build: .` with a local Dockerfile.
|
|
129
|
+
- **SSM agent never started** (`failureReason` contains "SSM agent never started"): tell the user "The deployment agent on your instance never started — this is a platform issue, not your code. Try re-deploying; if it persists, contact support."
|
|
130
|
+
- **Build stalled** (`failureReason` contains "EC2 deploy stalled" and "no build output"): tell the user "The build ran but stalled — likely a slow package install or large layer download. Consider: (1) adding `node_modules` to `.dockerignore`; (2) ordering `COPY package.json` + `RUN npm install` before `COPY . .` in your Dockerfile to maximise layer cache hits."
|
|
131
|
+
- **Health check failure** (failed step name contains "health" or "live"): the platform performs `GET /` on your app's public URL and expects HTTP 2xx or 3xx within 2 minutes. A 404 at the root path is treated as an application error — ensure your app serves a response at `/` in production mode. If `NODE_ENV=production` is not set, many frameworks disable their default routes. Suggest running `/vibetocloud-onboard` to check and set `NODE_ENV`.
|
|
132
|
+
|
|
133
|
+
After explaining the failure, use the AskUserQuestion tool with options `["Yes — help me fix it", "No — I'll investigate myself"]` to ask: "Would you like me to help fix the issue now?"
|
|
134
|
+
|
|
135
|
+
If yes: read the relevant file (`Dockerfile`, `docker-compose.yml`, or a source file), propose a fix, and tell the user to run `/vibetocloud-deploy` again once the fix is applied.
|
|
136
|
+
|
|
137
|
+
If no, or the failure does not match the above categories: tell the user: "Run `/vibetocloud-debug` to tail live logs and diagnose further."
|
|
138
|
+
|
|
139
|
+
**On `cancelled`:**
|
|
140
|
+
|
|
141
|
+
Tell the user: "Deployment was cancelled."
|