@paraloncloud/mcp 1.5.0 → 1.6.1
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 +14 -4
- package/package.json +1 -1
- package/server.js +10 -2
package/README.md
CHANGED
|
@@ -27,8 +27,8 @@ using natural language.
|
|
|
27
27
|
| --- | --- | --- |
|
|
28
28
|
| `list_gpus` | List rentable GPUs with price, VRAM, compute capability, country | free |
|
|
29
29
|
| `get_balance` | Your credit balance | free |
|
|
30
|
-
| `list_templates` | Apps a rental can start with (ComfyUI), their version and minimums | free |
|
|
31
|
-
| `create_rental` | Start a rental with JupyterLab or SSH (`type: "ssh"`), optionally with an app installed (`template: "comfyui"`) (async → poll) | **spends credits** |
|
|
30
|
+
| `list_templates` | Apps a rental can start with (ComfyUI, Open WebUI with Ollama, Unsloth Studio), their version and minimums | free |
|
|
31
|
+
| `create_rental` | Start a rental with JupyterLab or SSH (`type: "ssh"`), optionally with an app installed (`template: "comfyui"`, `"openwebui"` or `"unsloth"`; an app with its own sign-in returns it in `app.login`) (async → poll) | **spends credits** |
|
|
32
32
|
| `get_rental` | Status + the JupyterLab URL or the SSH command once running, and an app's link (`connection.app_url`) | free |
|
|
33
33
|
| `list_rentals` | Your active rentals (`status: "all"` for history) | free |
|
|
34
34
|
| `destroy_rental` | Stop a rental and stop billing | — |
|
|
@@ -133,6 +133,9 @@ As a provider:
|
|
|
133
133
|
- `create_rental` and `destroy_rental` change what you're billed — your MCP client will ask you
|
|
134
134
|
to approve them (Claude Code/Desktop confirm tool calls by default). Keep that on.
|
|
135
135
|
- `create_rental` auto-generates an idempotency key, so a retried call never starts a second GPU.
|
|
136
|
+
- `create_rental` takes `max_price_per_hour`, the price the agent read in `list_gpus`. If the
|
|
137
|
+
node costs more when the rental starts, nothing is started or charged (`price_changed`), and the
|
|
138
|
+
agent is told to ask you before renting at the new price.
|
|
136
139
|
- Pass `hours` so a rental auto-stops even if the agent forgets to.
|
|
137
140
|
- The key's `max_active_rentals` limit (set in the Console) caps concurrency regardless.
|
|
138
141
|
- The node tools that change something (`add_node`, `set_node_available`, `set_node_price`,
|
|
@@ -145,12 +148,19 @@ As a provider:
|
|
|
145
148
|
## Test
|
|
146
149
|
|
|
147
150
|
```bash
|
|
148
|
-
npm
|
|
151
|
+
npm ci
|
|
149
152
|
PARALON_API_KEY=prlc_your_key_here node smoke-test.mjs
|
|
150
153
|
```
|
|
151
154
|
|
|
152
155
|
It calls the read-only tools, and the node tools only on a node that does not exist, so it
|
|
153
|
-
changes nothing.
|
|
156
|
+
changes nothing. Without a key it only starts the server and checks the tool list (what CI runs).
|
|
157
|
+
|
|
158
|
+
## Releases
|
|
159
|
+
|
|
160
|
+
Releases are published from GitHub Actions with npm provenance, never from a laptop: bump the
|
|
161
|
+
version in `package.json`, `server.json` and `server.js`, commit, then push an annotated tag
|
|
162
|
+
`vX.Y.Z`. The `publish` workflow runs the check and publishes. The npm page shows the commit it
|
|
163
|
+
was built from.
|
|
154
164
|
|
|
155
165
|
## Run locally (dev)
|
|
156
166
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraloncloud/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"mcpName": "io.github.ParalonCloud/paralon-mcp",
|
|
5
5
|
"description": "ParalonCloud MCP server: rent GPUs, and as a GPU provider manage your own nodes, prices and earnings, from an AI agent.",
|
|
6
6
|
"license": "MIT",
|
package/server.js
CHANGED
|
@@ -89,7 +89,7 @@ function reply(result, note) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
const server = new Server(
|
|
92
|
-
{ name: "paraloncloud", version: "1.
|
|
92
|
+
{ name: "paraloncloud", version: "1.6.1" },
|
|
93
93
|
{ capabilities: { tools: {} } }
|
|
94
94
|
);
|
|
95
95
|
|
|
@@ -115,7 +115,7 @@ const TOOLS = [
|
|
|
115
115
|
{
|
|
116
116
|
name: "create_rental",
|
|
117
117
|
description:
|
|
118
|
-
"Start renting a GPU. SPENDS CREDITS (per-minute billing) — confirm with the user before calling. Asynchronous: returns a rental_id with status 'pending'. Provisioning + the secure tunnel take ~20-40 seconds. After creating, call get_rental ONCE to fetch the connection URL — it waits internally for startup and returns when ready, so do NOT poll it in a tight loop. DURATION: the rental is open-ended by default (runs until the user stops it with destroy_rental) — use open-ended as the default. When starting one, briefly tell the user it's open-ended and bills per minute until stopped, and that they can set an 'hours' auto-stop cap instead if they prefer; only pass 'hours' when the user asks for a time limit. An idempotency key is generated automatically so accidental repeats don't start a second GPU.",
|
|
118
|
+
"Start renting a GPU. SPENDS CREDITS (per-minute billing) — confirm with the user before calling. Asynchronous: returns a rental_id with status 'pending'. Provisioning + the secure tunnel take ~20-40 seconds. After creating, call get_rental ONCE to fetch the connection URL — it waits internally for startup and returns when ready, so do NOT poll it in a tight loop. DURATION: the rental is open-ended by default (runs until the user stops it with destroy_rental) — use open-ended as the default. When starting one, briefly tell the user it's open-ended and bills per minute until stopped, and that they can set an 'hours' auto-stop cap instead if they prefer; only pass 'hours' when the user asks for a time limit. An idempotency key is generated automatically so accidental repeats don't start a second GPU. PRICE: always pass max_price_per_hour = the price_per_hour you read for this node in list_gpus (the price you told the user). If the node now costs more, nothing is started or charged and the error is price_changed with the new price_per_hour: tell the user the new price and only retry with it as the new max_price_per_hour if they agree.",
|
|
119
119
|
inputSchema: {
|
|
120
120
|
type: "object",
|
|
121
121
|
properties: {
|
|
@@ -136,6 +136,11 @@ const TOOLS = [
|
|
|
136
136
|
description: "Optional app to install and start on the machine, by slug from list_templates (e.g. 'comfyui'). Only on a node whose templates in list_gpus contains it. The rental is still JupyterLab or SSH as type says, at the same price; the app comes up a minute or two after the machine answers, and get_rental then returns connection.app_url (its own link with a token). It starts empty: the user downloads models from inside the app.",
|
|
137
137
|
},
|
|
138
138
|
name: { type: "string", description: "Optional label for the rental." },
|
|
139
|
+
max_price_per_hour: {
|
|
140
|
+
type: "number",
|
|
141
|
+
exclusiveMinimum: 0,
|
|
142
|
+
description: "The highest price per hour (USD) to rent at: the price_per_hour list_gpus gave for this node. If the node costs more when the rental starts, it is refused with price_changed and nothing is started or charged.",
|
|
143
|
+
},
|
|
139
144
|
},
|
|
140
145
|
required: ["node_id"],
|
|
141
146
|
additionalProperties: false,
|
|
@@ -381,6 +386,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
381
386
|
if (args.hours != null) body.hours = args.hours;
|
|
382
387
|
if (args.name) body.name = args.name;
|
|
383
388
|
if (args.template) body.template = args.template;
|
|
389
|
+
if (args.max_price_per_hour != null) body.max_price_per_hour = args.max_price_per_hour;
|
|
384
390
|
const result = await api("POST", "/rentals", {
|
|
385
391
|
body,
|
|
386
392
|
headers: { "Idempotency-Key": randomUUID() },
|
|
@@ -393,6 +399,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
393
399
|
: body.type === "ssh"
|
|
394
400
|
? "Rental is provisioning. Call get_rental with this rental_id until status is 'running' to get the SSH command."
|
|
395
401
|
: "Rental is provisioning. Call get_rental with this rental_id until status is 'running' to get the connection URL.")
|
|
402
|
+
: result.data && result.data.error === "price_changed"
|
|
403
|
+
? `Not rented: the price changed to $${result.data.price_per_hour}/h (the ceiling was $${body.max_price_per_hour}/h). Nothing was started or charged. Tell the user the new price; retry with max_price_per_hour ${result.data.price_per_hour} only if they agree.`
|
|
396
404
|
: undefined
|
|
397
405
|
);
|
|
398
406
|
}
|