@sota-io/mcp 1.5.0 → 1.6.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 +8 -2
- package/dist/auth/token-bridge.d.ts +16 -0
- package/dist/auth/token-bridge.d.ts.map +1 -1
- package/dist/auth/token-bridge.js +49 -9
- package/dist/auth/token-bridge.js.map +1 -1
- package/dist/auth/verify-jwt.js +6 -6
- package/dist/auth/verify-jwt.js.map +1 -1
- package/dist/http-app.d.ts +27 -0
- package/dist/http-app.d.ts.map +1 -0
- package/dist/http-app.js +310 -0
- package/dist/http-app.js.map +1 -0
- package/dist/http.d.ts +3 -15
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +13 -251
- package/dist/http.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/archive-builder.d.ts +25 -5
- package/dist/lib/archive-builder.d.ts.map +1 -1
- package/dist/lib/archive-builder.js +105 -34
- package/dist/lib/archive-builder.js.map +1 -1
- package/dist/lib/auth-config.d.ts +37 -0
- package/dist/lib/auth-config.d.ts.map +1 -0
- package/dist/lib/auth-config.js +95 -0
- package/dist/lib/auth-config.js.map +1 -0
- package/dist/lib/hosted-guard.d.ts +26 -0
- package/dist/lib/hosted-guard.d.ts.map +1 -0
- package/dist/lib/hosted-guard.js +48 -0
- package/dist/lib/hosted-guard.js.map +1 -0
- package/dist/lib/log.d.ts +17 -0
- package/dist/lib/log.d.ts.map +1 -0
- package/dist/lib/log.js +41 -0
- package/dist/lib/log.js.map +1 -0
- package/dist/lib/version.d.ts +22 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/version.js +36 -0
- package/dist/lib/version.js.map +1 -0
- package/dist/oauth-proxy.d.ts +31 -0
- package/dist/oauth-proxy.d.ts.map +1 -0
- package/dist/oauth-proxy.js +212 -0
- package/dist/oauth-proxy.js.map +1 -0
- package/dist/tools/create-account.d.ts.map +1 -1
- package/dist/tools/create-account.js +23 -1
- package/dist/tools/create-account.js.map +1 -1
- package/dist/tools/deploy.d.ts +11 -1
- package/dist/tools/deploy.d.ts.map +1 -1
- package/dist/tools/deploy.js +92 -74
- package/dist/tools/deploy.js.map +1 -1
- package/dist/tools/env.js +1 -1
- package/dist/tools/env.js.map +1 -1
- package/package.json +1 -1
|
@@ -146,13 +146,35 @@ sota.io is an EU-native PaaS hosted in Germany — GDPR-compliant by default, no
|
|
|
146
146
|
}
|
|
147
147
|
// Provision: user_plans (Free tier) + sota_xxx key tagged source=claude
|
|
148
148
|
const result = await provisionPlanAndKey(session.user.id);
|
|
149
|
+
// Deliberately neutral, descriptive content with no instructions
|
|
150
|
+
// directing the LLM or the user to modify any client configuration.
|
|
151
|
+
// Tool responses that prescribe config changes look like prompt-
|
|
152
|
+
// injection attempts and are (correctly) flagged by Claude.ai's
|
|
153
|
+
// safety layer. The user-facing setup guide lives at the docs URL.
|
|
149
154
|
return {
|
|
150
155
|
content: [
|
|
151
156
|
{
|
|
152
157
|
type: "text",
|
|
153
|
-
text:
|
|
158
|
+
text: `Account created on sota.io.
|
|
159
|
+
|
|
160
|
+
- Email: ${session.user.email}
|
|
161
|
+
- Plan: Free tier (3 projects, EU-hosted, no credit card)
|
|
162
|
+
- Region: Germany (Hetzner Cloud)
|
|
163
|
+
- API key (save this — shown once): \`${result.apiKey}\`
|
|
164
|
+
|
|
165
|
+
The API key authenticates the sota.io REST API (api.sota.io) and the sota CLI directly.
|
|
166
|
+
|
|
167
|
+
For Claude connector usage and tool activation, see https://sota.io/docs/integrations/claude .`,
|
|
154
168
|
},
|
|
155
169
|
],
|
|
170
|
+
_meta: {
|
|
171
|
+
// Forward-looking hint per MCP spec — Claude.ai doesn't render
|
|
172
|
+
// a UI for this yet, but if/when it does, sota.io users will
|
|
173
|
+
// get a "Reconnect" affordance automatically. Carries no
|
|
174
|
+
// imperative content directed at the LLM.
|
|
175
|
+
"anthropic.com/connector_reauthentication_suggested": true,
|
|
176
|
+
"anthropic.com/reauth_email": session.user.email,
|
|
177
|
+
},
|
|
156
178
|
};
|
|
157
179
|
}
|
|
158
180
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-account.js","sourceRoot":"","sources":["../../src/tools/create-account.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,8BAA8B,CAAC;AAChF,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC;AAC9D,MAAM,yBAAyB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,EAAE,CAAC;AAO9E,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,WAAW,EAAE;;;;;;;gLAO6J;QAC1K,WAAW,EAAE;YACX,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,KAAK,EAAE;iBACP,QAAQ,CACP,8GAA8G,CAC/G;YACH,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,sHAAsH,CACvH;SACJ;QACD,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,KAAK;YACrB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;QACxB,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAEnD,mEAAmE;QACnE,mEAAmE;QACnE,gDAAgD;QAChD,IAAI,MAAM,uBAAuB,CAAC,eAAe,CAA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KAAK,EAAE,CAAC;gBAC9C,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,oFAAoF;yBAC3F;qBACF;iBACF,CAAC;YACJ,CAAC;YAED,wEAAwE;YACxE,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAE1D,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"create-account.js","sourceRoot":"","sources":["../../src/tools/create-account.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,8BAA8B,CAAC;AAChF,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC;AAC9D,MAAM,yBAAyB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,EAAE,CAAC;AAO9E,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,WAAW,EAAE;;;;;;;gLAO6J;QAC1K,WAAW,EAAE;YACX,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,KAAK,EAAE;iBACP,QAAQ,CACP,8GAA8G,CAC/G;YACH,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,sHAAsH,CACvH;SACJ;QACD,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,KAA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ACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/deploy.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { SotaClient } from '@sota-io/sdk';
|
|
3
|
-
export
|
|
3
|
+
export interface DeployToolOptions {
|
|
4
|
+
/**
|
|
5
|
+
* true for the hosted server (mcp.sota.io): only inline `files` are
|
|
6
|
+
* advertised and accepted. A directory deploy there would pack the
|
|
7
|
+
* sota-mcp container's own filesystem into the caller's project, and a
|
|
8
|
+
* server-side git clone would fetch arbitrary URLs from our network.
|
|
9
|
+
* false (default) for the local stdio server: files, git_url, directory.
|
|
10
|
+
*/
|
|
11
|
+
hosted?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function registerDeployTool(server: McpServer, client: SotaClient, options?: DeployToolOptions): void;
|
|
4
14
|
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/tools/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/tools/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAY1C,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAgDD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,iBAAsB,QAMxG"}
|
package/dist/tools/deploy.js
CHANGED
|
@@ -1,45 +1,110 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { archiveFromDirectory, archiveFromFiles, archiveFromGitUrl, ArchiveBuilderError, MAX_INLINE_FILES, MAX_INLINE_TOTAL_BYTES, MAX_CLONE_BYTES, } from '../lib/archive-builder.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
description: `Deploy an application to sota.io. The platform auto-detects your framework and builds a Docker image automatically:
|
|
3
|
+
import { HOSTED_FILES_ONLY_HINT } from '../lib/hosted-guard.js';
|
|
4
|
+
const INTRO = `Deploy an application to sota.io. The platform auto-detects your framework and builds a Docker image automatically:
|
|
6
5
|
|
|
7
6
|
- Next.js: Detected via next.config.js/ts. Add output: 'standalone' to next.config for optimal builds.
|
|
8
7
|
- Node.js: Detected via package.json with a "start" script. Works with Express, Fastify, Koa, Hapi, etc.
|
|
9
8
|
- Python: Detected via requirements.txt or pyproject.toml. Works with Flask, FastAPI, Django.
|
|
10
|
-
- Custom Dockerfile: If a Dockerfile exists in the project root, it takes priority over auto-detection. Use this for Go, Rust, Java, or any other language. The EXPOSE directive in the Dockerfile is used to detect the app port automatically
|
|
11
|
-
|
|
12
|
-
THREE WAYS to supply the source code — pick EXACTLY ONE:
|
|
13
|
-
|
|
14
|
-
1. **files** (inline source from AI):
|
|
15
|
-
Pass a map of relative paths to UTF-8 text content. Best when you've just
|
|
9
|
+
- Custom Dockerfile: If a Dockerfile exists in the project root, it takes priority over auto-detection. Use this for Go, Rust, Java, or any other language. The EXPOSE directive in the Dockerfile is used to detect the app port automatically.`;
|
|
10
|
+
const FILES_MODE = `Pass a map of relative paths to UTF-8 text content. Best when you've just
|
|
16
11
|
generated a small app in this conversation and want to deploy it without
|
|
17
12
|
any filesystem step. Up to ${MAX_INLINE_FILES} files, ${MAX_INLINE_TOTAL_BYTES / 1024 / 1024} MB total. Include
|
|
18
13
|
the framework manifest (package.json, requirements.txt, or Dockerfile)
|
|
19
|
-
so auto-detection works
|
|
14
|
+
so auto-detection works.`;
|
|
15
|
+
const LOCAL_MODES = `THREE WAYS to supply the source code — pick EXACTLY ONE:
|
|
16
|
+
|
|
17
|
+
1. **files** (inline source from AI):
|
|
18
|
+
${FILES_MODE}
|
|
20
19
|
|
|
21
20
|
2. **git_url** (clone a public repo):
|
|
22
|
-
Pass an https://, git://, ssh://, or git@host:path URL.
|
|
23
|
-
|
|
21
|
+
Pass an https://, git://, ssh://, or git@host:path URL. It is shallow-cloned
|
|
22
|
+
(--depth=1 --single-branch) with the local git and deployed. Optional
|
|
24
23
|
git_branch picks a non-default branch. Only public repos are supported in
|
|
25
24
|
v1. Max ${MAX_CLONE_BYTES / 1024 / 1024} MB after clone.
|
|
26
25
|
|
|
27
26
|
3. **directory** (local filesystem):
|
|
28
|
-
Pass an absolute path.
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
Pass an absolute path. Defaults to the current working directory when
|
|
28
|
+
no other mode is given.`;
|
|
29
|
+
const HOSTED_MODES = `Supply the source code as **files** (inline source from AI):
|
|
30
|
+
${FILES_MODE}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
This hosted server only accepts inline files. ${HOSTED_FILES_ONLY_HINT}`;
|
|
33
|
+
const OUTRO = `IMPORTANT: Your app MUST listen on the PORT environment variable. For auto-detected frameworks (Next.js, Node.js, Python) PORT is 8080. For custom Dockerfiles, the port is auto-detected from the EXPOSE directive (e.g. EXPOSE 3000 sets PORT=3000). If no EXPOSE is found, it defaults to 8080.
|
|
33
34
|
|
|
34
35
|
Every project includes a managed PostgreSQL 17 database. Six environment variables are auto-injected into your container — no manual database configuration needed: DATABASE_URL (full connection string), PGHOST, PGPORT, PGUSER, PGPASSWORD, and PGDATABASE. Libraries that follow libpq conventions (node-postgres, pgx, psycopg2, Django) pick up the PG* variables automatically with no configuration. If your app needs database migrations, run them on startup.
|
|
35
36
|
|
|
36
|
-
Deployments use blue-green strategy for zero downtime. The old container keeps running until the new one passes health checks (60s timeout). Use get-logs to monitor build progress.
|
|
37
|
+
Deployments use blue-green strategy for zero downtime. The old container keeps running until the new one passes health checks (60s timeout). Use get-logs to monitor build progress. .git/, node_modules/, .DS_Store and the local/secret env files .env, .env.local, .env.*.local and .envrc (any directory, any case) are excluded from the archive; set runtime secrets with set-env instead. Committed variants such as .env.production are kept (set-env values are not available at build time).`;
|
|
38
|
+
const FILES_DESCRIPTION = 'Map of relative file paths to UTF-8 text content. Use when generating an app inline (e.g. from a Claude.ai web conversation). Include a framework manifest so auto-detection works.';
|
|
39
|
+
function errorResult(text) {
|
|
40
|
+
return { content: [{ type: 'text', text }], isError: true };
|
|
41
|
+
}
|
|
42
|
+
export function registerDeployTool(server, client, options = {}) {
|
|
43
|
+
if (options.hosted === true) {
|
|
44
|
+
registerHostedDeployTool(server, client);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
registerLocalDeployTool(server, client);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async function uploadArchive(client, projectId, archive, modeDescription) {
|
|
51
|
+
try {
|
|
52
|
+
const deployment = await client.deploy(projectId, archive);
|
|
53
|
+
return {
|
|
54
|
+
content: [
|
|
55
|
+
{
|
|
56
|
+
type: 'text',
|
|
57
|
+
text: `Deployment started (${modeDescription}):\n ID: ${deployment.id}\n Status: ${deployment.status}\n URL: ${deployment.url || 'pending'}\n\nUse get-logs to check build progress.`,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
return errorResult(`Deploy failed during upload: ${error instanceof Error ? error.message : String(error)}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function archiveError(error) {
|
|
67
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
68
|
+
const code = error instanceof ArchiveBuilderError ? ` [${error.code}]` : '';
|
|
69
|
+
return errorResult(`Deploy failed during archive construction${code}: ${detail}`);
|
|
70
|
+
}
|
|
71
|
+
/** Hosted (mcp.sota.io): inline files only. */
|
|
72
|
+
function registerHostedDeployTool(server, client) {
|
|
73
|
+
server.registerTool('deploy', {
|
|
74
|
+
description: `${INTRO}\n\n${HOSTED_MODES}\n\n${OUTRO}`,
|
|
75
|
+
inputSchema: {
|
|
76
|
+
project_id: z.string().describe('Project ID (UUID) to deploy to. Use list-projects to find the ID.'),
|
|
77
|
+
files: z.record(z.string(), z.string()).describe(FILES_DESCRIPTION),
|
|
78
|
+
},
|
|
79
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
80
|
+
}, async (args) => {
|
|
81
|
+
// Defence in depth: http.ts already rejects directory/git_url before the
|
|
82
|
+
// tool runs, and the schema requires files. Never fall back to a
|
|
83
|
+
// directory (process.cwd() is the sota-mcp container itself).
|
|
84
|
+
const { project_id, files } = args;
|
|
85
|
+
if (files === undefined || files === null || typeof files !== 'object') {
|
|
86
|
+
return errorResult(`Error: the hosted server needs \`files\`. ${HOSTED_FILES_ONLY_HINT}`);
|
|
87
|
+
}
|
|
88
|
+
let archive;
|
|
89
|
+
try {
|
|
90
|
+
archive = archiveFromFiles(files);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
return archiveError(error);
|
|
94
|
+
}
|
|
95
|
+
return uploadArchive(client, project_id, archive, `inline files (${Object.keys(files).length} entries)`);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/** Local stdio server (npx @sota-io/mcp): files, git_url or directory. */
|
|
99
|
+
function registerLocalDeployTool(server, client) {
|
|
100
|
+
server.registerTool('deploy', {
|
|
101
|
+
description: `${INTRO}\n\n${LOCAL_MODES}\n\n${OUTRO}`,
|
|
37
102
|
inputSchema: {
|
|
38
103
|
project_id: z.string().describe('Project ID (UUID) to deploy to. Use list-projects to find the ID.'),
|
|
39
104
|
files: z
|
|
40
105
|
.record(z.string(), z.string())
|
|
41
106
|
.optional()
|
|
42
|
-
.describe(
|
|
107
|
+
.describe(`${FILES_DESCRIPTION} Mutually exclusive with git_url and directory.`),
|
|
43
108
|
git_url: z
|
|
44
109
|
.string()
|
|
45
110
|
.optional()
|
|
@@ -51,7 +116,7 @@ Deployments use blue-green strategy for zero downtime. The old container keeps r
|
|
|
51
116
|
directory: z
|
|
52
117
|
.string()
|
|
53
118
|
.optional()
|
|
54
|
-
.describe('Absolute path to a local directory
|
|
119
|
+
.describe('Absolute path to a local directory. Defaults to the current working directory when no other mode is given. Mutually exclusive with files and git_url.'),
|
|
55
120
|
},
|
|
56
121
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
57
122
|
}, async ({ project_id, files, git_url, git_branch, directory }) => {
|
|
@@ -59,79 +124,32 @@ Deployments use blue-green strategy for zero downtime. The old container keeps r
|
|
|
59
124
|
// fall back to directory mode with cwd (legacy CLI behaviour).
|
|
60
125
|
const modesSet = [files !== undefined, git_url !== undefined, directory !== undefined].filter(Boolean).length;
|
|
61
126
|
if (modesSet > 1) {
|
|
62
|
-
return
|
|
63
|
-
content: [
|
|
64
|
-
{
|
|
65
|
-
type: 'text',
|
|
66
|
-
text: 'Error: deploy accepts exactly one of `files`, `git_url`, or `directory`. Pick the mode that matches your environment (files for inline AI-generated code, git_url for a public repo, directory for a local path).',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
isError: true,
|
|
70
|
-
};
|
|
127
|
+
return errorResult('Error: deploy accepts exactly one of `files`, `git_url`, or `directory`. Pick the mode that matches your environment (files for inline AI-generated code, git_url for a public repo, directory for a local path).');
|
|
71
128
|
}
|
|
72
129
|
if (git_branch && !git_url) {
|
|
73
|
-
return
|
|
74
|
-
content: [
|
|
75
|
-
{
|
|
76
|
-
type: 'text',
|
|
77
|
-
text: 'Error: `git_branch` only makes sense together with `git_url`.',
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
isError: true,
|
|
81
|
-
};
|
|
130
|
+
return errorResult('Error: `git_branch` only makes sense together with `git_url`.');
|
|
82
131
|
}
|
|
83
|
-
let
|
|
132
|
+
let archive;
|
|
84
133
|
let modeDescription;
|
|
85
134
|
try {
|
|
86
135
|
if (files !== undefined) {
|
|
87
|
-
|
|
136
|
+
archive = archiveFromFiles(files);
|
|
88
137
|
modeDescription = `inline files (${Object.keys(files).length} entries)`;
|
|
89
138
|
}
|
|
90
139
|
else if (git_url !== undefined) {
|
|
91
|
-
|
|
140
|
+
archive = archiveFromGitUrl(git_url, git_branch);
|
|
92
141
|
modeDescription = `git clone (${git_url}${git_branch ? ` @ ${git_branch}` : ''})`;
|
|
93
142
|
}
|
|
94
143
|
else {
|
|
95
144
|
const dir = directory || process.cwd();
|
|
96
|
-
|
|
145
|
+
archive = archiveFromDirectory(dir);
|
|
97
146
|
modeDescription = `directory (${dir})`;
|
|
98
147
|
}
|
|
99
148
|
}
|
|
100
149
|
catch (error) {
|
|
101
|
-
|
|
102
|
-
const code = error instanceof ArchiveBuilderError ? ` [${error.code}]` : '';
|
|
103
|
-
return {
|
|
104
|
-
content: [
|
|
105
|
-
{
|
|
106
|
-
type: 'text',
|
|
107
|
-
text: `Deploy failed during archive construction${code}: ${detail}`,
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
isError: true,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
try {
|
|
114
|
-
const deployment = await client.deploy(project_id, archiveBuffer);
|
|
115
|
-
return {
|
|
116
|
-
content: [
|
|
117
|
-
{
|
|
118
|
-
type: 'text',
|
|
119
|
-
text: `Deployment started (${modeDescription}):\n ID: ${deployment.id}\n Status: ${deployment.status}\n URL: ${deployment.url || 'pending'}\n\nUse get-logs to check build progress.`,
|
|
120
|
-
},
|
|
121
|
-
],
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
return {
|
|
126
|
-
content: [
|
|
127
|
-
{
|
|
128
|
-
type: 'text',
|
|
129
|
-
text: `Deploy failed during upload: ${error instanceof Error ? error.message : String(error)}`,
|
|
130
|
-
},
|
|
131
|
-
],
|
|
132
|
-
isError: true,
|
|
133
|
-
};
|
|
150
|
+
return archiveError(error);
|
|
134
151
|
}
|
|
152
|
+
return uploadArchive(client, project_id, archive, modeDescription);
|
|
135
153
|
});
|
|
136
154
|
}
|
|
137
155
|
//# sourceMappingURL=deploy.js.map
|
package/dist/tools/deploy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/tools/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,GAChB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/tools/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAahE,MAAM,KAAK,GAAG;;;;;iPAKmO,CAAC;AAElP,MAAM,UAAU,GAAG;;gCAEa,gBAAgB,WAAW,sBAAsB,GAAG,IAAI,GAAG,IAAI;;4BAEnE,CAAC;AAE7B,MAAM,WAAW,GAAG;;;KAGf,UAAU;;;;;;aAMF,eAAe,GAAG,IAAI,GAAG,IAAI;;;;2BAIf,CAAC;AAE5B,MAAM,YAAY,GAAG;KAChB,UAAU;;gDAEiC,sBAAsB,EAAE,CAAC;AAEzE,MAAM,KAAK,GAAG;;;;ueAIyd,CAAC;AAExe,MAAM,iBAAiB,GACrB,qLAAqL,CAAC;AAExL,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE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ChB,mNAAmN,CACpN,CAAC;QACJ,CAAC;QACD,IAAI,UAAU,IAAI,CAAC,OAAO,EAAE,CAAC;YAC3B,OAAO,WAAW,CAAC,+DAA+D,CAAC,CAAC;QACtF,CAAC;QAED,IAAI,OAAe,CAAC;QACpB,IAAI,eAAuB,CAAC;QAC5B,IAAI,CAAC;YACH,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;gBAClC,eAAe,GAAG,iBAAiB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,WAAW,CAAC;YAC1E,CAAC;iBAAM,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBACjC,OAAO,GAAG,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBACjD,eAAe,GAAG,cAAc,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;YACpF,CAAC;iBAAM,CAAC;gBACN,MAAM,GAAG,GAAG,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;gBACvC,OAAO,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC;gBACpC,eAAe,GAAG,cAAc,GAAG,GAAG,CAAC;YACzC,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/tools/env.js
CHANGED
|
@@ -4,7 +4,7 @@ export function registerEnvTools(server, client) {
|
|
|
4
4
|
description: 'Set an environment variable for a project. Variables are encrypted at rest (AES-256-GCM) and injected at container runtime. NOTE: DATABASE_URL, PGHOST, PGPORT, PGUSER, PGPASSWORD, and PGDATABASE are all auto-injected for the managed PostgreSQL database — you do NOT need to set any of them manually. The PORT variable is auto-managed: 8080 for auto-detected frameworks (Next.js, Node.js, Python), or auto-detected from the Dockerfile EXPOSE directive for custom Dockerfile builds. IMPORTANT: Changing env vars does NOT auto-redeploy. You must call deploy or use the redeploy API endpoint to apply changes. For Next.js apps, NEXT_PUBLIC_* variables must be set BEFORE deploying since they are embedded at build time.',
|
|
5
5
|
inputSchema: {
|
|
6
6
|
project_id: z.string().describe('Project ID (UUID)'),
|
|
7
|
-
key: z.string().describe('Environment variable name (e.g.,
|
|
7
|
+
key: z.string().describe('Environment variable name (e.g., REDIS_URL, API_SECRET). Do NOT set DATABASE_URL — it is auto-managed'),
|
|
8
8
|
value: z.string().describe('Environment variable value. Will be encrypted at rest'),
|
|
9
9
|
},
|
|
10
10
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
package/dist/tools/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/tools/env.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,MAAkB;IACpE,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE;QAC7B,WAAW,EAAE,6sBAA6sB;QAC1tB,WAAW,EAAE;YACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YACpD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/tools/env.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,MAAkB;IACpE,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE;QAC7B,WAAW,EAA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,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;KACxG,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QAC1B,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YACrD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACzB,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,+BAA+B;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;YAED,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,MAAM,EAAE,CAAC,CAAC;YACrE,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,2BAA2B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;qBACpD;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,4BAA4B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAC3F;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sota-io/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"mcpName": "io.sota/mcp",
|
|
5
5
|
"description": "MCP server for sota.io — EU-native DevOps PaaS. Deploy web apps via AI agents with managed PostgreSQL, zero-downtime deploys, and automatic HTTPS. Supports Next.js, Node.js, Python, and custom Dockerfiles.",
|
|
6
6
|
"type": "module",
|