@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.
Files changed (81) hide show
  1. package/CLAUDE.md +19 -4
  2. package/README.md +11 -4
  3. package/dist/auth/token-bridge.d.ts +16 -0
  4. package/dist/auth/token-bridge.d.ts.map +1 -1
  5. package/dist/auth/token-bridge.js +49 -9
  6. package/dist/auth/token-bridge.js.map +1 -1
  7. package/dist/auth/verify-jwt.js +6 -6
  8. package/dist/auth/verify-jwt.js.map +1 -1
  9. package/dist/http-app.d.ts +27 -0
  10. package/dist/http-app.d.ts.map +1 -0
  11. package/dist/http-app.js +324 -0
  12. package/dist/http-app.js.map +1 -0
  13. package/dist/http.d.ts +3 -15
  14. package/dist/http.d.ts.map +1 -1
  15. package/dist/http.js +13 -251
  16. package/dist/http.js.map +1 -1
  17. package/dist/index.js +11 -4
  18. package/dist/index.js.map +1 -1
  19. package/dist/lib/account.d.ts +63 -0
  20. package/dist/lib/account.d.ts.map +1 -0
  21. package/dist/lib/account.js +64 -0
  22. package/dist/lib/account.js.map +1 -0
  23. package/dist/lib/archive-builder.d.ts +39 -5
  24. package/dist/lib/archive-builder.d.ts.map +1 -1
  25. package/dist/lib/archive-builder.js +131 -37
  26. package/dist/lib/archive-builder.js.map +1 -1
  27. package/dist/lib/auth-config.d.ts +37 -0
  28. package/dist/lib/auth-config.d.ts.map +1 -0
  29. package/dist/lib/auth-config.js +95 -0
  30. package/dist/lib/auth-config.js.map +1 -0
  31. package/dist/lib/guide.d.ts +33 -0
  32. package/dist/lib/guide.d.ts.map +1 -0
  33. package/dist/lib/guide.js +82 -0
  34. package/dist/lib/guide.js.map +1 -0
  35. package/dist/lib/hosted-guard.d.ts +26 -0
  36. package/dist/lib/hosted-guard.d.ts.map +1 -0
  37. package/dist/lib/hosted-guard.js +48 -0
  38. package/dist/lib/hosted-guard.js.map +1 -0
  39. package/dist/lib/ignore.d.ts +16 -0
  40. package/dist/lib/ignore.d.ts.map +1 -0
  41. package/dist/lib/ignore.js +131 -0
  42. package/dist/lib/ignore.js.map +1 -0
  43. package/dist/lib/log.d.ts +17 -0
  44. package/dist/lib/log.d.ts.map +1 -0
  45. package/dist/lib/log.js +41 -0
  46. package/dist/lib/log.js.map +1 -0
  47. package/dist/lib/project-url.d.ts +14 -0
  48. package/dist/lib/project-url.d.ts.map +1 -0
  49. package/dist/lib/project-url.js +16 -0
  50. package/dist/lib/project-url.js.map +1 -0
  51. package/dist/lib/version.d.ts +22 -0
  52. package/dist/lib/version.d.ts.map +1 -0
  53. package/dist/lib/version.js +36 -0
  54. package/dist/lib/version.js.map +1 -0
  55. package/dist/oauth-proxy.d.ts +31 -0
  56. package/dist/oauth-proxy.d.ts.map +1 -0
  57. package/dist/oauth-proxy.js +212 -0
  58. package/dist/oauth-proxy.js.map +1 -0
  59. package/dist/tools/account.d.ts +10 -0
  60. package/dist/tools/account.d.ts.map +1 -0
  61. package/dist/tools/account.js +104 -0
  62. package/dist/tools/account.js.map +1 -0
  63. package/dist/tools/create-account.d.ts.map +1 -1
  64. package/dist/tools/create-account.js +23 -1
  65. package/dist/tools/create-account.js.map +1 -1
  66. package/dist/tools/deploy.d.ts +19 -1
  67. package/dist/tools/deploy.d.ts.map +1 -1
  68. package/dist/tools/deploy.js +129 -77
  69. package/dist/tools/deploy.js.map +1 -1
  70. package/dist/tools/env.js +2 -2
  71. package/dist/tools/env.js.map +1 -1
  72. package/dist/tools/logs.js +1 -1
  73. package/dist/tools/logs.js.map +1 -1
  74. package/dist/tools/projects.d.ts +8 -1
  75. package/dist/tools/projects.d.ts.map +1 -1
  76. package/dist/tools/projects.js +13 -5
  77. package/dist/tools/projects.js.map +1 -1
  78. package/dist/tools/status.d.ts.map +1 -1
  79. package/dist/tools/status.js +8 -3
  80. package/dist/tools/status.js.map +1 -1
  81. package/package.json +1 -1
@@ -1,11 +1,14 @@
1
1
  import { z } from 'zod';
2
- export function registerProjectTools(server, client) {
2
+ import { projectUrl } from '../lib/project-url.js';
3
+ import { tryReadAccount } from '../lib/account.js';
4
+ import { enterpriseNextSteps } from './account.js';
5
+ export function registerProjectTools(server, client, options = {}) {
3
6
  server.registerTool('list-projects', {
4
- description: 'List all projects on your sota.io account. sota.io is an EU-native DevOps PaaS hosted in Germany (GDPR-compliant). Each project gets a live URL at {slug}.sota.io with automatic HTTPS, a managed PostgreSQL 17 database (DATABASE_URL auto-injected), PgBouncer connection pooling, daily backups, zero-downtime blue-green deployments, gVisor container isolation, and custom domain support (up to 5 per project with automatic HTTPS).',
7
+ description: 'List all projects on your sota.io account. sota.io is an EU-native DevOps PaaS hosted in Germany (GDPR-compliant). Each project gets one live URL with automatic HTTPS (https://{slug}.sota.io, or https://{app}.{label}.sota.io behind the company sign-in on a sota Enterprise account; always show the URL this tool returns), a managed PostgreSQL 17 database created on the first deploy (DATABASE_URL auto-injected), PgBouncer connection pooling, daily backups, zero-downtime blue-green deployments, gVisor container isolation, and custom domain support (up to 5 per project with automatic HTTPS).',
5
8
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
6
9
  }, async () => {
7
10
  const { projects } = await client.listProjects();
8
- const lines = projects.map((p) => `${p.name} (${p.slug}) - ID: ${p.id}`);
11
+ const lines = projects.map((p) => `${p.name} (${p.slug}) - ID: ${p.id} - ${projectUrl(p)}`);
9
12
  return {
10
13
  content: [
11
14
  {
@@ -18,7 +21,7 @@ export function registerProjectTools(server, client) {
18
21
  };
19
22
  });
20
23
  server.registerTool('create-project', {
21
- description: 'Create a new project on sota.io. Each project automatically provisions: (1) a managed PostgreSQL 17 database accessible via the DATABASE_URL environment variable (auto-injected, no configuration needed), (2) PgBouncer connection pooling (pool size 20, max 100 clients), (3) automatic daily database backups with 7-day retention, (4) a live URL at https://{slug}.sota.io with automatic HTTPS via Let\'s Encrypt. The project slug is auto-generated from the name (lowercase, hyphens, max 63 chars) and is immutable after creation. Supported frameworks: Next.js, Node.js (Express/Fastify/Koa), Python (Flask/FastAPI/Django), or any language via custom Dockerfile. You can also add up to 5 custom domains per project with automatic HTTPS (via API: POST /v1/projects/:id/domains with {domain: "yourdomain.com"}). DNS: A record to 23.88.45.28 for apex domains, CNAME to {slug}.sota.io for subdomains.\n\nOptionally associate the project with a public git repository at create-time by passing `git_url` (and optional `git_branch`). The association is informational — it shows up in the dashboard and the `sota deploy --git` CLI flag can default to it — but does NOT enable auto-deploy-on-push yet.',
24
+ description: 'Create a new project on sota.io. Call get-account first: on a sota Enterprise account the project gets the slug "<label>-<name>" and the one URL https://<name>.<label>.sota.io behind the company\'s Microsoft 365 sign-in, counts against the account\'s app limit and runs on the company\'s own server; otherwise the URL is https://{slug}.sota.io and the app is public. The slug is generated from the name (lowercase, hyphens, max 63 chars) and cannot be changed. The first deploy creates a managed PostgreSQL 17 database (DATABASE_URL auto-injected, through PgBouncer in transaction mode) with daily backups kept 7 days. Supported: Next.js, Node.js, Python, or any language with a Dockerfile. Custom domains (not on Enterprise yet): up to 5 per project via the domain tools.\n\nOptionally associate the project with a public git repository at create-time by passing `git_url` (and optional `git_branch`). The association is informational: it shows up in the dashboard and the `sota deploy --git` CLI flag can default to it, but it does NOT deploy on push.',
22
25
  inputSchema: {
23
26
  name: z.string().describe('Name for the new project. A URL slug will be auto-generated (e.g. "My Cool App" becomes my-cool-app.sota.io)'),
24
27
  git_url: z.string().optional().describe('Optional git repository URL to associate with this project (https://, git://, ssh://, or git@host:path). Informational only — does not trigger an automatic deploy.'),
@@ -34,11 +37,16 @@ export function registerProjectTools(server, client) {
34
37
  const gitLine = project.git_url
35
38
  ? `\n Git: ${project.git_url}${project.git_branch ? ` @ ${project.git_branch}` : ''}`
36
39
  : '';
40
+ let text = `Project created:\n Name: ${project.name}\n Slug: ${project.slug}\n ID: ${project.id}\n URL: ${projectUrl(project)}${gitLine}`;
41
+ const account = await tryReadAccount(options.readAccount, options.lookupTimeoutMs);
42
+ if (account?.enterprise) {
43
+ text += `\n\nThis is a sota Enterprise app: follow the Enterprise contract from get-account (no own login, identity headers, GET /health and GET / answer without identity).\n\n${enterpriseNextSteps(account, projectUrl(project))}`;
44
+ }
37
45
  return {
38
46
  content: [
39
47
  {
40
48
  type: 'text',
41
- text: `Project created:\n Name: ${project.name}\n Slug: ${project.slug}\n ID: ${project.id}\n URL: https://${project.slug}.sota.io${gitLine}`,
49
+ text,
42
50
  },
43
51
  ],
44
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAkB;IACxE,MAAM,CAAC,YAAY,CAAC,eAAe,EAAE;QACnC,WAAW,EAAE,6aAA6a;QAC1b,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;KACxG,EAAE,KAAK,IAAI,EAAE;QACZ,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CACxB,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,EAAE,EAAE,CAC7C,CAAC;QACF,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC;wBACzB,CAAC,CAAC,sDAAsD;wBACxD,CAAC,CAAC,cAAc,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;iBACrC;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,YAAY,CAAC,gBAAgB,EAAE;QACpC,WAAW,EAAE,uqCAAuqC;QACprC,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pD;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,kBAAkB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBACjF;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,QAiEvE"}
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,QAwEvE"}
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export function registerStatusTool(server, client) {
3
3
  server.registerTool('get-status', {
4
- description: 'Get the current deployment status for a project, including the live URL (https://{slug}.sota.io), detected framework, and recent deployment history. Deployment statuses: pending (queued), building (build in progress), built (image ready), deploying (starting container + health checks), running (live and healthy), failed (build or health check error), stopped (replaced by newer deployment). Use this to verify a deployment succeeded after calling deploy.',
4
+ description: 'Get the current deployment status for a project, including the live host (the project URL from list-projects: https://{slug}.sota.io, or https://{app}.{label}.sota.io on a sota Enterprise account), detected framework, the reason of a failed deployment, and recent deployment history. Deployment statuses: pending (queued), building (build in progress), built (image ready), deploying (starting container + health checks), running (live and healthy), failed (build or health check error), stopped (replaced by newer deployment). Use this to verify a deployment succeeded after calling deploy.',
5
5
  inputSchema: {
6
6
  project_id: z.string().describe('Project ID (UUID) to check status for. Use list-projects to find the ID'),
7
7
  },
@@ -30,8 +30,13 @@ export function registerStatusTool(server, client) {
30
30
  if (latest.framework) {
31
31
  lines.push(` Framework: ${latest.framework}`);
32
32
  }
33
- if (latest.error) {
34
- lines.push(` Error: ${latest.error}`);
33
+ // The API sends error_message; older SDK types call it error.
34
+ const failure = latest.error_message ?? latest.error;
35
+ if (failure) {
36
+ lines.push(` Error: ${failure}`);
37
+ }
38
+ if (latest.status === 'failed' && failure && /health check/i.test(failure)) {
39
+ lines.push(' Hint: the app did not answer GET /health (or GET / when /health is 404) with 2xx/3xx within 60 s. It must listen on 0.0.0.0:$PORT and answer these paths WITHOUT identity headers (sota Enterprise: do not return 401 there). The previous version, if any, keeps running.');
35
40
  }
36
41
  if (deployments.length > 1) {
37
42
  lines.push('', 'Recent deployments:');
@@ -1 +1 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,MAAkB;IACtE,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE;QAChC,WAAW,EAAE,0cAA0c;QACvd,WAAW,EAAE;YACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;SAC3G;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,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,WAAW,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C,IAAI,CAAC;qBACvB;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,yBAAyB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBACxF;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.5.0",
3
+ "version": "1.7.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",