cloudgpu-mcp 0.16.7 → 0.16.8
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 +1 -1
- package/package.json +1 -1
- package/src/index.js +26 -3
package/README.md
CHANGED
|
@@ -443,7 +443,7 @@ Use `prepare_job_batch` to review every command, fresh compute quote, deadline a
|
|
|
443
443
|
|
|
444
444
|
REST equivalents: `POST /v1/job-batches` with `Idempotency-Key`, `total_budget_usd` and 1–32 `jobs`; `GET /v1/job-batches/{batch_id}`; `POST /v1/job-batches/{batch_id}/cancel`. The MCP reviewed manifest remains capped at eight children. Replaying the identical key/body returns the existing children. Existing `run_job_batch` retains its explicitly non-atomic client submission behavior for compatibility; the server tool never falls back to it.
|
|
445
445
|
|
|
446
|
-
For whole-hour Jobs, call `
|
|
446
|
+
For whole-hour Jobs, call `quote_compute` and compare the estimated task totals and minimum charges in `job_billing_options`. Then call `quote_job_billing` with the chosen period and exact Job configuration. Show the current quote and get explicit approval. Pass its `billing_quote_id` and `billing_accepted=true` to `run_job` with the exact GPU, spending cap and time limit. A legacy minute-only `quote_id` is optional when using this billing quote. Each allocation needs its own current billing quote. The Job cap must cover the minimum charge, and unused parts of a started hour are charged. Billing quotes expire after five minutes. An expired queued Job fails without allocation and requires new approval.
|
|
447
447
|
|
|
448
448
|
### Regional facts before a compute decision
|
|
449
449
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudgpu-mcp",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.8",
|
|
4
4
|
"mcpName": "io.github.cloudgpu-app/cloudgpu-mcp",
|
|
5
5
|
"description": "MCP server and command-line tool for cloudgpu.app: let Claude Code, Cursor, Cline, opencode, goose and other MCP clients (or you, from a terminal) rent a GPU with explicit billing quotes, run a job, fetch the results and shut it down, with spending limits the platform enforces.",
|
|
6
6
|
"type": "module",
|
package/src/index.js
CHANGED
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
shq,
|
|
43
43
|
} from "./guards.js";
|
|
44
44
|
|
|
45
|
-
const VERSION = "0.16.
|
|
45
|
+
const VERSION = "0.16.8";
|
|
46
46
|
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
47
47
|
const RULES = fs.readFileSync(path.join(HERE, "..", "rules", "cloudgpu.md"), "utf8");
|
|
48
48
|
|
|
@@ -162,15 +162,38 @@ server.registerTool("get_compute_catalog", {
|
|
|
162
162
|
inputSchema: {}, annotations: { readOnlyHint: true, openWorldHint: true },
|
|
163
163
|
}, wrap(async () => ok(await api.catalog())));
|
|
164
164
|
server.registerTool("quote_compute", {
|
|
165
|
-
title: "Server-side compute quote", description: "
|
|
165
|
+
title: "Server-side compute quote", description: "Compare minute and whole-hour Job estimates, minimum charges and starting balances. No GPU is started. Use job_billing_options to compare cost for your duration, then call quote_job_billing for the selected period. The legacy quote_id still supports minute-only Jobs.",
|
|
166
166
|
inputSchema: { min_vram_gb: z.number().int().min(0).default(0), gpu_model: z.string().optional(), gpu_count: z.number().int().min(1).max(8).default(1),
|
|
167
167
|
template: z.string().optional(), disk_gb: z.number().int().optional(), estimated_duration_seconds: z.number().int().positive(), max_budget_usd: z.number().positive() },
|
|
168
168
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
169
169
|
}, wrap(async ({ estimated_duration_seconds, max_budget_usd, ...requirements }) => {
|
|
170
|
-
const q = await api.quote({ requirements, estimated_duration_seconds, max_budget_usd });
|
|
170
|
+
const q = await api.quote({ requirements, estimated_duration_seconds, max_budget_usd, include_job_billing_options: true });
|
|
171
171
|
return ok({ ...q, quote_id: q.id });
|
|
172
172
|
}));
|
|
173
173
|
|
|
174
|
+
server.registerTool("quote_job_billing", {
|
|
175
|
+
title: "Quote the selected Job billing period",
|
|
176
|
+
description: "Read-only. Use the exact Job configuration and selected billing period from quote_compute. Show the returned billing period, minimum charge and hourly total. Obtain explicit approval before sending billingQuoteId as billing_quote_id with billing_accepted=true to run_job.",
|
|
177
|
+
inputSchema: {
|
|
178
|
+
gpu_model: z.string().min(1), gpu_count: z.number().int().min(1).max(8).default(1),
|
|
179
|
+
template: z.string().optional(), disk_gb: z.number().int().optional(),
|
|
180
|
+
billing_increment_seconds: z.union([z.literal(60), z.literal(3600)]),
|
|
181
|
+
workspace_restore_required: z.boolean().optional(),
|
|
182
|
+
},
|
|
183
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
184
|
+
}, wrap(async ({ gpu_model, gpu_count, template, disk_gb, billing_increment_seconds, workspace_restore_required }) => {
|
|
185
|
+
const quote = await api.rentalBillingQuote({
|
|
186
|
+
gpuModel: gpu_model, gpuCount: gpu_count, ...(template ? { templateId: template } : {}),
|
|
187
|
+
...(disk_gb ? { diskGb: disk_gb } : {}), ...(workspace_restore_required ? { workspaceRestoreRequired: true } : {}),
|
|
188
|
+
jobBillingQuote: true, billingIncrementSeconds: billing_increment_seconds,
|
|
189
|
+
});
|
|
190
|
+
if (!quote?.billingQuoteId || quote.incrementSeconds !== billing_increment_seconds
|
|
191
|
+
|| (workspace_restore_required && quote.workspaceRestoreRequired !== true)) {
|
|
192
|
+
return fail("The requested Job billing period could not be verified. No Job was started.");
|
|
193
|
+
}
|
|
194
|
+
return ok({ ...quote, billing_quote_id: quote.billingQuoteId });
|
|
195
|
+
}));
|
|
196
|
+
|
|
174
197
|
server.registerTool(
|
|
175
198
|
"get_account",
|
|
176
199
|
{
|