@aicommander/mcp 1.0.30 → 1.0.31
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/dist/bin/mcp.js +23 -1
- package/package.json +1 -1
package/dist/bin/mcp.js
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
// serverInfo.version must track package.json instead of a hardcoded literal
|
|
9
|
+
// (1.0.17 shipped as far as 1.0.30 because nothing bumped or verified it).
|
|
10
|
+
// The published bin runs from dist/bin/mcp.js (manifest two levels up); from
|
|
11
|
+
// source (bin/mcp.ts) it is one level up — name-check so no stray package.json
|
|
12
|
+
// can ever win.
|
|
13
|
+
function ownVersion() {
|
|
14
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
for (const rel of ["../../package.json", "../package.json"]) {
|
|
16
|
+
try {
|
|
17
|
+
const pkg = JSON.parse(readFileSync(path.resolve(here, rel), "utf8"));
|
|
18
|
+
if (pkg.name === "@aicommander/mcp" && pkg.version)
|
|
19
|
+
return pkg.version;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
// candidate missing/unreadable — try the next layout
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return "0.0.0";
|
|
26
|
+
}
|
|
5
27
|
const SERVER_URL = process.env["AICOMMANDER_SERVER"] ?? "https://aicommander.dev";
|
|
6
28
|
// Optional ACCOUNT token (an account API key or OAuth access token). If set, it
|
|
7
29
|
// signs you into your AI Commander account — saved machines, aliases, account
|
|
@@ -15,7 +37,7 @@ const ACCOUNT_TOKEN = process.env["AICOMMANDER_TOKEN"];
|
|
|
15
37
|
const MCP_URL = ACCOUNT_TOKEN ? `${SERVER_URL}/mcp` : `${SERVER_URL}/mcp?anonymous=1`;
|
|
16
38
|
const server = new McpServer({
|
|
17
39
|
name: "aicommander",
|
|
18
|
-
version:
|
|
40
|
+
version: ownVersion(),
|
|
19
41
|
}, {
|
|
20
42
|
instructions: "AI Commander — remote command execution / remote shell over an outbound-only agent. " +
|
|
21
43
|
"Use these tools for any SSH-style remote access: connect to a computer/machine/server, " +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aicommander/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31",
|
|
4
4
|
"mcpName": "dev.aicommander/mcp",
|
|
5
5
|
"description": "MCP server for remote command execution — run shell/bash commands on remote machines, servers and laptops from your AI agent (Claude, Codex, any stdio MCP client). An SSH / Ansible alternative with no exposed SSH, open ports or VPN; drive machines by AIC-… session code or saved alias/hostname.",
|
|
6
6
|
"keywords": [
|