🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

basicdeploy-mcp

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basicdeploy-mcp - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+1
-1
package.json
{
"name": "basicdeploy-mcp",
"version": "1.0.1",
"version": "1.0.2",
"description": "MCP server for BasicDeploy - lets AI coding agents deploy and manage containers",

@@ -5,0 +5,0 @@ "type": "module",

@@ -76,6 +76,33 @@ // Thin REST client for the BasicDeploy API.

export function createContainer() {
return request("/api/containers", { method: "POST" });
export function createContainer(memoryBytes, alwaysOn) {
const body = {};
if (memoryBytes != null) body.memoryBytes = memoryBytes;
if (alwaysOn != null) body.alwaysOn = alwaysOn;
return request("/api/containers", {
method: "POST",
...(Object.keys(body).length ? { body } : {}),
});
}
/**
* Toggle a container's always-on flag (POST /api/containers/{id}/always-on).
* On FREE this consumes a paid add-on slot (402 if none free); on PRO/SCALE it is
* a no-op (already always-on). Returns the updated container.
*/
export function setAlwaysOn(containerId, enabled) {
return request(`/api/containers/${encodeURIComponent(containerId)}/always-on`, {
method: "POST",
body: { enabled },
});
}
/**
* The account's plan, limits and add-ons (GET /api/auth/me): plan tier, container
* limit (base + add-ons), selectable memory sizes, storage limit, and how many
* always-on add-ons are held.
*/
export function getAccount() {
return request("/api/auth/me");
}
export function getContainer(containerId) {

@@ -82,0 +109,0 @@ return request(`/api/containers/${encodeURIComponent(containerId)}`);

@@ -42,3 +42,42 @@ #!/usr/bin/env node

"provisioned automatically for it. Returns the container's id, subdomain, and public URL. " +
"Use deploy_app or exec_command afterwards to put an application in it.",
"Use deploy_app or exec_command afterwards to put an application in it. Optional memoryMb " +
"(256/512/1024/2048) and alwaysOn require the plan/add-ons to allow them (see get_account); " +
"larger sizes need Pro/Scale, and always-on on Free consumes a paid add-on slot.",
inputSchema: {
type: "object",
properties: {
memoryMb: {
type: "number",
description: "Memory for the container in MB: 256, 512, 1024, or 2048. Defaults to the plan's default.",
},
alwaysOn: {
type: "boolean",
description: "Keep the container running 24/7 (never auto-sleep). On Free this uses a paid add-on slot.",
},
},
additionalProperties: false,
},
},
{
name: "set_always_on",
description:
"Turn a container's always-on (24/7, never sleeps) flag on or off. On Free this consumes a " +
"paid always-on add-on slot (fails if none is free); on Pro/Scale every container is always-on " +
"already. Returns the updated container.",
inputSchema: {
type: "object",
properties: {
containerId: { type: "string", description: "The container's UUID." },
enabled: { type: "boolean", description: "true to enable always-on, false to disable." },
},
required: ["containerId", "enabled"],
additionalProperties: false,
},
},
{
name: "get_account",
description:
"Show the account's plan and capabilities: plan tier, container limit (plan base + add-ons), " +
"the memory sizes you may select, storage limit, how many always-on add-ons you hold, and " +
"whether containers auto-sleep. Use this to see what you're allowed to set.",
inputSchema: { type: "object", properties: {}, additionalProperties: false },

@@ -184,3 +223,4 @@ },

case "create_container": {
const c = await api.createContainer();
const memoryBytes = args.memoryMb != null ? Math.round(args.memoryMb) * 1024 * 1024 : undefined;
const c = await api.createContainer(memoryBytes, args.alwaysOn);
return text(

@@ -192,2 +232,24 @@ `Created container (database and S3 bucket provisioned automatically).\n` +

case "set_always_on": {
const c = await api.setAlwaysOn(args.containerId, args.enabled);
return text(`always-on ${args.enabled ? "enabled" : "disabled"} for ${c.subdomain}.\n${containerSummary(c)}`);
}
case "get_account": {
const me = await api.getAccount();
const p = me.plan || {};
const sizes = Array.isArray(p.memorySizes)
? p.memorySizes.map((b) => `${Math.round(b / (1024 * 1024))}MB`).join(", ")
: "n/a";
const limit = p.effectiveMaxContainers ?? p.maxContainers;
return text(
`Account plan: ${p.displayName || p.name || "Free"}\n` +
` container limit: ${limit} (plan base ${p.maxContainers}, always-on add-ons ${me.containerAddons ?? 0})\n` +
` selectable memory sizes: ${sizes}\n` +
` storage limit: ${p.maxStorageBytes != null ? Math.round(p.maxStorageBytes / (1024 * 1024 * 1024)) + "GB" : "n/a"} per container\n` +
` custom domains: ${p.maxCustomDomains ?? 0}\n` +
` auto-sleep: ${p.autoSleep ? "yes (containers sleep when idle unless always-on)" : "no (always-on)"}`
);
}
case "get_container": {

@@ -268,3 +330,3 @@ const c = await api.getContainer(args.containerId);

const server = new Server(
{ name: "basicdeploy-mcp", version: "1.0.0" },
{ name: "basicdeploy-mcp", version: "1.0.2" },
{ capabilities: { tools: {} } }

@@ -271,0 +333,0 @@ );