@syntica/mcp 2.0.0 → 2.1.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 CHANGED
@@ -24,7 +24,7 @@ Use something else when you need autoscaling, high availability, multi-region de
24
24
 
25
25
  - **Node.js 18 or later**
26
26
  - **Claude Code**
27
- - A **Syntica account**. Sign up at [vibetocloud.io](https://vibetocloud.io). The platform is currently in closed beta, so access is granted per organisation.
27
+ - A **Syntica account**. Sign up at [syntica.io](https://syntica.io). The platform is currently in closed beta, so access is granted per organisation.
28
28
  - Your application needs a **`docker-compose.yml`** at the repository root. If you do not have one, the `/syntica-onboard` skill will scaffold it for you.
29
29
 
30
30
  ---
@@ -63,7 +63,7 @@ if it finds no old install.
63
63
  npx @syntica/mcp # run the MCP server on stdio
64
64
  npx @syntica/mcp http # run the streamable HTTP transport
65
65
  npx @syntica/mcp install # install the single-file /vibe skill only (fetches from
66
- # https://app.vibetocloud.io by default; the file it writes
66
+ # https://app.syntica.io by default; the file it writes
67
67
  # is executed by Claude Code, so it refuses any other host
68
68
  # or a downgraded connection unless SYNTICA_ALLOW_INSECURE_SKILL_URL=1
69
69
  # is set (VTC_ALLOW_INSECURE_SKILL_URL also still works, but is
@@ -282,8 +282,8 @@ The published package points at the production API by default and needs no confi
282
282
 
283
283
  ## Links
284
284
 
285
- - Website — [vibetocloud.io](https://vibetocloud.io)
286
- - Application — [app.vibetocloud.io](https://app.vibetocloud.io)
285
+ - Website — [syntica.io](https://syntica.io)
286
+ - Application — [app.syntica.io](https://app.syntica.io)
287
287
 
288
288
  ## License
289
289
 
package/dist/index.js CHANGED
@@ -33132,7 +33132,7 @@ var require_http_exception = __commonJS({
33132
33132
  exports2.HttpException = void 0;
33133
33133
  var shared_utils_1 = require_shared_utils();
33134
33134
  var intrinsic_exception_1 = require_intrinsic_exception();
33135
- var HttpException = class extends intrinsic_exception_1.IntrinsicException {
33135
+ var HttpException2 = class extends intrinsic_exception_1.IntrinsicException {
33136
33136
  /**
33137
33137
  * Instantiate a plain HTTP Exception.
33138
33138
  *
@@ -33241,7 +33241,7 @@ var require_http_exception = __commonJS({
33241
33241
  };
33242
33242
  }
33243
33243
  };
33244
- exports2.HttpException = HttpException;
33244
+ exports2.HttpException = HttpException2;
33245
33245
  }
33246
33246
  });
33247
33247
 
@@ -33967,7 +33967,7 @@ var require_service_unavailable_exception = __commonJS({
33967
33967
  exports2.ServiceUnavailableException = void 0;
33968
33968
  var http_status_enum_1 = require_http_status_enum();
33969
33969
  var http_exception_1 = require_http_exception();
33970
- var ServiceUnavailableException3 = class extends http_exception_1.HttpException {
33970
+ var ServiceUnavailableException4 = class extends http_exception_1.HttpException {
33971
33971
  /**
33972
33972
  * Instantiate a `ServiceUnavailableException` Exception.
33973
33973
  *
@@ -33997,7 +33997,7 @@ var require_service_unavailable_exception = __commonJS({
33997
33997
  super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.SERVICE_UNAVAILABLE), http_status_enum_1.HttpStatus.SERVICE_UNAVAILABLE, httpExceptionOptions);
33998
33998
  }
33999
33999
  };
34000
- exports2.ServiceUnavailableException = ServiceUnavailableException3;
34000
+ exports2.ServiceUnavailableException = ServiceUnavailableException4;
34001
34001
  }
34002
34002
  });
34003
34003
 
@@ -34009,7 +34009,7 @@ var require_unauthorized_exception = __commonJS({
34009
34009
  exports2.UnauthorizedException = void 0;
34010
34010
  var http_status_enum_1 = require_http_status_enum();
34011
34011
  var http_exception_1 = require_http_exception();
34012
- var UnauthorizedException5 = class extends http_exception_1.HttpException {
34012
+ var UnauthorizedException4 = class extends http_exception_1.HttpException {
34013
34013
  /**
34014
34014
  * Instantiate an `UnauthorizedException` Exception.
34015
34015
  *
@@ -34039,7 +34039,7 @@ var require_unauthorized_exception = __commonJS({
34039
34039
  super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNAUTHORIZED), http_status_enum_1.HttpStatus.UNAUTHORIZED, httpExceptionOptions);
34040
34040
  }
34041
34041
  };
34042
- exports2.UnauthorizedException = UnauthorizedException5;
34042
+ exports2.UnauthorizedException = UnauthorizedException4;
34043
34043
  }
34044
34044
  });
34045
34045
 
@@ -55998,6 +55998,7 @@ var StdioServerTransport = class {
55998
55998
  };
55999
55999
 
56000
56000
  // node_modules/.pnpm/@hono+node-server@1.19.12_hono@4.12.10/node_modules/@hono/node-server/dist/index.mjs
56001
+ var import_http = require("http");
56001
56002
  var import_http2 = require("http2");
56002
56003
  var import_http22 = require("http2");
56003
56004
  var import_stream = require("stream");
@@ -57562,6 +57563,133 @@ var UpstreamRequestError = class extends Error {
57562
57563
  }
57563
57564
  };
57564
57565
 
57566
+ // libs/shared/src/types/connector.ts
57567
+ var CONNECTORS = [
57568
+ {
57569
+ id: "microsoft-365",
57570
+ name: "Microsoft 365",
57571
+ category: "Email",
57572
+ tone: "violet",
57573
+ blurb: `"Send mail as a shared mailbox in a customer's Microsoft 365 tenant.\\`,
57574
+ long: "Sends mail through Microsoft Graph using an app registration in the customer's own Entra tenant, so the sending domain, its reputation and the mailbox all stay with them. The application receives four variables at deploy time and calls Graph directly \u2014 two HTTPS requests, no dependency, in any language. Because the registration is theirs, leaving the platform costs nothing: the same variables set anywhere else keep the mail flowing. Pair it with an ApplicationAccessPolicy so the registration can only send as the one shared mailbox, never as anyone in the tenant.",
57575
+ vars: ["GRAPH_TENANT_ID", "GRAPH_CLIENT_ID", "GRAPH_CLIENT_SECRET", "MAIL_FROM"],
57576
+ steps: [
57577
+ "Create a service account or application in the vendor console.",
57578
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57579
+ "Generate a key and hand it to the platform once; it is never shown again."
57580
+ ],
57581
+ docsUrl: "https://learn.microsoft.com/graph/api/user-sendmail"
57582
+ },
57583
+ {
57584
+ id: "smtp",
57585
+ name: "SMTP",
57586
+ category: "Email",
57587
+ tone: "apricot",
57588
+ blurb: "Send mail through any SMTP account \u2014 a hosting provider, or your own server.",
57589
+ long: "The ordinary SMTP path, for the many applications that do not run on Microsoft 365 \u2014 a hosting provider's mailbox, a relay, or your own server. The account stays the customer's; the platform holds the password and injects it at deploy time, so it never reaches the repository. Use the library your language already has: nodemailer, smtplib, whatever is idiomatic. Note that SMTP_SECURE arrives as a string: implicit TLS on 465, STARTTLS everywhere else. Prefer a dedicated send-only mailbox, since with most providers the same password also opens the inbox.",
57590
+ vars: ["SMTP_HOST", "SMTP_PORT", "SMTP_SECURE", "SMTP_USER", "SMTP_PASS", "MAIL_FROM"],
57591
+ steps: [
57592
+ "Create or pick a send-only mailbox with the provider.",
57593
+ "Note the host, port, username and password.",
57594
+ "Prefer a dedicated mailbox: with most providers the same password also grants inbox access."
57595
+ ],
57596
+ docsUrl: "https://nodemailer.com/smtp/"
57597
+ },
57598
+ {
57599
+ id: "microsoft-entra-id",
57600
+ name: "Microsoft Entra ID",
57601
+ category: "Auth",
57602
+ tone: "violet",
57603
+ blurb: "Sign users in with their work account.",
57604
+ long: "Signs an application's end users in against the customer's own Entra tenant, so accounts, password policy and MFA remain theirs and nobody maintains a second user list. The application receives the tenant, the client id, a secret and its redirect URI. What it does NOT receive is a login screen: the variables configure an OIDC client \u2014 an oauth2-proxy sidecar, or your framework's own \u2014 and that piece still has to exist in the application. Creating the app registration needs Application Administrator plus admin consent, which is usually the client's IT rather than the consultant.",
57605
+ vars: ["ENTRA_TENANT_ID", "ENTRA_CLIENT_ID", "ENTRA_CLIENT_SECRET", "ENTRA_REDIRECT_URI"],
57606
+ steps: [
57607
+ "Create a service account or application in the vendor console.",
57608
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57609
+ "Generate a key and hand it to the platform once; it is never shown again."
57610
+ ],
57611
+ docsUrl: "https://learn.microsoft.com/entra/identity-platform/"
57612
+ },
57613
+ {
57614
+ id: "sap-odata",
57615
+ name: "SAP OData",
57616
+ category: "ERP",
57617
+ tone: "blue",
57618
+ blurb: "Read and write SAP business data over an OData service.",
57619
+ long: "Reads and writes business data in SAP through an OData service: sales orders, materials, business partners, whatever the endpoint exposes. This is the connector that turns a hosted app into something a functional consultant can actually deliver, because an application that cannot see the system of record is a demo. OData is self describing, so the service metadata tells you the real entity sets and field names rather than leaving you to guess them. Phase one is public endpoints, meaning S/4HANA Cloud, Sales Cloud and Service Cloud reached over ordinary HTTPS. Anything behind a firewall needs connectivity we do not have yet, and this connector will not reach it.",
57620
+ vars: ["SAP_ODATA_URL", "SAP_CLIENT", "SAP_USER", "SAP_PASSWORD"],
57621
+ steps: [
57622
+ "Create a communication user, or an OAuth client, restricted to the services the application needs.",
57623
+ "Expose the OData service and note its full base URL, up to the service root.",
57624
+ "Note the SAP client number, usually three digits such as 100.",
57625
+ "Give it read-only authorisations unless the application genuinely writes back."
57626
+ ],
57627
+ docsUrl: "https://help.sap.com/docs/SAP_NETWEAVER_750/68bf513362174d54b58cddec28794093/"
57628
+ },
57629
+ {
57630
+ id: "sharepoint",
57631
+ name: "SharePoint",
57632
+ category: "Storage",
57633
+ tone: "violet",
57634
+ blurb: "Read and write documents in a customer\u2019s SharePoint site.",
57635
+ long: "Reads and writes documents in a customer's SharePoint site \u2014 the place most organisations already keep the files an application needs, rather than a bucket nobody governs. Uses a Graph app registration scoped with Sites.Selected and granted access to one site, so the application can reach that library and nothing else in the tenant. Its variables carry the SHAREPOINT_ prefix rather than GRAPH_, because this is a different registration from the mail one and an application commonly holds both.",
57636
+ vars: ["SHAREPOINT_TENANT_ID", "SHAREPOINT_CLIENT_ID", "SHAREPOINT_CLIENT_SECRET", "SHAREPOINT_SITE_ID"],
57637
+ steps: [
57638
+ "Create an app registration in the customer's Entra tenant \u2014 a separate one from mail, since the permissions differ.",
57639
+ "Add the Sites.Selected application permission and grant admin consent.",
57640
+ "Grant that registration access to the specific site, not the whole tenant.",
57641
+ "Create a client secret, and note the site id from the site URL."
57642
+ ],
57643
+ docsUrl: "https://learn.microsoft.com/graph/api/resources/sharepoint"
57644
+ },
57645
+ {
57646
+ id: "microsoft-teams",
57647
+ name: "Microsoft Teams",
57648
+ category: "Messaging",
57649
+ tone: "violet",
57650
+ blurb: "Adaptive cards and alerts in a Teams channel.",
57651
+ long: "Posts messages into a Teams channel through an incoming webhook \u2014 deployment notices, an approval that needs a human, an alert worth interrupting someone for. The webhook URL is the credential: anyone holding it can post to that channel, which is exactly why it belongs in the platform rather than in a repository. One URL is one channel, so an application that posts to two channels holds two connections, the second under a prefix.",
57652
+ vars: ["TEAMS_WEBHOOK_URL"],
57653
+ steps: [
57654
+ "Create a service account or application in the vendor console.",
57655
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57656
+ "Generate a key and hand it to the platform once; it is never shown again."
57657
+ ],
57658
+ docsUrl: "https://learn.microsoft.com/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook"
57659
+ },
57660
+ {
57661
+ id: "slack",
57662
+ name: "Slack",
57663
+ category: "Messaging",
57664
+ tone: "violet",
57665
+ blurb: "Post notifications into a customer\u2019s workspace.",
57666
+ long: "Posts to Slack as a bot, and verifies the requests Slack sends back. The bot token identifies the app, the signing secret proves an incoming webhook really came from Slack, and the channel id is where messages land. Scope the token to the channels it needs: a bot token is not read-only, and one granted broadly can read far more of a workspace than the feature requires.",
57667
+ vars: ["SLACK_BOT_TOKEN", "SLACK_SIGNING_SECRET", "SLACK_CHANNEL_ID"],
57668
+ steps: [
57669
+ "Create a service account or application in the vendor console.",
57670
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57671
+ "Generate a key and hand it to the platform once; it is never shown again."
57672
+ ],
57673
+ docsUrl: "https://api.slack.com/docs"
57674
+ },
57675
+ {
57676
+ id: "stripe",
57677
+ name: "Stripe",
57678
+ category: "Payments",
57679
+ tone: "violet",
57680
+ blurb: "Charges, subscriptions and webhooks.",
57681
+ long: "Takes payments and receives Stripe's webhooks. Three variables: the secret key the server signs calls with, the webhook secret that proves an event is genuinely from Stripe, and the publishable key the browser may safely see. A test key and a live key are two connections, not one \u2014 name them so the difference is obvious, and grant the test one to dev and the live one to production. Verifying the webhook signature is the application's job; the platform supplies the secret, not the check.",
57682
+ vars: ["STRIPE_SECRET_KEY", "STRIPE_WEBHOOK_SECRET", "STRIPE_PUBLISHABLE_KEY"],
57683
+ steps: [
57684
+ "Create a service account or application in the vendor console.",
57685
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57686
+ "Generate a key and hand it to the platform once; it is never shown again."
57687
+ ],
57688
+ docsUrl: "https://docs.stripe.com/api"
57689
+ }
57690
+ ];
57691
+ var CONNECTOR_CATEGORIES = Array.from(new Set(CONNECTORS.map((c) => c.category)));
57692
+
57565
57693
  // libs/shared/src/controllers/health.controller.ts
57566
57694
  var import_common2 = __toESM(require_common2());
57567
57695
 
@@ -57612,12 +57740,12 @@ var AuthPublicKeyCache = class _AuthPublicKeyCache {
57612
57740
  return this.publicKey;
57613
57741
  }
57614
57742
  if (this.publicKey === null && throttled) {
57615
- throw new import_common3.UnauthorizedException("auth-service returned no usable public key");
57743
+ throw new import_common3.ServiceUnavailableException("Cannot verify the session right now: waiting before retrying auth-service");
57616
57744
  }
57617
57745
  const authServiceUrl = process.env["AUTH_SERVICE_URL"] ?? "";
57618
57746
  if (authServiceUrl === "") {
57619
57747
  _AuthPublicKeyCache.logger.error("AUTH_SERVICE_URL is not set \u2014 no JWT can be verified, every user request will 401");
57620
- throw new import_common3.UnauthorizedException("AUTH_SERVICE_URL is not set");
57748
+ throw new import_common3.ServiceUnavailableException("Cannot verify the session: AUTH_SERVICE_URL is not set");
57621
57749
  }
57622
57750
  this.lastFetchAtMs = Date.now();
57623
57751
  let key;
@@ -57658,7 +57786,7 @@ var AuthPublicKeyCache = class _AuthPublicKeyCache {
57658
57786
  return this.publicKey;
57659
57787
  }
57660
57788
  _AuthPublicKeyCache.logger.error(`${reason}; no cached key to fall back to`);
57661
- throw new import_common3.UnauthorizedException("auth-service returned no usable public key");
57789
+ throw new import_common3.ServiceUnavailableException("Cannot verify the session right now: no auth-service public key available");
57662
57790
  }
57663
57791
  /** Parse it rather than pattern-match it: a truncated or corrupted PEM can carry the header and still be unusable. */
57664
57792
  isUsablePublicKey(key) {
@@ -57698,7 +57826,10 @@ var ValidateRequestGuard = class {
57698
57826
  try {
57699
57827
  req.auth = await this.verifyWithRetry(token);
57700
57828
  return true;
57701
- } catch {
57829
+ } catch (err) {
57830
+ if (err instanceof import_common4.HttpException && err.getStatus() === 503) {
57831
+ throw err;
57832
+ }
57702
57833
  throw new import_common4.UnauthorizedException("Invalid or expired token");
57703
57834
  }
57704
57835
  }
@@ -58090,12 +58221,12 @@ var DeployClient = class {
58090
58221
  * a failure just leaves the (low-sensitivity, display-only) name; the person is
58091
58222
  * already gone so there's nothing to retry against.
58092
58223
  */
58093
- async anonymiseBuilds(appIds, triggeredBy) {
58224
+ async anonymiseBuilds(appIds, triggeredBy, userId) {
58094
58225
  try {
58095
58226
  await fetch(`${this.baseUrl}/internal/erase/orgs/builds/anonymise`, {
58096
58227
  method: "POST",
58097
58228
  headers: this.internalHeaders,
58098
- body: JSON.stringify({ appIds, triggeredBy })
58229
+ body: JSON.stringify({ appIds, triggeredBy, userId })
58099
58230
  });
58100
58231
  } catch {
58101
58232
  }
@@ -58590,6 +58721,9 @@ var import_common9 = __toESM(require_common2());
58590
58721
  var import_common10 = __toESM(require_common2());
58591
58722
  var logger = new import_common10.Logger("RateLimiter");
58592
58723
 
58724
+ // libs/shared/src/utils/session-store.ts
58725
+ var import_crypto4 = require("crypto");
58726
+
58593
58727
  // libs/shared/src/notifications/registry.ts
58594
58728
  function v(vars, k) {
58595
58729
  return vars[k] ?? "";
@@ -58769,6 +58903,21 @@ var NOTIFICATION_TYPES = {
58769
58903
  body: (x) => `Your access to the organisation "${v(x, "orgName")}" has been suspended because it is scheduled for deletion.`,
58770
58904
  target: () => null
58771
58905
  },
58906
+ // A developer has asked for a connection on one of their environments. Admins
58907
+ // only, because they are the ones who can act on it — and it is the moment the
58908
+ // governed path either stays faster than pasting a credential, or does not.
58909
+ "connection.requested": {
58910
+ key: "connection.requested",
58911
+ category: "connection",
58912
+ severity: "info",
58913
+ audience: "admins",
58914
+ inAppDefault: true,
58915
+ emailDefault: true,
58916
+ emailTemplateId: "connection-requested",
58917
+ title: (x) => `${v(x, "connectorName")} requested for ${v(x, "applicationName")}`,
58918
+ body: (x) => `${v(x, "requestedBy")} asked for a ${v(x, "connectorName")} connection on ${v(x, "environment")} of "${v(x, "applicationName")}". Grant it from Connections, or decline with a reason they can read.`,
58919
+ target: () => "connections"
58920
+ },
58772
58921
  // Confirmation to the person that their account is scheduled for deletion (userId-targeted).
58773
58922
  "user.erasure.scheduled": {
58774
58923
  key: "user.erasure.scheduled",
@@ -59492,6 +59641,111 @@ var tools5 = [
59492
59641
  { definition: appDeleteConfigTool, handle: handleAppDeleteConfig }
59493
59642
  ];
59494
59643
 
59644
+ // apps/mcp-server/src/tools/connections.ts
59645
+ var appDescribeConnectionsTool = {
59646
+ name: "app_describe_connections",
59647
+ description: "Describe the platform connections granted to an application environment \u2014 mail, storage, databases, payments, AI and the rest of the connector catalogue. Returns each granted connection's connector, its name, and the environment variable NAMES the platform injects at deploy time. Never returns a credential. ALWAYS call this before writing or changing code that talks to an external system: write against the injected variables, never hardcode a credential, and never add a client library that contradicts the granted connector. If nothing is granted, say so and point the user at Connections rather than inventing a path of your own.",
59648
+ annotations: { readOnlyHint: true, destructiveHint: false },
59649
+ inputSchema: {
59650
+ type: "object",
59651
+ properties: {
59652
+ token: { type: "string", description: "JWT session token from org_verify_otp" },
59653
+ applicationId: { type: "string", description: "The application UUID" },
59654
+ environment: {
59655
+ type: "string",
59656
+ enum: [...ENVIRONMENT_NAMES],
59657
+ description: "Environment to describe \u2014 a grant in production does not imply one in dev"
59658
+ }
59659
+ },
59660
+ required: ["token", "applicationId", "environment"]
59661
+ }
59662
+ };
59663
+ async function handleAppDescribeConnections(args) {
59664
+ const token = typeof args["token"] === "string" ? args["token"] : "";
59665
+ if (!token) {
59666
+ return notAuthenticatedResult();
59667
+ }
59668
+ const applicationId = typeof args["applicationId"] === "string" ? args["applicationId"] : "";
59669
+ const environment = typeof args["environment"] === "string" ? args["environment"] : "";
59670
+ try {
59671
+ const url = `${config2.services.applicationServiceUrl}/applications/${encodeURIComponent(applicationId)}/connections?environment=${encodeURIComponent(environment)}`;
59672
+ const res = await fetch(url, { headers: authHeaders(token) });
59673
+ const json = await res.json();
59674
+ if (!res.ok) {
59675
+ return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
59676
+ }
59677
+ return { content: [{ type: "text", text: JSON.stringify({ connections: json.data }, null, 2) }] };
59678
+ } catch (err) {
59679
+ return fromCatch(err);
59680
+ }
59681
+ }
59682
+ var appRequestConnectionTool = {
59683
+ name: "app_request_connection",
59684
+ description: 'Ask an organisation admin for a connection on one application environment. Use this when app_describe_connections returns nothing for the system you need \u2014 instead of asking the user for a credential or telling them to go and configure one. Names a connector from the catalogue (e.g. "smtp", "stripe", "slack"); the admin decides which of their connections satisfies it and is notified in the platform and by email. Repeating a request that is already pending returns the open one rather than queueing another.',
59685
+ annotations: { readOnlyHint: false, destructiveHint: false },
59686
+ inputSchema: {
59687
+ type: "object",
59688
+ properties: {
59689
+ token: { type: "string", description: "JWT session token from org_verify_otp" },
59690
+ applicationId: { type: "string", description: "The application UUID" },
59691
+ environment: {
59692
+ type: "string",
59693
+ enum: [...ENVIRONMENT_NAMES],
59694
+ description: "Environment the connection is needed in"
59695
+ },
59696
+ connectorId: {
59697
+ type: "string",
59698
+ description: 'A connector id as returned by app_describe_connections, e.g. "smtp" or "stripe"'
59699
+ },
59700
+ note: {
59701
+ type: "string",
59702
+ description: "One line on what it is for \u2014 the admin reads this when deciding"
59703
+ }
59704
+ },
59705
+ required: ["token", "applicationId", "environment", "connectorId"]
59706
+ }
59707
+ };
59708
+ async function handleAppRequestConnection(args) {
59709
+ const token = typeof args["token"] === "string" ? args["token"] : "";
59710
+ if (!token) {
59711
+ return notAuthenticatedResult();
59712
+ }
59713
+ const applicationId = typeof args["applicationId"] === "string" ? args["applicationId"] : "";
59714
+ try {
59715
+ const res = await fetch(
59716
+ `${config2.services.applicationServiceUrl}/applications/${encodeURIComponent(applicationId)}/connection-requests`,
59717
+ {
59718
+ method: "POST",
59719
+ headers: { ...authHeaders(token), "Content-Type": "application/json" },
59720
+ body: JSON.stringify({
59721
+ environment: args["environment"],
59722
+ connectorId: args["connectorId"],
59723
+ note: typeof args["note"] === "string" ? args["note"] : ""
59724
+ })
59725
+ }
59726
+ );
59727
+ const json = await res.json();
59728
+ if (!res.ok) {
59729
+ return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
59730
+ }
59731
+ return {
59732
+ content: [
59733
+ { type: "text", text: JSON.stringify(json.data, null, 2) },
59734
+ {
59735
+ type: "text",
59736
+ text: "Requested. An admin has been notified. Write the code against the variables now \u2014 they arrive at the next deploy once the request is granted."
59737
+ }
59738
+ ]
59739
+ };
59740
+ } catch (err) {
59741
+ return fromCatch(err);
59742
+ }
59743
+ }
59744
+ var tools6 = [
59745
+ { definition: appDescribeConnectionsTool, handle: handleAppDescribeConnections },
59746
+ { definition: appRequestConnectionTool, handle: handleAppRequestConnection }
59747
+ ];
59748
+
59495
59749
  // apps/mcp-server/src/tools/database.ts
59496
59750
  var appDbQueryTool = {
59497
59751
  name: "app_db_query",
@@ -59585,7 +59839,7 @@ async function handleAppDbAudit(args) {
59585
59839
  const isError = !res.ok || json.success === false;
59586
59840
  return { content: [{ type: "text", text: JSON.stringify(json) }], isError };
59587
59841
  }
59588
- var tools6 = [
59842
+ var tools7 = [
59589
59843
  { definition: appDbQueryTool, handle: handleAppDbQuery },
59590
59844
  { definition: appDbAuditTool, handle: handleAppDbAudit }
59591
59845
  ];
@@ -59818,7 +60072,7 @@ async function handleOrgDeployCancel(args) {
59818
60072
  }]
59819
60073
  };
59820
60074
  }
59821
- var tools7 = [
60075
+ var tools8 = [
59822
60076
  { definition: orgDeployTool, handle: handleOrgDeploy },
59823
60077
  { definition: orgPromoteTool, handle: handleOrgPromote },
59824
60078
  { definition: orgDeployStatusTool, handle: handleOrgDeployStatus },
@@ -59944,7 +60198,7 @@ function formatLogTail(log) {
59944
60198
  Log${lines.length > 100 ? " (last 100 lines)" : ""}:
59945
60199
  ${tail}`;
59946
60200
  }
59947
- var tools8 = [
60201
+ var tools9 = [
59948
60202
  { definition: appDevSyncTool, handle: handleAppDevSync }
59949
60203
  ];
59950
60204
 
@@ -60083,7 +60337,7 @@ async function handleOrgListGitCredentials(args) {
60083
60337
  return fail({ code: "UPSTREAM_ERROR", message: "Failed to connect to user service", hint: "The user service is unreachable. Retry shortly." });
60084
60338
  }
60085
60339
  }
60086
- var tools9 = [
60340
+ var tools10 = [
60087
60341
  { definition: orgSetupGitCredentialsTool, handle: handleOrgSetupGitCredentials },
60088
60342
  { definition: orgRevokeGitCredentialsTool, handle: handleOrgRevokeGitCredentials },
60089
60343
  { definition: orgListGitCredentialsTool, handle: handleOrgListGitCredentials }
@@ -60212,7 +60466,7 @@ async function handleAppReplaceInstance(args) {
60212
60466
  { confirm }
60213
60467
  );
60214
60468
  }
60215
- var tools10 = [
60469
+ var tools11 = [
60216
60470
  { definition: appRestartInstanceTool, handle: handleAppRestartInstance },
60217
60471
  { definition: appStopInstanceTool, handle: handleAppStopInstance },
60218
60472
  { definition: appStartInstanceTool, handle: handleAppStartInstance },
@@ -60352,7 +60606,7 @@ async function handleAppSetNodeTier(args) {
60352
60606
  }
60353
60607
  return ok({ applicationId, environment, nodeTierId, regionId, status: "set" });
60354
60608
  }
60355
- var tools11 = [
60609
+ var tools12 = [
60356
60610
  { definition: appListNodeTiersTool, handle: handleAppListNodeTiers },
60357
60611
  { definition: appSetNodeTierTool, handle: handleAppSetNodeTier }
60358
60612
  ];
@@ -60454,7 +60708,7 @@ async function handleOrgGetBilling(args) {
60454
60708
  };
60455
60709
  return { content: [{ type: "text", text: JSON.stringify({ success: true, data, error: null }) }] };
60456
60710
  }
60457
- var tools12 = [
60711
+ var tools13 = [
60458
60712
  { definition: orgListMembersTool, handle: handleOrgListMembers },
60459
60713
  { definition: orgListPlansTool, handle: handleOrgListPlans },
60460
60714
  { definition: orgGetSubscriptionTool, handle: handleOrgGetSubscription },
@@ -60491,7 +60745,7 @@ async function handleOrgRefreshToken(args) {
60491
60745
  content: [{ type: "text", text: JSON.stringify({ success: true, data: result, error: null }) }]
60492
60746
  };
60493
60747
  }
60494
- var tools13 = [
60748
+ var tools14 = [
60495
60749
  { definition: orgRefreshTokenTool, handle: handleOrgRefreshToken }
60496
60750
  ];
60497
60751
 
@@ -60735,7 +60989,7 @@ async function handleAppServiceLogs(args) {
60735
60989
  isError: !res.ok
60736
60990
  };
60737
60991
  }
60738
- var tools14 = [
60992
+ var tools15 = [
60739
60993
  { definition: appServicesListTool, handle: handleAppServicesList },
60740
60994
  { definition: appServiceStartTool, handle: handleAppServiceStart },
60741
60995
  { definition: appServiceStopTool, handle: handleAppServiceStop },
@@ -60809,7 +61063,7 @@ async function handleOrgApplyTemplate(args) {
60809
61063
  content: [{ type: "text", text: JSON.stringify({ success: true, data: null, error: null }) }]
60810
61064
  };
60811
61065
  }
60812
- var tools15 = [
61066
+ var tools16 = [
60813
61067
  { definition: orgListTemplatesTool, handle: handleOrgListTemplates },
60814
61068
  { definition: orgApplyTemplateTool, handle: handleOrgApplyTemplate }
60815
61069
  ];
@@ -61017,7 +61271,7 @@ async function handleOrgListGitConnections(args) {
61017
61271
  const connections = await appClient3(token).listGitConnections(orgId);
61018
61272
  return ok2(connections);
61019
61273
  }
61020
- var tools16 = [
61274
+ var tools17 = [
61021
61275
  { definition: appSetUpstreamTool, handle: handleAppSetUpstream },
61022
61276
  { definition: appClearUpstreamTool, handle: handleAppClearUpstream },
61023
61277
  { definition: orgListGitConnectionsTool, handle: handleOrgListGitConnections },
@@ -61218,7 +61472,7 @@ async function handleValidationDeletePrompt(args) {
61218
61472
  }
61219
61473
  return { content: [{ type: "text", text: `Deleted prompt ${id}` }] };
61220
61474
  }
61221
- var tools17 = [
61475
+ var tools18 = [
61222
61476
  { definition: appGetPrevalidationPromptsTool, handle: handleAppGetPrevalidationPrompts },
61223
61477
  { definition: validationGetGenericPromptsTool, handle: handleValidationGetGenericPrompts },
61224
61478
  { definition: validationListPromptsTool, handle: handleValidationListPrompts },
@@ -61230,22 +61484,23 @@ var tools17 = [
61230
61484
  // apps/mcp-server/src/tools/index.ts
61231
61485
  var allTools = [
61232
61486
  ...tools4,
61233
- ...tools13,
61487
+ ...tools14,
61234
61488
  ...tools,
61235
61489
  ...tools3,
61490
+ ...tools13,
61491
+ ...tools10,
61492
+ ...tools17,
61493
+ ...tools2,
61236
61494
  ...tools12,
61237
- ...tools9,
61238
61495
  ...tools16,
61239
- ...tools2,
61240
- ...tools11,
61241
- ...tools15,
61242
- ...tools7,
61243
- ...tools17,
61244
- ...tools5,
61245
- ...tools14,
61246
- ...tools10,
61247
61496
  ...tools8,
61248
- ...tools6
61497
+ ...tools18,
61498
+ ...tools5,
61499
+ ...tools6,
61500
+ ...tools15,
61501
+ ...tools11,
61502
+ ...tools9,
61503
+ ...tools7
61249
61504
  ];
61250
61505
 
61251
61506
  // apps/mcp-server/src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntica/mcp",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Claude Code MCP server and skills for deploying applications on Syntica",
5
5
  "bin": {
6
6
  "syntica-mcp": "./dist/index.js"
@@ -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.0.0",
11
+ "version": "2.1.0",
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 Claude Code — real infrastructure, a live URL, no DevOps required.",
4
- "version": "2.0.0",
4
+ "version": "2.1.0",
5
5
  "mcpServers": {
6
6
  "syntica": {
7
7
  "command": "npx",
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,90 @@
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). Anything else is rejected by
72
+ the vendor, or scoped away by the platform.
73
+
74
+ ## Step 4 — Fail loudly when the variables are absent
75
+
76
+ Check for them at startup and fail with a clear message:
77
+
78
+ > No `<system>` connection is injected here. Grant one for this environment, or
79
+ > run against the dev environment.
80
+
81
+ This matters more than it looks. The variables are absent when running locally —
82
+ they exist only on the platform's instances, never on a laptop — and an
83
+ unexplained local failure is exactly what tempts someone into pasting a
84
+ credential.
85
+
86
+ ## Step 5 — Put the code where this repository puts things
87
+
88
+ There is no prescribed file. Follow the project's own conventions — `src/mail.ts`,
89
+ `app/services/payments.py`, `internal/slack/`. The platform does not write files
90
+ into the repository and never will.
@@ -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.vibetocloud.io/settings/billing**
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).