@syntica/mcp 2.0.0 → 2.1.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/README.md +70 -7
- package/dist/index.js +763 -107
- package/package.json +12 -1
- package/skills/.claude-plugin/marketplace.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/README.md +1 -0
- package/skills/skills/syntica-connections/SKILL.md +96 -0
- package/skills/skills/syntica-debug/SKILL.md +23 -3
- package/skills/skills/syntica-manage/SKILL.md +1 -1
package/package.json
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntica/mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Claude Code MCP server and skills for deploying applications on Syntica",
|
|
5
|
+
"mcpName": "io.syntica/mcp",
|
|
5
6
|
"bin": {
|
|
6
7
|
"syntica-mcp": "./dist/index.js"
|
|
7
8
|
},
|
|
8
9
|
"homepage": "https://syntica.io",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"mcp",
|
|
12
|
+
"mcp-server",
|
|
13
|
+
"model-context-protocol",
|
|
14
|
+
"claude-code",
|
|
15
|
+
"deployment",
|
|
16
|
+
"docker-compose",
|
|
17
|
+
"paas",
|
|
18
|
+
"syntica"
|
|
19
|
+
],
|
|
9
20
|
"files": [
|
|
10
21
|
"dist/",
|
|
11
22
|
"skills/"
|
package/skills/README.md
CHANGED
|
@@ -30,6 +30,7 @@ claude plugin uninstall syntica
|
|
|
30
30
|
| `/syntica-onboard` | You have a project on your machine and want it online for the first time. Logs you in, creates the application, sets up the git remote, scaffolds `docker-compose.yml` if it's missing, configures secrets and instance size, and pushes |
|
|
31
31
|
| `/syntica-deploy` | You've changed something and want it live. Pushes the current branch, deploys, waits, and tells you the URL or what failed |
|
|
32
32
|
| `/syntica-debug` | Something is broken. Lists running services with their status, tails logs, restarts a service |
|
|
33
|
+
| `/syntica-connections` | Your app needs to reach something outside itself — mail, payments, chat, files, sign-in. Fetches what your organisation granted this environment and writes the code against the injected credentials, so you never handle a key |
|
|
33
34
|
| `/syntica-manage` | Housekeeping: check the bill, resize an environment, rename an application, delete one (recoverable for about 30 days), or restore one you deleted |
|
|
34
35
|
|
|
35
36
|
Destructive and billing actions always confirm before doing anything.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: syntica-connections
|
|
3
|
+
description: Use BEFORE writing or changing any code that talks to a system outside the application — sending email, taking a payment, posting to a chat channel, reading or writing files, signing users in, or calling any vendor API. Also use whenever you are about to ask the user for an API key, a token, a client secret, a webhook URL or an SMTP password, or to add one to a .env file. A Syntica-hosted application receives those credentials as environment variables injected at deploy time and must never hold one itself; this skill fetches what this environment was actually granted so you write against it instead of inventing your own configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Talking to an external system from a Syntica application
|
|
7
|
+
|
|
8
|
+
Announce at start: "I'm using syntica-connections to check what this app is connected to."
|
|
9
|
+
|
|
10
|
+
The organisation registers each system once — a mailbox, a Stripe account, a Slack
|
|
11
|
+
workspace, a SharePoint site — and grants it to an application **per environment**.
|
|
12
|
+
The platform injects the credentials into the container at deploy time. Your job
|
|
13
|
+
is to write ordinary code against those variables.
|
|
14
|
+
|
|
15
|
+
**Never** ask the user for an API key, token, client secret or password, paste one
|
|
16
|
+
into the code or a `.env`, or invent your own variable names for a system the
|
|
17
|
+
platform already connects. That is the single thing this platform exists to
|
|
18
|
+
prevent — and the deploy-time scan will fail the build over a committed
|
|
19
|
+
credential anyway.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Step 1 — Fetch what is granted
|
|
24
|
+
|
|
25
|
+
Call `app_describe_connections` with the `applicationId` and the `environment`
|
|
26
|
+
you are building for (usually `production`).
|
|
27
|
+
|
|
28
|
+
It returns, per granted connection: its connector, the connection's name, and the
|
|
29
|
+
environment variable **names** the platform injects. It never returns a value —
|
|
30
|
+
there is nothing to copy and nothing to cache, so call it rather than remembering
|
|
31
|
+
it.
|
|
32
|
+
|
|
33
|
+
Note the names carefully. A grant may carry a **prefix**, so a second mailbox
|
|
34
|
+
arrives as `SUPPORT_SMTP_HOST` rather than `SMTP_HOST`. Use exactly what the tool
|
|
35
|
+
returns.
|
|
36
|
+
|
|
37
|
+
## Step 2 — If nothing is granted, stop and say so
|
|
38
|
+
|
|
39
|
+
An empty list is a real answer, not an error. Tell the user:
|
|
40
|
+
|
|
41
|
+
> This app has no `<system>` connection granted for `<environment>`. An org admin
|
|
42
|
+
> can add one under Connections and grant it to this app. I can write the code
|
|
43
|
+
> against the variables now if you tell me which connector they'll use.
|
|
44
|
+
|
|
45
|
+
If the user wants it anyway, call `app_request_connection` with the connector id,
|
|
46
|
+
the environment and one line on what it is for. An admin is notified in the
|
|
47
|
+
platform and by email, and decides which of their connections satisfies it. Then
|
|
48
|
+
write the code against the variable names the connector declares — they arrive at
|
|
49
|
+
the next deploy once it is granted.
|
|
50
|
+
|
|
51
|
+
Do **not** install a client library speculatively, invent variable names, or ask
|
|
52
|
+
for credentials. A grant deliberately absent in `dev` usually means someone
|
|
53
|
+
decided a preview must not touch the real system, so say what you are about to
|
|
54
|
+
request before requesting it.
|
|
55
|
+
|
|
56
|
+
## Step 3 — Write against the injected variables
|
|
57
|
+
|
|
58
|
+
Read them from the environment. Use the ordinary library for the language and the
|
|
59
|
+
vendor — `stripe`, `@slack/web-api`, `nodemailer`, `smtplib` — except where the
|
|
60
|
+
connector's own notes say otherwise.
|
|
61
|
+
|
|
62
|
+
Two that are worth knowing:
|
|
63
|
+
|
|
64
|
+
- **Microsoft 365 mail** is two HTTPS calls and needs no dependency at all: a
|
|
65
|
+
client-credentials token from `login.microsoftonline.com`, then a POST to
|
|
66
|
+
`https://graph.microsoft.com/v1.0/users/{MAIL_FROM}/sendMail`.
|
|
67
|
+
- **SMTP** takes `SMTP_SECURE` as the string `"true"` or `"false"` — implicit TLS
|
|
68
|
+
on 465, STARTTLS otherwise.
|
|
69
|
+
|
|
70
|
+
Send, post or authenticate only as the identity the connection carries
|
|
71
|
+
(`MAIL_FROM`, the granted channel, the granted site). Pin it: read the identity
|
|
72
|
+
from the injected variable, never from user input or a request parameter.
|
|
73
|
+
|
|
74
|
+
**The platform does not enforce this for you.** A Microsoft 365 app registration
|
|
75
|
+
can send as any mailbox in the tenant unless the organisation has added an
|
|
76
|
+
`ApplicationAccessPolicy`, and the platform neither creates nor verifies one. If
|
|
77
|
+
the code you are writing needs to act as anything other than the injected
|
|
78
|
+
identity, stop and raise it with the user rather than implementing it.
|
|
79
|
+
|
|
80
|
+
## Step 4 — Fail loudly when the variables are absent
|
|
81
|
+
|
|
82
|
+
Check for them at startup and fail with a clear message:
|
|
83
|
+
|
|
84
|
+
> No `<system>` connection is injected here. Grant one for this environment, or
|
|
85
|
+
> run against the dev environment.
|
|
86
|
+
|
|
87
|
+
This matters more than it looks. The variables are absent when running locally —
|
|
88
|
+
they exist only on the platform's instances, never on a laptop — and an
|
|
89
|
+
unexplained local failure is exactly what tempts someone into pasting a
|
|
90
|
+
credential.
|
|
91
|
+
|
|
92
|
+
## Step 5 — Put the code where this repository puts things
|
|
93
|
+
|
|
94
|
+
There is no prescribed file. Follow the project's own conventions — `src/mail.ts`,
|
|
95
|
+
`app/services/payments.py`, `internal/slack/`. The platform does not write files
|
|
96
|
+
into the repository and never will.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: syntica-debug
|
|
3
|
-
description: Diagnose a deployed application on Syntica — list running services with status and resource use,
|
|
3
|
+
description: Diagnose a deployed application on Syntica — list running services with status and resource use, search retained logs and read errors from after a crash or restart, tail live output, restart a service. Use when an app deployed to Syntica is down, erroring, returning 500s, crash-looping or behaving unexpectedly, or when the user asks to check logs or restart a service.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Syntica Debug
|
|
@@ -62,9 +62,29 @@ If there are multiple services, ask: "Which service would you like to debug? (<l
|
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
65
|
-
## Step 4 —
|
|
65
|
+
## Step 4 — Read the logs
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
**Start with `app_recent_errors`** unless the user is watching something happen
|
|
68
|
+
right now. It searches *retained* logs across every service, so it works when the
|
|
69
|
+
container has restarted since, and when the node is stopped — which is exactly
|
|
70
|
+
the state an application is in the morning after it broke.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"token": "<token>",
|
|
75
|
+
"applicationId": "<appId>",
|
|
76
|
+
"environment": "<environment>",
|
|
77
|
+
"minutes": 60
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Widen `minutes` if nothing comes back, and use `app_search_logs` when you know
|
|
82
|
+
what you are looking for — a route, an order id, a message from a stack trace.
|
|
83
|
+
Retention only reaches back as far as this application's window, so "nothing
|
|
84
|
+
found" can mean the event is older than the window rather than that it never
|
|
85
|
+
happened. Say which you mean.
|
|
86
|
+
|
|
87
|
+
Then, to follow what is happening **now**, call `app_service_tail_logs` with:
|
|
68
88
|
```json
|
|
69
89
|
{
|
|
70
90
|
"token": "<token>",
|
|
@@ -76,7 +76,7 @@ Enabling a paid environment (staging/production when you only have dev), switchi
|
|
|
76
76
|
|
|
77
77
|
Give the user this link:
|
|
78
78
|
|
|
79
|
-
> **https://app.
|
|
79
|
+
> **https://app.syntica.io/settings/billing**
|
|
80
80
|
|
|
81
81
|
Then tell them what to do there:
|
|
82
82
|
- **Enable staging or production:** open the **"Environments & Backups"** section and enable the environment for your app (a paid add-on on Pay-as-you-go).
|