@sota-io/mcp 1.5.0 → 1.7.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/CLAUDE.md +19 -4
- package/README.md +11 -4
- 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 +324 -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 +11 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/account.d.ts +63 -0
- package/dist/lib/account.d.ts.map +1 -0
- package/dist/lib/account.js +64 -0
- package/dist/lib/account.js.map +1 -0
- package/dist/lib/archive-builder.d.ts +39 -5
- package/dist/lib/archive-builder.d.ts.map +1 -1
- package/dist/lib/archive-builder.js +131 -37
- 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/guide.d.ts +33 -0
- package/dist/lib/guide.d.ts.map +1 -0
- package/dist/lib/guide.js +82 -0
- package/dist/lib/guide.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/ignore.d.ts +16 -0
- package/dist/lib/ignore.d.ts.map +1 -0
- package/dist/lib/ignore.js +131 -0
- package/dist/lib/ignore.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/project-url.d.ts +14 -0
- package/dist/lib/project-url.d.ts.map +1 -0
- package/dist/lib/project-url.js +16 -0
- package/dist/lib/project-url.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/account.d.ts +10 -0
- package/dist/tools/account.d.ts.map +1 -0
- package/dist/tools/account.js +104 -0
- package/dist/tools/account.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 +19 -1
- package/dist/tools/deploy.d.ts.map +1 -1
- package/dist/tools/deploy.js +129 -77
- package/dist/tools/deploy.js.map +1 -1
- package/dist/tools/env.js +2 -2
- package/dist/tools/env.js.map +1 -1
- package/dist/tools/logs.js +1 -1
- package/dist/tools/logs.js.map +1 -1
- package/dist/tools/projects.d.ts +8 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +13 -5
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/status.d.ts.map +1 -1
- package/dist/tools/status.js +8 -3
- package/dist/tools/status.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-app.js","sourceRoot":"","sources":["../src/http-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO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I,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;AACzE,CAAC,CAAC,CAAC;AAEH,8EAA8E;AAC9E,qDAAqD;AACrD,8EAA8E;AAC9E,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAa,EAAE,GAAa,EAAE,EAAE;IAC5C,GAAG,CAAC,IAAI,CAAC;QACP,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,qFAAqF;QAClG,IAAI,EAAE,0CAA0C;QAChD,SAAS,EAAE;YACT,MAAM,EAAE,GAAG,aAAa,SAAS;YACjC,GAAG,EAAE,GAAG,aAAa,MAAM;YAC3B,2BAA2B,EAAE,GAAG,aAAa,uCAAuC;SACrF;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/http.d.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* sota.io MCP Server — HTTP
|
|
3
|
+
* sota.io MCP Server — HTTP entry point (mcp.sota.io).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* and Claude.ai.
|
|
8
|
-
*
|
|
9
|
-
* Phase 57-01 (this file): scaffold + transport + RFC 9728 metadata.
|
|
10
|
-
* Auth is currently a pass-through Bearer API key — clients send their
|
|
11
|
-
* existing sota_xxx key as `Authorization: Bearer <key>` and it gets
|
|
12
|
-
* forwarded to sota-api. No OAuth validation yet.
|
|
13
|
-
*
|
|
14
|
-
* Phase 57-02 (next): OAuth 2.1 + JWT validation against Supabase JWKS,
|
|
15
|
-
* token-to-API-key bridge with `source=claude` audit tagging.
|
|
16
|
-
*
|
|
17
|
-
* Phase 57-03 (next): `create_account` tool for net-new user signup from
|
|
18
|
-
* inside Claude + plan-based capability gating.
|
|
5
|
+
* The Express app lives in http-app.ts so tests can start it on an
|
|
6
|
+
* ephemeral port; this file only binds it.
|
|
19
7
|
*/
|
|
20
8
|
export {};
|
|
21
9
|
//# sourceMappingURL=http.d.ts.map
|
package/dist/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|
package/dist/http.js
CHANGED
|
@@ -1,259 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* sota.io MCP Server — HTTP
|
|
3
|
+
* sota.io MCP Server — HTTP entry point (mcp.sota.io).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* and Claude.ai.
|
|
8
|
-
*
|
|
9
|
-
* Phase 57-01 (this file): scaffold + transport + RFC 9728 metadata.
|
|
10
|
-
* Auth is currently a pass-through Bearer API key — clients send their
|
|
11
|
-
* existing sota_xxx key as `Authorization: Bearer <key>` and it gets
|
|
12
|
-
* forwarded to sota-api. No OAuth validation yet.
|
|
13
|
-
*
|
|
14
|
-
* Phase 57-02 (next): OAuth 2.1 + JWT validation against Supabase JWKS,
|
|
15
|
-
* token-to-API-key bridge with `source=claude` audit tagging.
|
|
16
|
-
*
|
|
17
|
-
* Phase 57-03 (next): `create_account` tool for net-new user signup from
|
|
18
|
-
* inside Claude + plan-based capability gating.
|
|
5
|
+
* The Express app lives in http-app.ts so tests can start it on an
|
|
6
|
+
* ephemeral port; this file only binds it.
|
|
19
7
|
*/
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
24
|
-
import { SotaClient } from '@sota-io/sdk';
|
|
25
|
-
import { registerProjectTools } from './tools/projects.js';
|
|
26
|
-
import { registerDeployTool } from './tools/deploy.js';
|
|
27
|
-
import { registerLogsTool } from './tools/logs.js';
|
|
28
|
-
import { registerEnvTools } from './tools/env.js';
|
|
29
|
-
import { registerRollbackTool } from './tools/rollback.js';
|
|
30
|
-
import { registerStatusTool } from './tools/status.js';
|
|
31
|
-
import { registerDomainTools } from './tools/domains.js';
|
|
32
|
-
import { verifyJwt, JwtVerificationError } from './auth/verify-jwt.js';
|
|
33
|
-
import { getOrProvisionApiKey } from './auth/token-bridge.js';
|
|
34
|
-
import { registerCreateAccountTool } from './tools/create-account.js';
|
|
35
|
-
// Tools that may be invoked WITHOUT authentication. Currently only
|
|
36
|
-
// create_account — net-new users obviously don't have an API key yet.
|
|
37
|
-
// Discovery requests (initialize, tools/list) are also allowed
|
|
38
|
-
// unauthenticated so Claude can fetch capabilities before OAuth.
|
|
39
|
-
const UNAUTHENTICATED_TOOLS = new Set(['create_account']);
|
|
40
|
-
const UNAUTHENTICATED_METHODS = new Set(['initialize', 'notifications/initialized', 'tools/list']);
|
|
41
|
-
function isUnauthenticatedAllowed(body) {
|
|
42
|
-
if (!body || typeof body !== 'object')
|
|
43
|
-
return false;
|
|
44
|
-
const b = body;
|
|
45
|
-
const method = typeof b.method === 'string' ? b.method : '';
|
|
46
|
-
if (UNAUTHENTICATED_METHODS.has(method))
|
|
47
|
-
return true;
|
|
48
|
-
if (method === 'tools/call') {
|
|
49
|
-
const params = (b.params ?? {});
|
|
50
|
-
const name = typeof params.name === 'string' ? params.name : '';
|
|
51
|
-
return UNAUTHENTICATED_TOOLS.has(name);
|
|
52
|
-
}
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
8
|
+
import { app, PUBLIC_ORIGIN } from './http-app.js';
|
|
9
|
+
import { logEvent } from './lib/log.js';
|
|
10
|
+
import { GIT_SHA, PACKAGE_VERSION } from './lib/version.js';
|
|
55
11
|
const PORT = Number(process.env.PORT ?? 8080);
|
|
56
|
-
const SOTA_API_URL = process.env.SOTA_API_URL ?? 'https://api.sota.io';
|
|
57
|
-
const PUBLIC_ORIGIN = process.env.PUBLIC_ORIGIN ?? 'https://mcp.sota.io';
|
|
58
|
-
const AUTH_SERVER = process.env.AUTH_SERVER ?? 'https://auth.sota.io/auth/v1';
|
|
59
|
-
const VERSION = process.env.MCP_SERVER_VERSION ?? '1.4.0-pre';
|
|
60
|
-
const app = express();
|
|
61
|
-
app.use(express.json({ limit: '4mb' }));
|
|
62
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
63
|
-
// /health — Traefik / Docker healthcheck target
|
|
64
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
65
|
-
app.get('/health', (_req, res) => {
|
|
66
|
-
res.json({
|
|
67
|
-
ok: true,
|
|
68
|
-
service: 'sota-mcp',
|
|
69
|
-
version: VERSION,
|
|
70
|
-
transport: 'streamable-http',
|
|
71
|
-
ts: new Date().toISOString(),
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
75
|
-
// RFC 9728 Protected Resource Metadata
|
|
76
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
77
|
-
// MCP clients fetch this BEFORE attempting auth. It points them at the
|
|
78
|
-
// Authorization Server (Supabase) and declares the audience binding.
|
|
79
|
-
// Spec: https://datatracker.ietf.org/doc/html/rfc9728
|
|
80
|
-
// MCP requirement: https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization
|
|
81
|
-
app.get('/.well-known/oauth-protected-resource', (_req, res) => {
|
|
82
|
-
res.json({
|
|
83
|
-
resource: PUBLIC_ORIGIN,
|
|
84
|
-
authorization_servers: [AUTH_SERVER],
|
|
85
|
-
bearer_methods_supported: ['header'],
|
|
86
|
-
resource_documentation: 'https://sota.io/docs/integrations/claude',
|
|
87
|
-
scopes_supported: ['openid', 'profile', 'email'],
|
|
88
|
-
resource_signing_alg_values_supported: ['RS256', 'ES256'],
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
92
|
-
// /mcp — Streamable HTTP transport endpoint
|
|
93
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
94
|
-
// Stateless mode: every request gets a fresh McpServer + transport instance.
|
|
95
|
-
// Adequate for low-traffic; revisit if we see > 100 RPS sustained.
|
|
96
|
-
function unauthorized(res, reason, detail) {
|
|
97
|
-
res
|
|
98
|
-
.status(401)
|
|
99
|
-
.header('WWW-Authenticate', `Bearer realm="${PUBLIC_ORIGIN}", error="${reason}", resource_metadata="${PUBLIC_ORIGIN}/.well-known/oauth-protected-resource"`)
|
|
100
|
-
.json({ error: 'unauthorized', reason, detail });
|
|
101
|
-
}
|
|
102
|
-
async function handleMcpRequest(req, res) {
|
|
103
|
-
// ── 57-02 Auth: OAuth JWT validation + token-to-key bridge ──
|
|
104
|
-
// Accept Bearer <jwt> (Claude/MCP path) OR Bearer <sota_xxx> (testing/CLI path).
|
|
105
|
-
// sota_-prefixed tokens skip JWT validation and pass through directly.
|
|
106
|
-
const authHeader = req.headers.authorization ?? '';
|
|
107
|
-
const rawToken = authHeader.startsWith('Bearer ')
|
|
108
|
-
? authHeader.slice('Bearer '.length).trim()
|
|
109
|
-
: '';
|
|
110
|
-
const startedAt = Date.now();
|
|
111
|
-
const auditMeta = {
|
|
112
|
-
request_id: crypto.randomUUID(),
|
|
113
|
-
started_at: new Date(startedAt).toISOString(),
|
|
114
|
-
};
|
|
115
|
-
// Anonymous path for discovery + create_account. The MCP server is still
|
|
116
|
-
// constructed, but with a "phantom" apiKey that never reaches sota-api
|
|
117
|
-
// (only the create_account tool is registered and it doesn't use SotaClient).
|
|
118
|
-
let apiKey = '';
|
|
119
|
-
const allowAnonymous = !rawToken && isUnauthenticatedAllowed(req.body);
|
|
120
|
-
if (!rawToken && !allowAnonymous) {
|
|
121
|
-
unauthorized(res, 'missing_token', 'Pass Authorization: Bearer <jwt>');
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
if (allowAnonymous) {
|
|
125
|
-
auditMeta.auth_path = 'anonymous';
|
|
126
|
-
apiKey = 'anonymous';
|
|
127
|
-
}
|
|
128
|
-
else if (rawToken.startsWith('sota_')) {
|
|
129
|
-
// Direct API-key path — legacy testing + CLI use, no OAuth involved.
|
|
130
|
-
apiKey = rawToken;
|
|
131
|
-
auditMeta.auth_path = 'direct_api_key';
|
|
132
|
-
auditMeta.key_prefix = rawToken.slice(0, 13);
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
// JWT path — Claude OAuth
|
|
136
|
-
try {
|
|
137
|
-
const claims = await verifyJwt(rawToken);
|
|
138
|
-
auditMeta.auth_path = 'jwt';
|
|
139
|
-
auditMeta.user_id = claims.sub;
|
|
140
|
-
auditMeta.email = claims.email;
|
|
141
|
-
auditMeta.iss = claims.iss;
|
|
142
|
-
const bridge = await getOrProvisionApiKey(claims.sub);
|
|
143
|
-
apiKey = bridge.apiKey;
|
|
144
|
-
auditMeta.key_provisioned = bridge.created;
|
|
145
|
-
auditMeta.key_rotated = bridge.rotated;
|
|
146
|
-
}
|
|
147
|
-
catch (err) {
|
|
148
|
-
if (err instanceof JwtVerificationError) {
|
|
149
|
-
// eslint-disable-next-line no-console
|
|
150
|
-
console.log(JSON.stringify({
|
|
151
|
-
...auditMeta,
|
|
152
|
-
event: 'auth_failed',
|
|
153
|
-
error_code: err.code,
|
|
154
|
-
error_message: err.message,
|
|
155
|
-
}));
|
|
156
|
-
unauthorized(res, err.code, err.message);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
// Database / network problem during bridge — surface as 503, not 401
|
|
160
|
-
// eslint-disable-next-line no-console
|
|
161
|
-
console.error(JSON.stringify({
|
|
162
|
-
...auditMeta,
|
|
163
|
-
event: 'bridge_error',
|
|
164
|
-
error_message: err instanceof Error ? err.message : String(err),
|
|
165
|
-
}));
|
|
166
|
-
res.status(503).json({
|
|
167
|
-
error: 'bridge_unavailable',
|
|
168
|
-
message: 'Could not provision an API key for this Claude session — try again in a moment.',
|
|
169
|
-
});
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
// Build a fresh MCP server per request (stateless mode).
|
|
174
|
-
const server = new McpServer({
|
|
175
|
-
name: 'sota',
|
|
176
|
-
version: VERSION,
|
|
177
|
-
title: 'sota.io',
|
|
178
|
-
});
|
|
179
|
-
// create_account is registered ALWAYS — it's the wedge tool that lets
|
|
180
|
-
// brand-new users sign up from inside Claude before they have an API key.
|
|
181
|
-
registerCreateAccountTool(server);
|
|
182
|
-
// The sota-api-backed tools are only registered when the request carries
|
|
183
|
-
// valid auth. For anonymous requests (initialize / tools/list / tools/call
|
|
184
|
-
// create_account), the user just sees create_account in the catalog.
|
|
185
|
-
if (!allowAnonymous) {
|
|
186
|
-
const client = new SotaClient({ apiKey, baseUrl: SOTA_API_URL });
|
|
187
|
-
registerProjectTools(server, client);
|
|
188
|
-
registerDeployTool(server, client);
|
|
189
|
-
registerLogsTool(server, client);
|
|
190
|
-
registerEnvTools(server, client);
|
|
191
|
-
registerRollbackTool(server, client);
|
|
192
|
-
registerStatusTool(server, client);
|
|
193
|
-
registerDomainTools(server, client);
|
|
194
|
-
}
|
|
195
|
-
// Stateless transport — no session header required.
|
|
196
|
-
const transport = new StreamableHTTPServerTransport({
|
|
197
|
-
sessionIdGenerator: undefined,
|
|
198
|
-
});
|
|
199
|
-
res.on('close', () => {
|
|
200
|
-
transport.close().catch(() => { });
|
|
201
|
-
server.close().catch(() => { });
|
|
202
|
-
});
|
|
203
|
-
try {
|
|
204
|
-
await server.connect(transport);
|
|
205
|
-
await transport.handleRequest(req, res, req.body);
|
|
206
|
-
// Structured audit log per request (Claude path only — direct API key calls don't audit here)
|
|
207
|
-
// eslint-disable-next-line no-console
|
|
208
|
-
console.log(JSON.stringify({
|
|
209
|
-
...auditMeta,
|
|
210
|
-
event: 'mcp_request',
|
|
211
|
-
method: req.body?.method,
|
|
212
|
-
duration_ms: Date.now() - startedAt,
|
|
213
|
-
}));
|
|
214
|
-
}
|
|
215
|
-
catch (err) {
|
|
216
|
-
// eslint-disable-next-line no-console
|
|
217
|
-
console.error(JSON.stringify({
|
|
218
|
-
...auditMeta,
|
|
219
|
-
event: 'mcp_error',
|
|
220
|
-
error_message: err instanceof Error ? err.message : String(err),
|
|
221
|
-
duration_ms: Date.now() - startedAt,
|
|
222
|
-
}));
|
|
223
|
-
if (!res.headersSent) {
|
|
224
|
-
res.status(500).json({
|
|
225
|
-
jsonrpc: '2.0',
|
|
226
|
-
error: { code: -32603, message: err instanceof Error ? err.message : String(err) },
|
|
227
|
-
id: null,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
app.post('/mcp', handleMcpRequest);
|
|
233
|
-
app.get('/mcp', (_req, res) => {
|
|
234
|
-
// GET on /mcp without an active session = 405 Method Not Allowed.
|
|
235
|
-
// (Stateful mode would use GET for the SSE response stream; we're stateless.)
|
|
236
|
-
res.status(405).json({ error: 'method_not_allowed', allowed: 'POST' });
|
|
237
|
-
});
|
|
238
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
239
|
-
// Root index for humans hitting mcp.sota.io directly
|
|
240
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
241
|
-
app.get('/', (_req, res) => {
|
|
242
|
-
res.json({
|
|
243
|
-
service: 'sota-mcp',
|
|
244
|
-
version: VERSION,
|
|
245
|
-
description: 'MCP server for sota.io — EU-native PaaS. Use the Streamable HTTP transport at /mcp.',
|
|
246
|
-
docs: 'https://sota.io/docs/integrations/claude',
|
|
247
|
-
endpoints: {
|
|
248
|
-
health: `${PUBLIC_ORIGIN}/health`,
|
|
249
|
-
mcp: `${PUBLIC_ORIGIN}/mcp`,
|
|
250
|
-
protected_resource_metadata: `${PUBLIC_ORIGIN}/.well-known/oauth-protected-resource`,
|
|
251
|
-
},
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
// ───────────────────────────────────────────────────────────────────────────
|
|
255
12
|
app.listen(PORT, '0.0.0.0', () => {
|
|
256
|
-
|
|
257
|
-
|
|
13
|
+
logEvent('info', {
|
|
14
|
+
event: 'listening',
|
|
15
|
+
version: PACKAGE_VERSION,
|
|
16
|
+
commit: GIT_SHA,
|
|
17
|
+
url: `http://0.0.0.0:${PORT}`,
|
|
18
|
+
public_origin: PUBLIC_ORIGIN,
|
|
19
|
+
});
|
|
258
20
|
});
|
|
259
21
|
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AAE9C,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE;IAC/B,QAAQ,CAAC,MAAM,EAAE;QACf,KAAK,EAAE,WAAW;QAClB,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,OAAO;QACf,GAAG,EAAE,kBAAkB,IAAI,EAAE;QAC7B,aAAa,EAAE,aAAa;KAC7B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,10 @@ import { registerEnvTools } from './tools/env.js';
|
|
|
33
33
|
import { registerRollbackTool } from './tools/rollback.js';
|
|
34
34
|
import { registerStatusTool } from './tools/status.js';
|
|
35
35
|
import { registerDomainTools } from './tools/domains.js';
|
|
36
|
+
import { registerAccountTool, registerChecklistPrompt } from './tools/account.js';
|
|
37
|
+
import { accountReader } from './lib/account.js';
|
|
38
|
+
import { SERVER_INSTRUCTIONS } from './lib/guide.js';
|
|
39
|
+
import { PACKAGE_VERSION } from './lib/version.js';
|
|
36
40
|
async function main() {
|
|
37
41
|
const apiKey = process.env.SOTA_API_KEY;
|
|
38
42
|
if (!apiKey) {
|
|
@@ -42,13 +46,16 @@ async function main() {
|
|
|
42
46
|
}
|
|
43
47
|
const apiURL = process.env.SOTA_API_URL || 'https://api.sota.io';
|
|
44
48
|
const client = new SotaClient({ apiKey, baseUrl: apiURL });
|
|
49
|
+
const readAccount = accountReader(apiURL, apiKey);
|
|
45
50
|
const server = new McpServer({
|
|
46
51
|
name: 'sota',
|
|
47
|
-
version:
|
|
48
|
-
});
|
|
52
|
+
version: PACKAGE_VERSION,
|
|
53
|
+
}, { instructions: SERVER_INSTRUCTIONS });
|
|
49
54
|
// Register all tools
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
registerAccountTool(server, readAccount);
|
|
56
|
+
registerChecklistPrompt(server);
|
|
57
|
+
registerProjectTools(server, client, { readAccount });
|
|
58
|
+
registerDeployTool(server, client, { readAccount });
|
|
52
59
|
registerLogsTool(server, client);
|
|
53
60
|
registerEnvTools(server, client);
|
|
54
61
|
registerRollbackTool(server, client);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB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,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET /v1/account (quick task 261125-mcg): plan limits, usage and the
|
|
3
|
+
* non-sensitive Enterprise facts of the signed-in account. Readable with an
|
|
4
|
+
* API key and with the hosted connector's key. Called directly (not through
|
|
5
|
+
* @sota-io/sdk) so this release does not depend on an unpublished SDK; 105-01
|
|
6
|
+
* moves it into SotaClient.getAccount().
|
|
7
|
+
*/
|
|
8
|
+
export interface AccountPlan {
|
|
9
|
+
name: string;
|
|
10
|
+
max_projects: number;
|
|
11
|
+
max_databases: number;
|
|
12
|
+
max_custom_domains: number;
|
|
13
|
+
max_builds_per_day: number;
|
|
14
|
+
max_memory_mb: number;
|
|
15
|
+
max_cpu_millicores: number;
|
|
16
|
+
max_deploy_bytes: number;
|
|
17
|
+
}
|
|
18
|
+
export interface AccountUsage {
|
|
19
|
+
projects: number;
|
|
20
|
+
max_projects: number;
|
|
21
|
+
databases: number;
|
|
22
|
+
max_databases: number;
|
|
23
|
+
domains: number;
|
|
24
|
+
max_custom_domains: number;
|
|
25
|
+
}
|
|
26
|
+
export interface EnterpriseSummary {
|
|
27
|
+
customer_label: string;
|
|
28
|
+
landing_url: string;
|
|
29
|
+
app_host_pattern: string;
|
|
30
|
+
app_limit: number;
|
|
31
|
+
/** null when the API could not read the app list. */
|
|
32
|
+
apps_used: number | null;
|
|
33
|
+
server_status: string;
|
|
34
|
+
/** not_set_up | saved_untested | verified | unknown */
|
|
35
|
+
sign_in_state: string;
|
|
36
|
+
users_and_access_url: string;
|
|
37
|
+
sign_in_setup_url: string;
|
|
38
|
+
}
|
|
39
|
+
export interface Account {
|
|
40
|
+
user_id: string;
|
|
41
|
+
plan: AccountPlan;
|
|
42
|
+
usage: AccountUsage | null;
|
|
43
|
+
enterprise: EnterpriseSummary | null;
|
|
44
|
+
}
|
|
45
|
+
/** Reads the account; null when the API has no /v1/account (older API). */
|
|
46
|
+
export type AccountReader = () => Promise<Account | null>;
|
|
47
|
+
export declare class AccountReadError extends Error {
|
|
48
|
+
}
|
|
49
|
+
/** Upper bound for the account and project lookups that decorate a tool result. */
|
|
50
|
+
export declare const LOOKUP_TIMEOUT_MS = 3000;
|
|
51
|
+
export declare function accountReader(baseUrl: string, apiKey: string, fetchImpl?: typeof fetch, timeoutMs?: number): AccountReader;
|
|
52
|
+
/**
|
|
53
|
+
* Resolves to the promise's value, or to undefined after timeoutMs or when
|
|
54
|
+
* it rejects. Never throws and never keeps the process alive.
|
|
55
|
+
*/
|
|
56
|
+
export declare function settleWithin<T>(promise: Promise<T>, timeoutMs: number): Promise<T | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Best-effort read for tool results: never throws and gives up after
|
|
59
|
+
* timeoutMs (the deployment has already started; the result must not wait
|
|
60
|
+
* for or fail on this lookup).
|
|
61
|
+
*/
|
|
62
|
+
export declare function tryReadAccount(read?: AccountReader, timeoutMs?: number): Promise<Account | null>;
|
|
63
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/lib/account.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,M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O,CAAC,OAAO,GAAG,IAAI,CAAC,CAGzH"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET /v1/account (quick task 261125-mcg): plan limits, usage and the
|
|
3
|
+
* non-sensitive Enterprise facts of the signed-in account. Readable with an
|
|
4
|
+
* API key and with the hosted connector's key. Called directly (not through
|
|
5
|
+
* @sota-io/sdk) so this release does not depend on an unpublished SDK; 105-01
|
|
6
|
+
* moves it into SotaClient.getAccount().
|
|
7
|
+
*/
|
|
8
|
+
export class AccountReadError extends Error {
|
|
9
|
+
}
|
|
10
|
+
/** Upper bound for the account and project lookups that decorate a tool result. */
|
|
11
|
+
export const LOOKUP_TIMEOUT_MS = 3000;
|
|
12
|
+
export function accountReader(baseUrl, apiKey, fetchImpl = fetch, timeoutMs = LOOKUP_TIMEOUT_MS) {
|
|
13
|
+
const url = `${baseUrl.replace(/\/+$/, '')}/v1/account`;
|
|
14
|
+
return async () => {
|
|
15
|
+
const res = await fetchImpl(url, {
|
|
16
|
+
headers: { Authorization: `Bearer ${apiKey}`, Accept: 'application/json' },
|
|
17
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
18
|
+
});
|
|
19
|
+
if (res.status === 404 || res.status === 405)
|
|
20
|
+
return null;
|
|
21
|
+
if (!res.ok) {
|
|
22
|
+
let detail = '';
|
|
23
|
+
try {
|
|
24
|
+
const body = (await res.json());
|
|
25
|
+
detail = body?.error?.message ?? '';
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// no JSON body
|
|
29
|
+
}
|
|
30
|
+
throw new AccountReadError(`GET /v1/account failed (HTTP ${res.status})${detail ? `: ${detail}` : ''}`);
|
|
31
|
+
}
|
|
32
|
+
const body = (await res.json());
|
|
33
|
+
return body.data ?? null;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Resolves to the promise's value, or to undefined after timeoutMs or when
|
|
38
|
+
* it rejects. Never throws and never keeps the process alive.
|
|
39
|
+
*/
|
|
40
|
+
export async function settleWithin(promise, timeoutMs) {
|
|
41
|
+
let timer;
|
|
42
|
+
const timeout = new Promise((resolve) => {
|
|
43
|
+
timer = setTimeout(() => resolve(undefined), timeoutMs);
|
|
44
|
+
timer.unref?.();
|
|
45
|
+
});
|
|
46
|
+
try {
|
|
47
|
+
return await Promise.race([promise.catch(() => undefined), timeout]);
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
if (timer)
|
|
51
|
+
clearTimeout(timer);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Best-effort read for tool results: never throws and gives up after
|
|
56
|
+
* timeoutMs (the deployment has already started; the result must not wait
|
|
57
|
+
* for or fail on this lookup).
|
|
58
|
+
*/
|
|
59
|
+
export async function tryReadAccount(read, timeoutMs = LOOKUP_TIMEOUT_MS) {
|
|
60
|
+
if (!read)
|
|
61
|
+
return null;
|
|
62
|
+
return (await settleWithin(read(), timeoutMs)) ?? null;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/lib/account.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA8CH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;CAAG;AAE9C,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAEtC,MAAM,UAAU,aAAa,CAC3B,OAAe,EACf,MAAc,EACd,YAA0B,KAAK,EAC/B,YAAoB,iBAAiB;IAErC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC;IACxD,OAAO,KAAK,IAAI,EAAE;QAChB,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE;YAC/B,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,MAAM,EAAE,EAAE,MAAM,EAAE,k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C,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IACvE,CAAC;YAAS,CAAC;QACT,IAAI,KAAK;YAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAoB,EAAE,YAAoB,iBAAiB;IAC9F,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,OAAO,CAAC,MAAM,YAAY,CAAC,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC;AACzD,CAAC"}
|
|
@@ -12,20 +12,32 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Limits (deliberately generous — we want to lean permissive at launch):
|
|
14
14
|
* files: MAX_INLINE_FILES entries, MAX_INLINE_TOTAL_BYTES total
|
|
15
|
-
* git_url: MAX_CLONE_BYTES
|
|
15
|
+
* git_url: MAX_CLONE_BYTES of archived files after `git clone --depth=1`
|
|
16
|
+
*
|
|
17
|
+
* The hosted server (mcp.sota.io) only uses `files`; directory and git_url
|
|
18
|
+
* are local (stdio) modes, see tools/deploy.ts and lib/hosted-guard.ts.
|
|
16
19
|
*
|
|
17
20
|
* Security:
|
|
21
|
+
* - .git, node_modules, .DS_Store and the local/secret env files (.env,
|
|
22
|
+
* .env.local, .env.*.local, .envrc; any depth, any case) are left out
|
|
23
|
+
* of every archive, whatever the mode.
|
|
24
|
+
* - directory deploys honour the root .sotaignore (or, without one, the
|
|
25
|
+
* .gitignore, keeping .env.production and .env.example); git_url
|
|
26
|
+
* deploys honour only a .sotaignore (lib/ignore.ts, 261125-mcg).
|
|
27
|
+
* - git and tar run via execFile (no shell).
|
|
18
28
|
* - Inline file paths are normalised + rejected if they contain ".." or
|
|
19
29
|
* start with "/" or contain NUL.
|
|
20
30
|
* - Symlinks are not honoured for inline files (we only write regular files).
|
|
21
31
|
* - Git clone uses `--depth=1` and `--single-branch` to bound bandwidth.
|
|
22
32
|
* - Both modes write to a fresh /tmp dir which is removed after tar.gz is read.
|
|
23
33
|
*/
|
|
34
|
+
import { type IgnoreRules } from './ignore.js';
|
|
35
|
+
export declare function isExcludedName(name: string): boolean;
|
|
24
36
|
/** Upper bound on inline file count (per single `deploy` call). */
|
|
25
37
|
export declare const MAX_INLINE_FILES = 200;
|
|
26
38
|
/** Upper bound on combined inline content length, in bytes. */
|
|
27
39
|
export declare const MAX_INLINE_TOTAL_BYTES: number;
|
|
28
|
-
/** Upper bound on a cloned git repo size
|
|
40
|
+
/** Upper bound on a cloned git repo, in bytes: the summed size of the files the tree walk would archive (collectEntries), so excluded paths such as .git do not count. */
|
|
29
41
|
export declare const MAX_CLONE_BYTES: number;
|
|
30
42
|
export declare class ArchiveBuilderError extends Error {
|
|
31
43
|
readonly code: string;
|
|
@@ -51,9 +63,31 @@ export declare function archiveFromFiles(files: Record<string, string>): Buffer;
|
|
|
51
63
|
export declare function archiveFromGitUrl(gitUrl: string, gitBranch?: string): Buffer;
|
|
52
64
|
/**
|
|
53
65
|
* Pack an existing local directory into a tar.gz Buffer using the same
|
|
54
|
-
* ignore rules as
|
|
55
|
-
* .env
|
|
56
|
-
* code path for archive construction.
|
|
66
|
+
* ignore rules as every other mode (see isExcludedName: .git, node_modules,
|
|
67
|
+
* .DS_Store and the local/secret .env files). Exported so the deploy tool can re-use a
|
|
68
|
+
* single code path for archive construction.
|
|
57
69
|
*/
|
|
58
70
|
export declare function archiveFromDirectory(dir: string): Buffer;
|
|
71
|
+
/** What a directory deploy packed (for the tool result). */
|
|
72
|
+
export interface DirectoryArchive {
|
|
73
|
+
archive: Buffer;
|
|
74
|
+
/** Number of regular files in the archive. */
|
|
75
|
+
files: number;
|
|
76
|
+
/** ".sotaignore", ".gitignore" or null when neither was found. */
|
|
77
|
+
ignoreFile: string | null;
|
|
78
|
+
}
|
|
79
|
+
export declare function archiveDirectoryWithReport(dir: string): DirectoryArchive;
|
|
80
|
+
/**
|
|
81
|
+
* Walk `root` and return the archive entries ("./rel/path", parents before
|
|
82
|
+
* children) plus the byte size of the regular files. Excluded names are
|
|
83
|
+
* skipped at every depth, and excluded directories are not descended into.
|
|
84
|
+
* Symlinks are archived as links and never followed.
|
|
85
|
+
*/
|
|
86
|
+
export declare function collectEntries(root: string, rules?: IgnoreRules): {
|
|
87
|
+
entries: string[];
|
|
88
|
+
totalBytes: number;
|
|
89
|
+
files: number;
|
|
90
|
+
};
|
|
91
|
+
/** True when tar refused to start because it does not know `--null`. */
|
|
92
|
+
export declare function isUnknownNullOption(err: unknown): boolean;
|
|
59
93
|
//# sourceMappingURL=archive-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-builder.d.ts","sourceRoot":"","sources":["../../src/lib/archive-builder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"archive-builder.d.ts","sourceRoot":"","sources":["../../src/lib/archive-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAcH,OAAO,EAAE,KAAK,WAAW,EAAwC,MAAM,aAAa,CAAC;AAerF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQpD;AAED,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,+DAA+D;AAC/D,eAAO,MAAM,sBAAsB,QAAmB,CAAC;AACvD,0KAA0K;AAC1K,eAAO,MAAM,eAAe,QAAoB,CAAC;AAIjD,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBACV,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAK1C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAsCtE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAA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