@paraloncloud/mcp 1.6.1 → 1.6.2
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 +2 -2
- package/package.json +1 -1
- package/server.js +41 -1
package/README.md
CHANGED
|
@@ -159,8 +159,8 @@ changes nothing. Without a key it only starts the server and checks the tool lis
|
|
|
159
159
|
|
|
160
160
|
Releases are published from GitHub Actions with npm provenance, never from a laptop: bump the
|
|
161
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
|
|
163
|
-
was built from.
|
|
162
|
+
`vX.Y.Z`. The `publish` workflow runs the check, publishes to npm, then to the official MCP
|
|
163
|
+
registry. The npm page shows the commit it was built from.
|
|
164
164
|
|
|
165
165
|
## Run locally (dev)
|
|
166
166
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraloncloud/mcp",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
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.6.
|
|
92
|
+
{ name: "paraloncloud", version: "1.6.2" },
|
|
93
93
|
{ capabilities: { tools: {} } }
|
|
94
94
|
);
|
|
95
95
|
|
|
@@ -363,6 +363,46 @@ const TOOLS = [
|
|
|
363
363
|
},
|
|
364
364
|
];
|
|
365
365
|
|
|
366
|
+
// MCP tool annotations: a title, and whether a tool only reads, changes
|
|
367
|
+
// something, or undoes something (stops a GPU, deletes a key, takes a spot
|
|
368
|
+
// node back). Clients use them to decide what to confirm; Anthropic's
|
|
369
|
+
// connector directory requires them. None of these tools reach anything but
|
|
370
|
+
// the ParalonCloud API, so openWorldHint is false throughout.
|
|
371
|
+
const READ = { readOnlyHint: true, openWorldHint: false };
|
|
372
|
+
const WRITE = (idempotent) => ({ readOnlyHint: false, destructiveHint: false, idempotentHint: idempotent, openWorldHint: false });
|
|
373
|
+
const UNDO = { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false };
|
|
374
|
+
const ANNOTATIONS = {
|
|
375
|
+
list_gpus: { title: "List rentable GPUs", ...READ },
|
|
376
|
+
list_templates: { title: "List rental app templates", ...READ },
|
|
377
|
+
get_balance: { title: "Get credit balance", ...READ },
|
|
378
|
+
// Spends credits per minute; the price ceiling and the automatic
|
|
379
|
+
// idempotency key keep a repeat from starting a second GPU, but each call
|
|
380
|
+
// is a new rental, so it is not idempotent.
|
|
381
|
+
create_rental: { title: "Rent a GPU (spends credits)", ...WRITE(false) },
|
|
382
|
+
get_rental: { title: "Get a rental and its connection", ...READ },
|
|
383
|
+
list_rentals: { title: "List rentals", ...READ },
|
|
384
|
+
destroy_rental: { title: "Stop a rental (stops billing)", ...UNDO },
|
|
385
|
+
list_ssh_keys: { title: "List SSH keys", ...READ },
|
|
386
|
+
add_ssh_key: { title: "Add an SSH key", ...WRITE(false) },
|
|
387
|
+
delete_ssh_key: { title: "Delete an SSH key", ...UNDO },
|
|
388
|
+
list_my_nodes: { title: "List my GPU nodes", ...READ },
|
|
389
|
+
get_my_node: { title: "Get one of my nodes", ...READ },
|
|
390
|
+
add_node: { title: "Add a GPU node", ...WRITE(false) },
|
|
391
|
+
get_node_install_command: { title: "Get a node's install command", ...READ },
|
|
392
|
+
set_node_available: { title: "Put a node on or off the market", ...WRITE(true) },
|
|
393
|
+
set_node_price: { title: "Set a node's price", ...WRITE(true) },
|
|
394
|
+
update_node: { title: "Update a node", ...WRITE(true) },
|
|
395
|
+
reclaim_spot_node: { title: "Take a spot node back (stops its rental)", ...UNDO },
|
|
396
|
+
get_node_access: { title: "Get who can rent a node", ...READ },
|
|
397
|
+
// Replaces the whole list: entries left out lose access.
|
|
398
|
+
set_node_access: { title: "Set who can rent a node", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
399
|
+
get_earnings: { title: "Get provider earnings", ...READ },
|
|
400
|
+
};
|
|
401
|
+
for (const t of TOOLS) {
|
|
402
|
+
if (!ANNOTATIONS[t.name]) throw new Error(`tool ${t.name} has no annotations`);
|
|
403
|
+
t.annotations = ANNOTATIONS[t.name];
|
|
404
|
+
}
|
|
405
|
+
|
|
366
406
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
|
367
407
|
|
|
368
408
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|