@lobbycomputer/mcp
Advanced tools
+26
-8
@@ -124,2 +124,15 @@ import { spawnSync } from "node:child_process"; | ||
| } | ||
| export function setupOperations(decision) { | ||
| switch (decision) { | ||
| case "already-installed": | ||
| return []; | ||
| case "install": | ||
| // Current Codex releases complete OAuth as part of adding an HTTP MCP server. | ||
| return ["add"]; | ||
| case "reauthorize": | ||
| return ["login"]; | ||
| case "replace": | ||
| return ["logout", "remove", "add"]; | ||
| } | ||
| } | ||
| function readConfiguredServer() { | ||
@@ -159,11 +172,16 @@ const result = runCodex(["mcp", "get", SERVER_NAME, "--json"], { | ||
| } | ||
| if (decision === "replace") { | ||
| runCodex(["mcp", "logout", SERVER_NAME], { allowFailure: true }); | ||
| runCodex(["mcp", "remove", SERVER_NAME]); | ||
| installServer(args.mcpUrl); | ||
| for (const operation of setupOperations(decision)) { | ||
| if (operation === "logout") { | ||
| runCodex(["mcp", "logout", SERVER_NAME], { allowFailure: true }); | ||
| } | ||
| else if (operation === "remove") { | ||
| runCodex(["mcp", "remove", SERVER_NAME]); | ||
| } | ||
| else if (operation === "add") { | ||
| installServer(args.mcpUrl); | ||
| } | ||
| else { | ||
| authorizeServer(); | ||
| } | ||
| } | ||
| else if (decision === "install") { | ||
| installServer(args.mcpUrl); | ||
| } | ||
| authorizeServer(); | ||
| process.stdout.write("\n[ok] Lobby MCP is installed and authorized. Restart Codex before using it.\n"); | ||
@@ -170,0 +188,0 @@ } |
+2
-2
| { | ||
| "name": "@lobbycomputer/mcp", | ||
| "version": "0.3.0", | ||
| "version": "0.3.1", | ||
| "description": "Install Lobby's hosted MCP connection in Codex", | ||
@@ -11,3 +11,3 @@ "type": "module", | ||
| "bin": { | ||
| "lobby-mcp": "dist/index.js" | ||
| "mcp": "dist/index.js" | ||
| }, | ||
@@ -14,0 +14,0 @@ "files": [ |
+2
-1
@@ -5,2 +5,4 @@ # `@lobbycomputer/mcp` | ||
| Create your account and complete onboarding at [lobby.computer](https://lobby.computer). | ||
| ## Install | ||
@@ -40,2 +42,1 @@ | ||
| the npm tarball. | ||
11958
5.53%236
8.26%41
2.5%