@syntica/mcp 2.6.0 → 2.8.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
CHANGED
|
@@ -68037,6 +68037,24 @@ var UpstreamRequestError = class extends Error {
|
|
|
68037
68037
|
}
|
|
68038
68038
|
};
|
|
68039
68039
|
|
|
68040
|
+
// libs/shared/src/types/connector-network.ts
|
|
68041
|
+
function proxyVars(c) {
|
|
68042
|
+
const g = c?.gateway;
|
|
68043
|
+
if (g === void 0 || g.smtp !== void 0 || g.auth.includes("smtp")) {
|
|
68044
|
+
return null;
|
|
68045
|
+
}
|
|
68046
|
+
const prefix = g.baseUrlVar.replace(/(_BASE)?_URL$/, "");
|
|
68047
|
+
return { user: `${prefix}_PROXY_USER`, password: `${prefix}_PROXY_PASSWORD` };
|
|
68048
|
+
}
|
|
68049
|
+
function directNetworkVars(c) {
|
|
68050
|
+
const vars = proxyVars(c);
|
|
68051
|
+
if (vars === null) {
|
|
68052
|
+
return null;
|
|
68053
|
+
}
|
|
68054
|
+
const prefix = vars.user.slice(0, -"_PROXY_USER".length);
|
|
68055
|
+
return { proxyUrl: `${prefix}_PROXY_URL`, caPem: `${prefix}_CA_PEM` };
|
|
68056
|
+
}
|
|
68057
|
+
|
|
68040
68058
|
// libs/shared/src/types/connector.ts
|
|
68041
68059
|
var CONNECTOR_GATEWAY_HOST = "connectors.internal";
|
|
68042
68060
|
var CONNECTOR_GATEWAY_ORIGIN = `http://${CONNECTOR_GATEWAY_HOST}:9480`;
|
|
@@ -68156,11 +68174,12 @@ var CONNECTORS = [
|
|
|
68156
68174
|
category: "ERP",
|
|
68157
68175
|
tone: "blue",
|
|
68158
68176
|
blurb: "Read and write SAP business data over an OData service.",
|
|
68159
|
-
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.
|
|
68177
|
+
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. It reaches S/4HANA Cloud, Sales Cloud and Service Cloud over ordinary HTTPS, and a system behind your firewall too: in gateway mode a connection can go through your company proxy, use any HTTPS port and trust certificates from your own CA. Plain HTTP is not supported.",
|
|
68160
68178
|
vars: ["SAP_ODATA_URL", "SAP_CLIENT", "SAP_USER", "SAP_PASSWORD"],
|
|
68161
68179
|
steps: [
|
|
68162
68180
|
"Create a communication user restricted to the services you need.",
|
|
68163
|
-
"Expose the OData service and note its root URL.",
|
|
68181
|
+
"Expose the OData service and note its root URL and port.",
|
|
68182
|
+
"Behind a proxy? Add it, with its port, under Network.",
|
|
68164
68183
|
"Note the SAP client number, like 100.",
|
|
68165
68184
|
"Keep it read-only unless the app writes back."
|
|
68166
68185
|
],
|
|
@@ -68169,7 +68188,7 @@ var CONNECTORS = [
|
|
|
68169
68188
|
{ icon: "database", title: "The system of record", line: "Orders, materials, business partners" },
|
|
68170
68189
|
{ icon: "code", title: "Self-describing", line: "The metadata names every entity and field" },
|
|
68171
68190
|
{ icon: "shield", title: "A restricted user", line: "Only the services the app needs" },
|
|
68172
|
-
{ icon: "bolt", title: "
|
|
68191
|
+
{ icon: "bolt", title: "Behind your firewall too", line: "Through your proxy, in gateway mode" }
|
|
68173
68192
|
],
|
|
68174
68193
|
varDescriptions: {
|
|
68175
68194
|
SAP_ODATA_URL: "The service root URL",
|
|
@@ -68187,6 +68206,7 @@ var CONNECTORS = [
|
|
|
68187
68206
|
credentialVars: ["SAP_PASSWORD"],
|
|
68188
68207
|
auth: ["basic"],
|
|
68189
68208
|
basicUserVar: "SAP_USER",
|
|
68209
|
+
probePath: "$metadata",
|
|
68190
68210
|
credentialLocations: { headers: ["authorization"], query: [], form: [] }
|
|
68191
68211
|
}
|
|
68192
68212
|
},
|
|
@@ -68476,6 +68496,10 @@ var CONNECTOR_CATEGORIES = Array.from(new Set(CONNECTORS.filter((c) => c.hidden
|
|
|
68476
68496
|
function connector(id) {
|
|
68477
68497
|
return CONNECTORS.find((c) => c.id === id);
|
|
68478
68498
|
}
|
|
68499
|
+
var DEFAULT_PROFILE = "default";
|
|
68500
|
+
function profileLabel(name, profile) {
|
|
68501
|
+
return profile === DEFAULT_PROFILE ? name : `${name} \xB7 ${profile}`;
|
|
68502
|
+
}
|
|
68479
68503
|
|
|
68480
68504
|
// libs/shared/src/types/custom-integration.ts
|
|
68481
68505
|
var CUSTOM_CONNECTOR_ID = "custom";
|
|
@@ -72887,7 +72911,7 @@ var tools6 = [
|
|
|
72887
72911
|
// apps/mcp-server/src/tools/connections.ts
|
|
72888
72912
|
var appDescribeConnectionsTool = {
|
|
72889
72913
|
name: "app_describe_connections",
|
|
72890
|
-
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 or a vendor host (an AI SDK reads its base URL from OPENAI_BASE_URL, ANTHROPIC_BASE_URL or GOOGLE_GEMINI_BASE_URL), 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. A grant with connectorId "custom" is an integration the organisation defined itself: its custom object gives the hosts and TCP ports it may reach, its credential shape (bearer, basic or a named header) and its variable prefix, so the variables are <PREFIX>_URL, <PREFIX>_TOKEN and, for basic auth, <PREFIX>_USER. Where a connection carries baseUrl, call the vendor through baseUrl.variable, never through another URL variable: in gateway mode only that one reaches the gateway. Use the fallback only when the variable is unset.`,
|
|
72914
|
+
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 ("Stripe \xB7 live" for a named profile, with the profile apart in profile), and the environment variable NAMES the platform injects at deploy time. Never returns a credential. Every profile of one integration injects the same variable names, so a different target per environment (sandbox in dev, live in production) is a profile an admin assigns, never a second integration or environment-specific variable names in the code. ALWAYS call this before writing or changing code that talks to an external system: write against the injected variables, never hardcode a credential or a vendor host (an AI SDK reads its base URL from OPENAI_BASE_URL, ANTHROPIC_BASE_URL or GOOGLE_GEMINI_BASE_URL), 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. A grant with connectorId "custom" is an integration the organisation defined itself: its custom object gives the hosts and TCP ports it may reach, its credential shape (bearer, basic or a named header) and its variable prefix, so the variables are <PREFIX>_URL, <PREFIX>_TOKEN and, for basic auth, <PREFIX>_USER. A connection with a network object reaches its system through a proxy or with its own CA, handled by the gateway: write no proxy or CA code for it. Where a connection carries baseUrl, call the vendor through baseUrl.variable, never through another URL variable: in gateway mode only that one reaches the gateway. Use the fallback only when the variable is unset.`,
|
|
72891
72915
|
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
72892
72916
|
inputSchema: {
|
|
72893
72917
|
type: "object",
|
|
@@ -72917,12 +72941,36 @@ async function handleAppDescribeConnections(args) {
|
|
|
72917
72941
|
if (!res.ok) {
|
|
72918
72942
|
return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
|
|
72919
72943
|
}
|
|
72920
|
-
const connections = Array.isArray(json.data) ? json.data.map(withBaseUrl) : json.data;
|
|
72944
|
+
const connections = Array.isArray(json.data) ? json.data.map((c) => withLabel(withNetwork(withBaseUrl(c)))) : json.data;
|
|
72921
72945
|
return { content: [{ type: "text", text: JSON.stringify({ connections }, null, 2) }] };
|
|
72922
72946
|
} catch (err) {
|
|
72923
72947
|
return fromCatch(err);
|
|
72924
72948
|
}
|
|
72925
72949
|
}
|
|
72950
|
+
function withNetwork(c) {
|
|
72951
|
+
const { caPems, proxyUrl, ...all } = c;
|
|
72952
|
+
const def = typeof c.connectorId === "string" ? connectorOf({ connectorId: c.connectorId, name: typeof c.name === "string" ? c.name : "", custom: c.custom ?? null }) : void 0;
|
|
72953
|
+
const vars = proxyVars(def);
|
|
72954
|
+
const rest = vars !== null && Array.isArray(all.filledVars) ? { ...all, filledVars: all.filledVars.filter((v2) => v2 !== vars.user && v2 !== vars.password) } : all;
|
|
72955
|
+
const count = Array.isArray(caPems) ? caPems.length : 0;
|
|
72956
|
+
if ((proxyUrl ?? null) === null && count === 0) {
|
|
72957
|
+
return rest;
|
|
72958
|
+
}
|
|
72959
|
+
const names = directNetworkVars(def);
|
|
72960
|
+
const directVars = names === null ? [] : [...(proxyUrl ?? null) === null ? [] : [names.proxyUrl], ...count === 0 ? [] : [names.caPem]];
|
|
72961
|
+
return {
|
|
72962
|
+
...rest,
|
|
72963
|
+
network: {
|
|
72964
|
+
proxyUrl: proxyUrl ?? null,
|
|
72965
|
+
caCertificates: count,
|
|
72966
|
+
directModeVariables: directVars,
|
|
72967
|
+
note: "In gateway mode the gateway reaches the upstream through this proxy and trusts these CAs, and the app needs no proxy or CA settings of its own. In direct mode the app gets directModeVariables (prefixed like the others) and must use them itself: the proxy URL holds the proxy user and password, so never log it, and the CA variable holds PEM certificates to trust besides the public roots."
|
|
72968
|
+
}
|
|
72969
|
+
};
|
|
72970
|
+
}
|
|
72971
|
+
function withLabel(c) {
|
|
72972
|
+
return typeof c["name"] === "string" && typeof c["profile"] === "string" ? { ...c, name: profileLabel(c["name"], c["profile"]) } : c;
|
|
72973
|
+
}
|
|
72926
72974
|
function withBaseUrl(c) {
|
|
72927
72975
|
const def = typeof c.connectorId === "string" ? connectorOf({ connectorId: c.connectorId, name: typeof c.name === "string" ? c.name : "", custom: c.custom ?? null }) : void 0;
|
|
72928
72976
|
if (def?.gateway === void 0 || def.vars.includes(def.gateway.baseUrlVar)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntica/mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "MCP server and skills for deploying applications on Syntica from your coding agent (Claude Code, OpenCode, Codex CLI, Gemini CLI, Copilot CLI, Cursor)",
|
|
5
5
|
"mcpName": "io.syntica/mcp",
|
|
6
6
|
"bin": {
|
|
@@ -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.
|
|
4
|
+
"version": "2.8.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Syntica",
|
|
7
7
|
"email": "support@syntica.io",
|
|
@@ -34,6 +34,17 @@ Note the names carefully. A grant may carry a **prefix**, so a second mailbox
|
|
|
34
34
|
arrives as `SUPPORT_SMTP_HOST` rather than `SMTP_HOST`. Use exactly what the tool
|
|
35
35
|
returns.
|
|
36
36
|
|
|
37
|
+
An integration can have several **profiles** ("sandbox", "live"), each with its
|
|
38
|
+
own URL, credentials, network settings and cloud account. `name` reads
|
|
39
|
+
"Stripe · live" for a named profile, with the profile apart in `profile`; a plain
|
|
40
|
+
name is the "default" profile. Every profile of one integration injects the
|
|
41
|
+
**same variable names**, so the code you write against dev's "sandbox" runs
|
|
42
|
+
unchanged in production once an admin assigns "live" there. Never derive
|
|
43
|
+
variable names from the environment (`TEST_DEV_URL`, `TEST_MAIN_URL`), and never
|
|
44
|
+
ask for a second integration to reach a different target per environment: that
|
|
45
|
+
is a profile an admin adds and assigns under Connections. Which profile an
|
|
46
|
+
environment holds is nothing the code reads or branches on.
|
|
47
|
+
|
|
37
48
|
A connection to an HTTP API, such as OpenAI or Anthropic, may also carry
|
|
38
49
|
`baseUrl`: the variable to call the vendor through, such as `OPENAI_BASE_URL`.
|
|
39
50
|
A grant with `connectorId: "custom"` is an integration the organisation defined
|
|
@@ -41,6 +52,13 @@ itself; its `custom` object says which hosts and ports it reaches and how it
|
|
|
41
52
|
authenticates (see "Custom integrations" below).
|
|
42
53
|
Its names are unprefixed like the others, so apply the grant's prefix to both
|
|
43
54
|
`baseUrl.variable` and `baseUrl.fallbackVariable`.
|
|
55
|
+
A connection with a `network` object reaches its system through a proxy, on another
|
|
56
|
+
port or with the organisation's own CA. In gateway mode the gateway handles all of
|
|
57
|
+
that: write no proxy or CA code for it, call `baseUrl.variable` as usual. In direct
|
|
58
|
+
mode the app gets `network.directModeVariables` (prefixed like the others) and must
|
|
59
|
+
use them itself: `<PREFIX>_PROXY_URL` is the proxy with its user and password in it,
|
|
60
|
+
so never log it, and `<PREFIX>_CA_PEM` holds PEM certificates to trust on top of the
|
|
61
|
+
public roots. Read both when set, so the same code works in either mode.
|
|
44
62
|
|
|
45
63
|
## Step 2 — If nothing is granted, stop and say so
|
|
46
64
|
|
|
@@ -56,6 +74,12 @@ platform and by email, and decides which of their connections satisfies it. Then
|
|
|
56
74
|
write the code against the variable names the connector declares — they arrive at
|
|
57
75
|
the next deploy once it is granted.
|
|
58
76
|
|
|
77
|
+
A system that **is** granted but points at the wrong target for this environment
|
|
78
|
+
(production still on a vendor's sandbox) is not a missing connection. It is a
|
|
79
|
+
profile change: an admin adds or switches the profile on this app environment
|
|
80
|
+
under Connections. Do not request a second connection for it, and do not change
|
|
81
|
+
the variable names in the code.
|
|
82
|
+
|
|
59
83
|
Do **not** install a client library speculatively, invent variable names, or ask
|
|
60
84
|
for credentials. A grant deliberately absent in `dev` usually means someone
|
|
61
85
|
decided a preview must not touch the real system, so say what you are about to
|
|
@@ -166,6 +190,12 @@ at api.partner.example (HTTPS, bearer token, base URL https://api.partner.exampl
|
|
|
166
190
|
to fetch order status". Then write the code against `<PREFIX>_URL` /
|
|
167
191
|
`<PREFIX>_TOKEN` with the prefix the admin confirms.
|
|
168
192
|
|
|
193
|
+
When the organisation already has the integration and this environment only
|
|
194
|
+
needs another endpoint or credential of the same partner (their test system for
|
|
195
|
+
dev, the live one for production), say so in the purpose line: the admin then adds
|
|
196
|
+
a profile to the existing integration instead of a new one, and the prefix and
|
|
197
|
+
variable names stay the same.
|
|
198
|
+
|
|
169
199
|
## Step 4 — Fail loudly when the variables are absent
|
|
170
200
|
|
|
171
201
|
Check for them at startup and fail with a clear message:
|