basicdeploy-mcp
Advanced tools
+1
-1
| { | ||
| "name": "basicdeploy-mcp", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "MCP server for BasicDeploy - lets AI coding agents deploy and manage containers", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+2
-0
| # BasicDeploy MCP Server | ||
| The persistent runtime your agent deploys to — DB, storage, URL, one MCP call. | ||
| An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that lets AI coding agents — Claude Code, Cursor, and any other MCP client — deploy and manage [BasicDeploy](https://basicdeploy.com) containers directly: create containers, deploy apps from a tarball, run commands, read logs, and share or delete containers. | ||
@@ -4,0 +6,0 @@ |
+5
-2
@@ -126,9 +126,12 @@ // Thin REST client for the BasicDeploy API. | ||
| /** | ||
| * Deploy an app archive to a new container (POST /api/deploy). | ||
| * Deploy an app archive (POST /api/deploy): unpacks into /workspace, detects the | ||
| * runtime and starts the app. Omit containerId to create + deploy a NEW container; | ||
| * pass one to deploy INTO an existing container you own. | ||
| * Returns { message, containerId }. | ||
| */ | ||
| export function deployApp(fileBuffer, filename) { | ||
| export function deployApp(fileBuffer, filename, containerId) { | ||
| const form = new FormData(); | ||
| form.append("file", new Blob([fileBuffer]), filename); | ||
| if (containerId) form.append("containerId", containerId); | ||
| return request("/api/deploy", { method: "POST", body: form }); | ||
| } |
+9
-10
@@ -226,13 +226,12 @@ #!/usr/bin/env node | ||
| if (args.containerId) { | ||
| await api.uploadToContainer(args.containerId, fileBuffer, filename); | ||
| const c = await api.getContainer(args.containerId); | ||
| return text(`Deployed ${filename} into existing container.\n${containerSummary(c)}`); | ||
| } | ||
| const result = await api.deployApp(fileBuffer, filename); | ||
| let summary = `Deployment started (containerId: ${result.containerId}).`; | ||
| // Real deploy pipeline (unpack to /workspace, detect runtime, start): into an | ||
| // existing container when containerId is given, else a fresh one. | ||
| const result = await api.deployApp(fileBuffer, filename, args.containerId); | ||
| const targetId = result.containerId || args.containerId; | ||
| let summary = args.containerId | ||
| ? `Deploying ${filename} into container ${targetId}.` | ||
| : `Deployment started (containerId: ${targetId}).`; | ||
| try { | ||
| const c = await api.getContainer(result.containerId); | ||
| summary = `Deployed ${filename} to a new container.\n${containerSummary(c)}`; | ||
| const c = await api.getContainer(targetId); | ||
| summary = `Deployed ${filename} ${args.containerId ? "into existing container" : "to a new container"}.\n${containerSummary(c)}`; | ||
| } catch { | ||
@@ -239,0 +238,0 @@ // container details may not be readable yet while deployment is in progress |
17921
2.31%381
0.79%78
2.63%