@paraloncloud/mcp 1.2.0 → 1.3.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 (3) hide show
  1. package/README.md +3 -1
  2. package/package.json +1 -1
  3. package/server.js +60 -2
package/README.md CHANGED
@@ -44,6 +44,8 @@ using natural language.
44
44
  | `set_node_price` | Set the price in USD per hour for the node, or `null` for the default |
45
45
  | `update_node` | Change name, spot, availability and price in one call |
46
46
  | `reclaim_spot_node` | Take a spot node back for your own use; a spot rental on it stops in 2 minutes |
47
+ | `get_node_access` | Who can rent a node: everyone, or only the people, domains and organizations listed |
48
+ | `set_node_access` | Keep a node private for chosen renters (email, domain, organization), or open it to everyone (`[]`) |
47
49
  | `get_earnings` | Earnings by day (rentals per node, inference per account) and the withdrawable balance |
48
50
 
49
51
  Payouts are not reachable from the API or this server. Deleting a node stays on the site.
@@ -114,7 +116,7 @@ As a provider:
114
116
  - Pass `hours` so a rental auto-stops even if the agent forgets to.
115
117
  - The key's `max_active_rentals` limit (set in the Console) caps concurrency regardless.
116
118
  - The node tools that change something (`add_node`, `set_node_available`, `set_node_price`,
117
- `update_node`, `reclaim_spot_node`) tell the agent to confirm with you first;
119
+ `update_node`, `reclaim_spot_node`, `set_node_access`) tell the agent to confirm with you first;
118
120
  `reclaim_spot_node` stops a renter's spot rental two minutes later.
119
121
  - `add_node` and `get_node_install_command` return a command with the node's secret token:
120
122
  keep it private.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraloncloud/mcp",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
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
@@ -87,7 +87,7 @@ function reply(result, note) {
87
87
  }
88
88
 
89
89
  const server = new Server(
90
- { name: "paraloncloud", version: "1.2.0" },
90
+ { name: "paraloncloud", version: "1.3.0" },
91
91
  { capabilities: { tools: {} } }
92
92
  );
93
93
 
@@ -95,7 +95,7 @@ const TOOLS = [
95
95
  {
96
96
  name: "list_gpus",
97
97
  description:
98
- "List GPU nodes available to rent right now, with price per hour, GPU model, VRAM, CUDA compute capability, and country. Rent by the returned node_id. Read-only, no cost. For modern LLM work prefer compute_cap >= 8.9 (FP8).",
98
+ "List GPU nodes available to rent right now, with price per hour, GPU model, VRAM, CUDA compute capability, and country. Rent by the returned node_id. reserved_for_you: true marks a node its provider keeps for this key's person or organization: such nodes come first and nobody else sees them. Read-only, no cost. For modern LLM work prefer compute_cap >= 8.9 (FP8).",
99
99
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
100
100
  },
101
101
  {
@@ -265,6 +265,43 @@ const TOOLS = [
265
265
  additionalProperties: false,
266
266
  },
267
267
  },
268
+ {
269
+ name: "get_node_access",
270
+ description:
271
+ "PROVIDER: who can rent a node. An empty list (private: false) means everyone; otherwise only the people (email), email domains and organizations listed see the node and can rent it. Read-only.",
272
+ inputSchema: {
273
+ type: "object",
274
+ properties: { node_id: { type: "string" } },
275
+ required: ["node_id"],
276
+ additionalProperties: false,
277
+ },
278
+ },
279
+ {
280
+ name: "set_node_access",
281
+ description:
282
+ "PROVIDER: set who can rent a node, replacing the whole list. Each entry is {kind: \"email\", value: \"ana@company.com\"}, {kind: \"domain\", value: \"company.com\"} or {kind: \"org\", value: \"<organization name or ID>\"}. A non-empty list makes the node PRIVATE: only those renters see it and can rent it, and ParalonCloud places no inference or other work on it, so it earns from their rentals only. [] opens it to everyone again. Call get_node_access first to keep existing entries. Always confirm with the user first. People and organizations added are told by email.",
283
+ inputSchema: {
284
+ type: "object",
285
+ properties: {
286
+ node_id: { type: "string" },
287
+ entries: {
288
+ type: "array",
289
+ maxItems: 50,
290
+ items: {
291
+ type: "object",
292
+ properties: {
293
+ kind: { type: "string", enum: ["email", "domain", "org"] },
294
+ value: { type: "string" },
295
+ },
296
+ required: ["kind", "value"],
297
+ additionalProperties: false,
298
+ },
299
+ },
300
+ },
301
+ required: ["node_id", "entries"],
302
+ additionalProperties: false,
303
+ },
304
+ },
268
305
  {
269
306
  name: "get_earnings",
270
307
  description:
@@ -394,6 +431,27 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
394
431
  return reply(await api("PATCH", `/nodes/${encodeURIComponent(args.node_id)}`, { body }));
395
432
  }
396
433
 
434
+ case "get_node_access":
435
+ case "set_node_access": {
436
+ if (!args.node_id) {
437
+ return reply({ ok: false, data: { error: "invalid_request", message: "node_id is required (see list_my_nodes)." } });
438
+ }
439
+ const path = `/nodes/${encodeURIComponent(args.node_id)}/access`;
440
+ if (name === "get_node_access") return reply(await api("GET", path));
441
+ if (!Array.isArray(args.entries)) {
442
+ return reply({ ok: false, data: { error: "invalid_request", message: "entries is required: the whole list, [] for everyone." } });
443
+ }
444
+ const result = await api("PUT", path, { body: { entries: args.entries } });
445
+ return reply(
446
+ result,
447
+ result.ok
448
+ ? result.data && result.data.private
449
+ ? "The node is private: only the listed renters see and rent it, and no ParalonCloud workloads run on it."
450
+ : "The node is open to everyone again."
451
+ : undefined
452
+ );
453
+ }
454
+
397
455
  case "get_earnings": {
398
456
  const q = args.days ? `?days=${encodeURIComponent(args.days)}` : "";
399
457
  return reply(await api("GET", `/earnings${q}`));