@aicommander/mcp 1.0.1 → 1.0.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.
Files changed (2) hide show
  1. package/dist/bin/mcp.js +5 -6
  2. package/package.json +1 -1
package/dist/bin/mcp.js CHANGED
@@ -3,11 +3,10 @@ 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
5
  const SERVER_URL = process.env["AICOMMANDER_SERVER"] ?? "https://aicommander.dev";
6
+ // Optional. If set, it logs into your AI Commander account (stage 2 — saved
7
+ // machines, aliases, API keys). Without it the bridge works anonymously and you
8
+ // drive machines by their session code (AIC-…).
6
9
  const ADMIN_TOKEN = process.env["AICOMMANDER_ADMIN_TOKEN"];
7
- if (!ADMIN_TOKEN) {
8
- process.stderr.write("Error: AICOMMANDER_ADMIN_TOKEN environment variable is required\n");
9
- process.exit(1);
10
- }
11
10
  const server = new McpServer({
12
11
  name: "aicommander",
13
12
  version: "1.0.0",
@@ -38,7 +37,7 @@ server.registerTool("remote_exec", {
38
37
  method: "POST",
39
38
  headers: {
40
39
  "Content-Type": "application/json",
41
- Authorization: `Bearer ${ADMIN_TOKEN}`,
40
+ ...(ADMIN_TOKEN ? { Authorization: `Bearer ${ADMIN_TOKEN}` } : {}),
42
41
  Accept: "text/event-stream",
43
42
  },
44
43
  body: JSON.stringify({
@@ -106,7 +105,7 @@ server.registerTool("session_status", {
106
105
  method: "POST",
107
106
  headers: {
108
107
  "Content-Type": "application/json",
109
- Authorization: `Bearer ${ADMIN_TOKEN}`,
108
+ ...(ADMIN_TOKEN ? { Authorization: `Bearer ${ADMIN_TOKEN}` } : {}),
110
109
  },
111
110
  body: JSON.stringify({
112
111
  jsonrpc: "2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aicommander/mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Universal stdio MCP server for AI Commander — connect Codex CLI, Claude Desktop, or any stdio MCP client to remote machines by session code.",
5
5
  "keywords": [
6
6
  "mcp",