@syntica/mcp 2.3.1 → 2.4.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntica/mcp",
3
- "version": "2.3.1",
3
+ "version": "2.4.1",
4
4
  "description": "MCP server and skills for deploying applications on Syntica from your coding agent (Claude Code, Codex, Cursor, Windsurf, Gemini, Copilot CLI)",
5
5
  "mcpName": "io.syntica/mcp",
6
6
  "bin": {
@@ -8,7 +8,7 @@
8
8
  {
9
9
  "name": "syntica",
10
10
  "description": "Deploy, run and debug your applications on Syntica from Claude Code — real infrastructure, a live URL, no DevOps required.",
11
- "version": "2.3.1",
11
+ "version": "2.4.1",
12
12
  "source": "./"
13
13
  }
14
14
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "syntica",
3
3
  "description": "Deploy, run and debug your applications on Syntica from your coding agent — real infrastructure, a live URL, no DevOps required.",
4
- "version": "2.3.1",
4
+ "version": "2.4.1",
5
5
  "author": {
6
6
  "name": "Syntica",
7
7
  "email": "support@syntica.io",
package/skills/README.md CHANGED
@@ -86,14 +86,14 @@ Between deployments you can ask in plain language — "restart the api service",
86
86
 
87
87
  ## Where your session lives
88
88
 
89
- The skills split their state in two:
89
+ State is split in two:
90
90
 
91
- - `~/.syntica/credentials.json` (mode `0600`, outside any repository) — your session token and org ID.
91
+ - `~/.syntica/credentials.json` (mode `0600`, outside any repository) — your session. The Syntica MCP server stores it there and reads it on every call; Claude never reads, writes or passes it.
92
92
  - `.syntica/config.json` in your project root (gitignored) — which application, environment and git remote this project uses. No secret is written here.
93
93
 
94
- The token is kept out of the project directory on purpose: that directory is the one an agent reads on every invocation, so a token stored in it is one prompt-injected "read this file" away from being exfiltrated (#488). Running `/syntica:onboard` once on an older setup migrates an existing token out of `.syntica/config.json` for you.
94
+ The token is kept out of the project directory on purpose: that directory is the one an agent reads on every invocation, so a token stored in it is one prompt-injected "read this file" away from being exfiltrated (#488). Running `/syntica:onboard` once on an older setup removes a token an earlier version left in `.syntica/config.json` or `.vibetocloud.json`, and asks you to sign in again.
95
95
 
96
- **This file is a credential.** `/syntica:onboard` adds it to `.gitignore` automatically — leave that in place and never commit it. Run `/syntica:onboard` again to re-authenticate or switch application.
96
+ **Keep `.syntica/` out of git.** It holds no secret, but it identifies your org and application; `/syntica:onboard` adds it to `.gitignore` automatically — leave that in place and never commit it. Run `/syntica:onboard` again to re-authenticate or switch application.
97
97
 
98
98
  ## What Syntica runs
99
99
 
@@ -54,24 +54,33 @@ it in a minute.
54
54
 
55
55
  ---
56
56
 
57
- ## Step 1 — Load config
57
+ ## Step 1 — Load config and sign in
58
58
 
59
- Read `~/.syntica/credentials.json` (session `token` and `orgId`) and
60
- `.syntica/config.json` (project state) by reading it. The token is deliberately kept
61
- out of the project directory — see `/syntica:onboard` (#488).
59
+ Read `.syntica/config.json` (project state) by reading it. It holds no token — see
60
+ `/syntica:onboard` (#488).
62
61
 
63
- If `~/.syntica/credentials.json` is missing but `.syntica/config.json` still has a
64
- `token` field, it is an older setup: use that token for this run and tell the user to run
65
- `/syntica:onboard` once, which moves it out of the repository.
62
+ If `.syntica/config.json` still has a `token` field, or a `.vibetocloud.json` file exists in the
63
+ project root, it is an older setup that left a session token in the repository: tell the user to
64
+ run `/syntica:onboard` once, which removes it. Do not use that token.
66
65
 
67
- If neither file yields a `token`, or `appId`/`orgId` are empty, stop and tell the user:
66
+ If `appId` or `orgId` is empty, stop and tell the user:
68
67
  "Run `/syntica:onboard` first to set up your project."
69
68
 
70
- Verify the token is still valid by calling `org_authenticate` with:
71
- ```json
72
- { "token": "<token>" }
73
- ```
74
- If it fails, tell the user: "Your session has expired. Run `/syntica:onboard` to sign in again."
69
+ **Sign in:** call `org_authenticate` (no arguments). It returns
70
+ `{ userId, orgId, userName, orgName, platformRole }` when you are signed in. The Syntica MCP
71
+ server holds the session itself and adds it to every call — never read or write its credentials
72
+ file, and never pass a `token` argument to any tool.
73
+
74
+ If it fails with a 401 ("not signed in", or an expired session), sign in again:
75
+
76
+ 1. Ask the user for their email address and call `org_request_otp` with `{ "email": "<email>" }`.
77
+ 2. Ask the user for the code from that email and call `org_verify_otp` with
78
+ `{ "email": "<email>", "code": "<code>" }`.
79
+ 3. If it returns `pendingOrgSelection: true` with an `orgs` list, use the AskUserQuestion tool to
80
+ ask which organisation, then call `org_select` with `{ "orgId": "<chosen orgId>" }`.
81
+
82
+ Do not try to refresh the session by hand — refresh is automatic. Any later call that fails
83
+ with a 401 means the session has ended: run this sign-in again, then retry the call.
75
84
 
76
85
  ---
77
86
 
@@ -80,7 +89,6 @@ If it fails, tell the user: "Your session has expired. Run `/syntica:onboard` to
80
89
  Call `app_services_list` with:
81
90
  ```json
82
91
  {
83
- "token": "<token>",
84
92
  "applicationId": "<appId>",
85
93
  "environment": "<environment>"
86
94
  }
@@ -116,7 +124,6 @@ the state an application is in the morning after it broke.
116
124
 
117
125
  ```json
118
126
  {
119
- "token": "<token>",
120
127
  "applicationId": "<appId>",
121
128
  "environment": "<environment>",
122
129
  "minutes": 60
@@ -132,7 +139,6 @@ happened. Say which you mean.
132
139
  Then, to follow what is happening **now**, call `app_service_tail_logs` with:
133
140
  ```json
134
141
  {
135
- "token": "<token>",
136
142
  "applicationId": "<appId>",
137
143
  "environment": "<environment>",
138
144
  "service": "<selected service name>"
@@ -168,7 +174,6 @@ If the user wants to inspect or modify data, identify the database service (e.g.
168
174
  **Read (default):** call `app_db_query` with:
169
175
  ```json
170
176
  {
171
- "token": "<token>",
172
177
  "applicationId": "<appId>",
173
178
  "environment": "<environment>",
174
179
  "service": "<db service name>",
@@ -190,7 +195,7 @@ confirmation. Then call `app_db_query` with the same shape plus `"allowWrite": t
190
195
 
191
196
  **Audit:** every query is logged. Show recent history with `app_db_audit`:
192
197
  ```json
193
- { "token": "<token>", "applicationId": "<appId>", "environment": "<environment>" }
198
+ { "applicationId": "<appId>", "environment": "<environment>" }
194
199
  ```
195
200
 
196
201
  When done, proceed to Step 6.
@@ -204,7 +209,6 @@ Offer the following options:
204
209
  1. **Restart this service** — call `app_service_restart` with:
205
210
  ```json
206
211
  {
207
- "token": "<token>",
208
212
  "applicationId": "<appId>",
209
213
  "environment": "<environment>",
210
214
  "service": "<selected service name>"
@@ -9,38 +9,33 @@ Announce at start: "I'm using deploy to deploy your application."
9
9
 
10
10
  ---
11
11
 
12
- ## Step 1 — Load config
12
+ ## Step 1 — Load config and sign in
13
13
 
14
- Read `~/.syntica/credentials.json` (session `token` and `orgId`) and
15
- `.syntica/config.json` (project state) by reading it. The token is deliberately kept
16
- out of the project directory — see `/syntica:onboard` (#488).
14
+ Read `.syntica/config.json` (project state) by reading it. It holds no token — see
15
+ `/syntica:onboard` (#488).
17
16
 
18
- If `~/.syntica/credentials.json` is missing but `.syntica/config.json` still has a
19
- `token` field, it is an older setup: use that token for this run and tell the user to run
20
- `/syntica:onboard` once, which moves it out of the repository.
17
+ If `.syntica/config.json` still has a `token` field, or a `.vibetocloud.json` file exists in the
18
+ project root, it is an older setup that left a session token in the repository: tell the user to
19
+ run `/syntica:onboard` once, which removes it. Do not use that token.
21
20
 
22
- If neither file yields a `token`, or `appId`/`orgId` are empty, stop and tell the user:
21
+ If `appId` or `orgId` is empty, stop and tell the user:
23
22
  "Run `/syntica:onboard` first to set up your project."
24
23
 
25
- **Token freshness check:**
24
+ **Sign in:** call `org_authenticate` (no arguments). It returns
25
+ `{ userId, orgId, userName, orgName, platformRole }` when you are signed in. The Syntica MCP
26
+ server holds the session itself and adds it to every call — never read or write its credentials
27
+ file, and never pass a `token` argument to any tool.
26
28
 
27
- 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).
29
+ If it fails with a 401 ("not signed in", or an expired session), sign in again:
28
30
 
29
- If `exp - (Date.now() / 1000) < 3600` (less than 1 hour remaining):
30
- 1. Call `org_refresh_token` with `{ "token": "<current token>" }`.
31
- 2. If successful: write the new token back to `~/.syntica/credentials.json` (keep `orgId` as it is) and use it for all subsequent calls. Use Bash with `umask 077`, as `/syntica:onboard` does, so the refreshed file keeps the same private permissions:
32
- ```bash
33
- (umask 077 && cat > ~/.syntica/credentials.json <<'JSON'
34
- { "token": "<new token>", "orgId": "<orgId>" }
35
- JSON
36
- )
37
- ```
38
- If the write fails, warn the user and carry on with the new token in memory for this run.
39
- 3. If it fails: warn the user — "Could not refresh your session token. If API calls fail with an auth error, run `/syntica:onboard` to sign in again."
31
+ 1. Ask the user for their email address and call `org_request_otp` with `{ "email": "<email>" }`.
32
+ 2. Ask the user for the code from that email and call `org_verify_otp` with
33
+ `{ "email": "<email>", "code": "<code>" }`.
34
+ 3. If it returns `pendingOrgSelection: true` with an `orgs` list, use the AskUserQuestion tool to
35
+ ask which organisation, then call `org_select` with `{ "orgId": "<chosen orgId>" }`.
40
36
 
41
- If more than 1 hour remains, or if the token cannot be decoded, proceed without refreshing.
42
-
43
- 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 `/syntica:onboard` to sign in again."
37
+ Do not try to refresh the session by hand — refresh is automatic. Any later call that fails
38
+ with a 401 means the session has ended: run this sign-in again, then retry the call.
44
39
 
45
40
  ---
46
41
 
@@ -74,7 +69,6 @@ If the push fails, report the error and stop — do not trigger a deploy with st
74
69
  Call `org_deploy` with:
75
70
  ```json
76
71
  {
77
- "token": "<token>",
78
72
  "applicationId": "<appId>",
79
73
  "environment": "<environment>",
80
74
  "branch": "<current branch>"
@@ -91,7 +85,7 @@ Tell the user: "Deployment started (build ID: <buildId>). Polling for status…"
91
85
 
92
86
  Call `org_deploy_status` every 15 seconds with:
93
87
  ```json
94
- { "token": "<token>", "buildId": "<buildId>" }
88
+ { "buildId": "<buildId>" }
95
89
  ```
96
90
 
97
91
  The response `data.status` is one of: `pending` | `running` | `success` | `failed` | `cancelled`.
@@ -111,7 +105,6 @@ Continue polling until status is `success`, `failed`, or `cancelled`.
111
105
  Call `app_services_list` with:
112
106
  ```json
113
107
  {
114
- "token": "<token>",
115
108
  "applicationId": "<appId>",
116
109
  "environment": "<environment>"
117
110
  }
@@ -160,7 +153,7 @@ payload carries `environment` and a `tiers` array of the selectable tiers.
160
153
 
161
154
  Do not guess a tier. Use the AskUserQuestion tool to have the user choose from
162
155
  `tiers` (show `name`, and `instanceType`/`storageGb` where present), then call
163
- `app_set_node_tier` with `{ token, applicationId, environment, nodeTierId }` and
156
+ `app_set_node_tier` with `{ applicationId, environment, nodeTierId }` and
164
157
  retry the deploy once.
165
158
 
166
159
  If `tiers` is empty, tell the user no tier is available for their plan and stop —
@@ -11,41 +11,44 @@ Maintenance operations on syntica. Today this covers **view billing**, **delete*
11
11
 
12
12
  ---
13
13
 
14
- ## Step 1 — Load config
14
+ ## Step 1 — Load config and sign in
15
15
 
16
- Read `~/.syntica/credentials.json` (session `token` and `orgId`) and
17
- `.syntica/config.json` (project state) by reading it. The token is deliberately kept
18
- out of the project directory — see `/syntica:onboard` (#488).
16
+ Read `.syntica/config.json` (project state) if it exists. It holds no token — see
17
+ `/syntica:onboard` (#488). If it still has a `token` field, or a `.vibetocloud.json` file exists
18
+ in the project root, it is an older setup that left a session token in the repository: tell the
19
+ user to run `/syntica:onboard` once, which removes it. Do not use that token.
19
20
 
20
- If `~/.syntica/credentials.json` is missing but `.syntica/config.json` still has a
21
- `token` field, it is an older setup: use that token for this run and tell the user to run
22
- `/syntica:onboard` once, which moves it out of the repository.
21
+ **Sign in:** call `org_authenticate` (no arguments). It returns
22
+ `{ userId, orgId, userName, orgName, platformRole }` when you are signed in. The Syntica MCP
23
+ server holds the session itself and adds it to every call — never read or write its credentials
24
+ file, and never pass a `token` argument to any tool.
23
25
 
24
- If neither file yields a `token`, or `orgId` is empty, stop and tell the user:
25
- "Run `/syntica:onboard` first to set up your project."
26
+ If it fails with a 401 ("not signed in", or an expired session), sign in again:
26
27
 
27
- Use `token` and `orgId` from the file for every call below. If a call returns an auth error, tell the user: "Your session has expired. Run `/syntica:onboard` to sign in again." and stop.
28
+ 1. Ask the user for their email address and call `org_request_otp` with `{ "email": "<email>" }`.
29
+ 2. Ask the user for the code from that email and call `org_verify_otp` with
30
+ `{ "email": "<email>", "code": "<code>" }`.
31
+ 3. If it returns `pendingOrgSelection: true` with an `orgs` list, use the AskUserQuestion tool to
32
+ ask which organisation, then call `org_select` with `{ "orgId": "<chosen orgId>" }`.
33
+
34
+ Do not try to refresh the session by hand — refresh is automatic. Any later call that fails
35
+ with a 401 means the session has ended: run this sign-in again, then retry the call.
36
+
37
+ Use the `orgId` returned by `org_authenticate` (or `org_verify_otp` / `org_select`) for every
38
+ call below that takes one.
28
39
 
29
40
  ### If the user has more than one organisation
30
41
 
31
- The stored token is scoped to **one** organisation. Passing a different `orgId` to a tool does
32
- not switch — the token is what authorises, so the call is refused.
42
+ The session is scoped to **one** organisation. Passing a different `orgId` to a tool does
43
+ not switch — the session is what authorises, so the call is refused.
33
44
 
34
45
  When the user mentions another organisation, asks what they have access to, or wants something
35
46
  created somewhere other than the current org:
36
47
 
37
48
  1. `org_list_orgs` — the organisations this user belongs to.
38
49
  2. Ask which one they mean, unless they have already said.
39
- 3. `org_select` with that `orgId` — returns a **new** token scoped to it.
40
- 4. Write the new `token` and `orgId` to `~/.syntica/credentials.json`, replacing both, and use
41
- them for the rest of the session:
42
-
43
- ```bash
44
- (umask 077 && cat > ~/.syntica/credentials.json <<'JSON'
45
- {"token":"<new token>","userId":"<userId>","orgId":"<new orgId>"}
46
- JSON
47
- )
48
- ```
50
+ 3. `org_select` with `{ "orgId": "<that orgId>" }` — the MCP switches the session to it. Use
51
+ that `orgId` for the rest of the session.
49
52
 
50
53
  Tell the user which organisation you switched to. A switch is sticky: everything afterwards,
51
54
  including anything `.syntica/config.json` refers to, belongs to the new org, so check the app
@@ -82,14 +85,14 @@ Read-only — this never changes anything.
82
85
 
83
86
  Changing an environment's node tier changes the instance size **and the monthly cost**. This adjusts billing on an existing card (Pay-as-you-go) — no new card entry — so it's safe to do here with a cost confirmation. The free plan only has the free tier; bigger sizes need Pay-as-you-go.
84
87
 
85
- 1. **Identify** the app (call `app_list` with `{ token, orgId }` if unclear) and the environment (`dev`/`staging`/`production`).
88
+ 1. **Identify** the app (call `app_list` with `{ orgId }` if unclear) and the environment (`dev`/`staging`/`production`).
86
89
 
87
- 2. **List tiers.** Call `app_list_node_tiers` with `{ token, orgId }`. It returns the available tiers (name, instance type, storage, price) and the org's plan key.
90
+ 2. **List tiers.** Call `app_list_node_tiers` with `{ orgId }`. It returns the available tiers (name, instance type, storage, price) and the org's plan key.
88
91
  - If the plan is `free`: tell the user only the free tier is available and larger sizes require Pay-as-you-go — point them at **Enable an environment or change billing** — then stop.
89
92
 
90
93
  3. **Confirm the cost.** Use the AskUserQuestion tool with options `["Yes — resize", "No — cancel"]` to ask: "Resize <app>/<env> to <tier> at €X/mo? This changes your bill." Show the chosen tier's monthly price. If the user cancels, stop.
91
94
 
92
- 4. **Set the tier.** Call `app_set_node_tier` with `{ token, applicationId, environment, nodeTierId }`.
95
+ 4. **Set the tier.** Call `app_set_node_tier` with `{ applicationId, environment, nodeTierId }`.
93
96
 
94
97
  5. **Explain when it takes effect.** The new size is applied to the instance on the **next deploy**. For an immediate change on a running instance, offer to: `app_stop_instance` → `app_reprovision_instance` (keeps the data volume) → `app_start_instance`, then redeploy — and warn this causes brief downtime.
95
98
 
@@ -113,7 +116,7 @@ Then tell them what to do there:
113
116
 
114
117
  ## Delete an application
115
118
 
116
- 1. **Identify the app.** If the target is not obvious, call `app_list` with `{ token, orgId }` and use the AskUserQuestion tool to let the user pick which application to delete (show `name`). Never guess — deletion is destructive.
119
+ 1. **Identify the app.** If the target is not obvious, call `app_list` with `{ orgId }` and use the AskUserQuestion tool to let the user pick which application to delete (show `name`). Never guess — deletion is destructive.
117
120
 
118
121
  2. **Show the disclaimer** verbatim, filling in the app name:
119
122
 
@@ -125,7 +128,7 @@ Then tell them what to do there:
125
128
 
126
129
  3. **Confirm.** Use the AskUserQuestion tool with options `["Yes — delete it", "No — cancel"]` to ask: "Delete application <name>? This can be undone within ~30 days." If the user cancels, stop and confirm nothing was changed.
127
130
 
128
- 4. **Delete.** Call `app_delete` with `{ token, applicationId }`.
131
+ 4. **Delete.** Call `app_delete` with `{ applicationId }`.
129
132
 
130
133
  5. **Report.** On success tell the user: "🗑️ **<name>** deleted. Restore it within ~30 days with `/syntica:manage` → Restore; after that it is permanently purged." If the call fails, show the error and stop.
131
134
 
@@ -133,13 +136,13 @@ Then tell them what to do there:
133
136
 
134
137
  ## Restore a deleted application
135
138
 
136
- 1. **List deleted apps.** Call `app_list_deleted` with `{ token, orgId }`. Each entry has `name`, `id`, `deletedAt`, and `approxDaysLeftToRestore`.
139
+ 1. **List deleted apps.** Call `app_list_deleted` with `{ orgId }`. Each entry has `name`, `id`, `deletedAt`, and `approxDaysLeftToRestore`.
137
140
 
138
141
  - If the list is empty, tell the user: "You have no deleted applications to restore." and stop.
139
142
 
140
143
  2. **Pick one.** Use the AskUserQuestion tool to let the user choose which to restore, showing each `name` with its `approxDaysLeftToRestore` (e.g. "my-app — ~12 days left"). Warn on any with a low or zero count that they may already be past the window.
141
144
 
142
- 3. **Restore.** Call `app_restore` with `{ token, applicationId }` for the chosen app.
145
+ 3. **Restore.** Call `app_restore` with `{ applicationId }` for the chosen app.
143
146
 
144
147
  4. **Report.**
145
148
  - On success: "♻️ **<name>** restored." (The repository and app are back; redeploy with `/syntica:deploy` if needed.)
@@ -150,7 +153,7 @@ Then tell them what to do there:
150
153
 
151
154
  ## Rename an application
152
155
 
153
- 1. **Identify the app.** If not obvious, call `app_list` with `{ token, orgId }` and let the user pick.
156
+ 1. **Identify the app.** If not obvious, call `app_list` with `{ orgId }` and let the user pick.
154
157
 
155
158
  2. **Get the new name.** Ask the user for the new name if not already given. It must be lowercase letters, numbers and hyphens only, and unique in the org.
156
159
 
@@ -160,7 +163,7 @@ Then tell them what to do there:
160
163
 
161
164
  4. **Confirm.** Use the AskUserQuestion tool with options `["Yes — rename it", "No — cancel"]` to ask: "Rename <old name> to <new name>? Existing clone remotes will break."
162
165
 
163
- 5. **Rename.** Call `app_rename` with `{ token, applicationId, name }`.
166
+ 5. **Rename.** Call `app_rename` with `{ applicationId, name }`.
164
167
 
165
168
  6. **Report.** On success show the new `cloneUrl` returned by the tool and tell the user to update any local remote:
166
169
  ```bash
@@ -15,44 +15,41 @@ The Syntica MCP server must be configured in your agent. If the MCP tools are no
15
15
 
16
16
  ## Step 1 — Check existing auth
17
17
 
18
- Session credentials live **outside the project**, in `~/.syntica/credentials.json`. Project
19
- state (which app, which environment, which remote) lives in `.syntica/config.json` in the
20
- repo. The token is never written into the project directory: that directory is the one an agent
21
- reads on every invocation, so a token sitting in it is one prompt-injected "read this file" away
22
- from being exfiltrated (#488).
18
+ The Syntica MCP server holds your session itself, in a file only it reads and writes. Never
19
+ read, write, move or print that file, and never pass a `token` argument to a tool — the MCP adds
20
+ the session to every call. Project state (which app, which environment, which remote) lives in
21
+ `.syntica/config.json` in the repo, and it never holds a token: the project directory is the one
22
+ an agent reads on every invocation, so a token sitting in it is one prompt-injected "read this
23
+ file" away from being exfiltrated (#488).
23
24
 
24
25
  **Migrating from the old `.vibetocloud` path structure:** this skill used to read and write
25
- `~/.vibetocloud/credentials.json` and `.vibetocloud/config.json`. If `~/.syntica/credentials.json`
26
- does not exist but `~/.vibetocloud/credentials.json` does, move it:
27
- ```bash
28
- mkdir -p ~/.syntica && chmod 700 ~/.syntica
29
- mv ~/.vibetocloud/credentials.json ~/.syntica/credentials.json
30
- ```
31
- Likewise, if `.syntica/config.json` does not exist but `.vibetocloud/config.json` does, move it
32
- with the Bash tool (`mkdir -p .syntica && mv .vibetocloud/config.json .syntica/config.json`) and
26
+ `.vibetocloud/config.json`. If `.syntica/config.json` does not exist but `.vibetocloud/config.json`
27
+ does, move it with the Bash tool (`mkdir -p .syntica && mv .vibetocloud/config.json .syntica/config.json`) and
33
28
  add `.syntica/` to `.gitignore` if it is not already covered. Leave `.vibetocloud/` itself alone
34
29
  if anything else remains in it. Running this skill again later re-does this check, so a user who
35
- still has an environment with the old path structure is caught the next time they onboard.
30
+ still has an environment with the old path structure is caught the next time they onboard. An
31
+ older session file outside the project needs no migration — the MCP picks it up on its own.
36
32
 
37
- Read `~/.syntica/credentials.json` by reading it. Read `.syntica/config.json` too
38
- if it exists — that is where `appId`, `environment` and `remote` come from.
33
+ Read `.syntica/config.json` if it exists — that is where `appId`, `environment` and `remote`
34
+ come from.
39
35
 
40
- **Migrating an older setup:** if `.syntica/config.json` contains a non-empty `token` field,
41
- it was written by a previous version of this skill. Move it:
36
+ **Removing a token from the repository:** older versions of this skill and of the MCP tools
37
+ wrote the session token into the project. If either is present, remove it — do **not** copy the
38
+ token anywhere, the user signs in again below instead:
42
39
 
43
- 1. Write it to `~/.syntica/credentials.json` using the Bash step below.
44
- 2. Remove the `token` field from `.syntica/config.json` (keep every other field) and write
45
- the file back.
46
- 3. Tell the user: "Moved your session token out of the project directory to
47
- `~/.syntica/credentials.json`. Consider signing out and back in if that repository was
48
- ever pushed while the token was in it."
40
+ 1. If `.syntica/config.json` contains a `token` field, remove that field (keep every other field)
41
+ and write the file back.
42
+ 2. If a `.vibetocloud.json` file exists in the project root, delete it.
43
+ 3. Make sure `.gitignore` lists `.vibetocloud.json` (see below).
44
+ 4. Tell the user: "Removed an old session token from the project directory — please sign in
45
+ again. If that repository was ever pushed while the token was in it, treat that token as
46
+ exposed."
49
47
 
50
- Then:
48
+ Then call `org_authenticate` (no arguments):
51
49
 
52
- - If a non-empty `token` is available (from either location): call `org_authenticate` with it.
53
- - If `org_authenticate` succeeds: skip to **Step 2**.
54
- - If it fails (token expired): proceed to authenticate below.
55
- - If no token is available: proceed to authenticate below.
50
+ - If it returns `{ userId, orgId, userName, orgName, platformRole }`: you are signed in — skip to
51
+ **Step 2**, using that `orgId` unless `.syntica/config.json` already names one.
52
+ - If it fails with a 401 ("not signed in", or an expired session): proceed to authenticate below.
56
53
 
57
54
  **Authenticate:**
58
55
 
@@ -120,31 +117,17 @@ If the call fails, tell the user the error and stop.
120
117
 
121
118
  **After successful verify (both flows):**
122
119
 
123
- On success the response contains `{ token, userId, orgId, userName, orgName }`.
124
-
125
- **Write the credentials outside the project.** Use the Bash tool, not the Write tool — `umask 077`
126
- creates the file already private, where writing it first and `chmod`-ing after leaves a window in
127
- which it is world-readable:
128
-
129
- ```bash
130
- mkdir -p ~/.syntica && chmod 700 ~/.syntica
131
- (umask 077 && cat > ~/.syntica/credentials.json <<'JSON'
132
- {
133
- "token": "<token from response>",
134
- "orgId": "<orgId from response>"
135
- }
136
- JSON
137
- )
138
- ```
120
+ On success the response contains `{ userId, orgId, userName, orgName }` — no token; the MCP has
121
+ stored the session itself.
139
122
 
140
- If that fails (a read-only home directory, a filesystem without permission bits), do **not** stop
141
- the onboarding: tell the user the credentials could not be stored privately, name the path, and
142
- carry on. Where their credentials live on their own machine is their call, not the platform's.
123
+ If it instead returns `pendingOrgSelection: true` with an `orgs` list, the account belongs to more
124
+ than one organisation. Use the AskUserQuestion tool to ask which one (show each `name`), then
125
+ call `org_select` with `{ "orgId": "<chosen orgId>" }`. Use that `orgId` from here on.
143
126
 
144
127
  Write `.syntica/config.json` using the Write tool — project state only, **no token**:
145
128
  ```json
146
129
  {
147
- "orgId": "<orgId from response>",
130
+ "orgId": "<orgId from the response, or the one chosen with org_select>",
148
131
  "appId": "",
149
132
  "environment": "",
150
133
  "remote": ""
@@ -163,7 +146,7 @@ Tell the user: "Welcome, <userName>! You're signed in to org <orgName>."
163
146
 
164
147
  Call `app_list` with:
165
148
  ```json
166
- { "token": "<token>", "orgId": "<orgId>" }
149
+ { "orgId": "<orgId>" }
167
150
  ```
168
151
 
169
152
  Build an options list from the response: one option per existing app (label = app name), plus a final option `"Create new app"`.
@@ -175,7 +158,7 @@ Use the AskUserQuestion tool with those options to ask:
175
158
 
176
159
  **If "Create new app":** ask the user for a name (lowercase letters, numbers and hyphens only — suggest the current directory name lowercased with spaces replaced by hyphens). Call `app_create` with:
177
160
  ```json
178
- { "token": "<token>", "name": "<app name>", "orgId": "<orgId>" }
161
+ { "name": "<app name>", "orgId": "<orgId>" }
179
162
  ```
180
163
 
181
164
  The response contains `{ id, name, gitUrl, ... }`. Save `id` as `appId` and `gitUrl` in `.syntica/config.json`.
@@ -231,12 +214,11 @@ This is a **paid** capability. If it is not on the org's subscription every call
231
214
 
232
215
  A repository connection stores the credential for a **host**, and applications are then bound to a path on that host. Create the connection first; it is reusable for every repository on that host.
233
216
 
234
- **1. Look for an existing connection.** Call `org_list_git_connections` with `{ "token": "<token>", "orgId": "<orgId>" }`. Match one on the host of their `origin` URL.
217
+ **1. Look for an existing connection.** Call `org_list_git_connections` with `{ "orgId": "<orgId>" }`. Match one on the host of their `origin` URL.
235
218
 
236
219
  **2. If none matches, create one.** Call `org_add_git_connection`:
237
220
  ```json
238
221
  {
239
- "token": "<token>",
240
222
  "orgId": "<orgId>",
241
223
  "url": "https://<host from their origin>",
242
224
  "username": "<see below>",
@@ -252,7 +234,6 @@ Ask the user for a read-scoped token. The `username` is provider-specific and ge
252
234
  **3. Bind the application.** Call `app_set_upstream`:
253
235
  ```json
254
236
  {
255
- "token": "<token>",
256
237
  "applicationId": "<appId>",
257
238
  "connectionId": "<id from step 1 or 2>",
258
239
  "path": "<owner/repo within that host>",
@@ -379,7 +360,6 @@ If any variables remain unaccounted for, tell the user which ones, then use the
379
360
  If Yes, collect the values one at a time as `NAME=value`. For each, ask whether it is sensitive, then call `app_create_config` with:
380
361
  ```json
381
362
  {
382
- "token": "<token>",
383
363
  "applicationId": "<appId>",
384
364
  "kind": "value",
385
365
  "scope": "app_env",
@@ -522,7 +502,7 @@ If all checks pass with no issues, tell the user: "✅ Pre-flight check passed
522
502
  An environment needs a node tier before it can be deployed. Ask; never pick one
523
503
  silently — the tier decides what the customer is billed.
524
504
 
525
- Call `app_list_node_tiers` with `{ "token": "<token>", "orgId": "<orgId>" }`.
505
+ Call `app_list_node_tiers` with `{ "orgId": "<orgId>" }`.
526
506
 
527
507
  - If `mustAsk` is `false` (free plan), the free tier is the only option. Set it
528
508
  without asking and tell the user which one you used.
@@ -535,7 +515,6 @@ Call `app_list_node_tiers` with `{ "token": "<token>", "orgId": "<orgId>" }`.
535
515
  Then call `app_set_node_tier`:
536
516
  ```json
537
517
  {
538
- "token": "<token>",
539
518
  "applicationId": "<appId>",
540
519
  "environment": "<environment>",
541
520
  "nodeTierId": "<id the user chose>"