← back to George Mcp
george-mcp: derive BASE_PATH_PREFIX — empty for direct-port URLs, /george for reverse-proxy hostname (fixes 404 on :9850)
4834576f88738000e006ffbba4424f53d3a01460 · 2026-05-18 11:51:30 -0700 · Steve Abrams
Files touched
Diff
commit 4834576f88738000e006ffbba4424f53d3a01460
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon May 18 11:51:30 2026 -0700
george-mcp: derive BASE_PATH_PREFIX — empty for direct-port URLs, /george for reverse-proxy hostname (fixes 404 on :9850)
---
index.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/index.js b/index.js
index 90fe6bc..cb7a5a3 100755
--- a/index.js
+++ b/index.js
@@ -10,7 +10,11 @@ import { execSync } from "node:child_process";
// BASE_URL = origin only. Path is appended in `george()`. Default uses Tailscale-Serve
// path-routed mount so requests go via HTTPS without needing a port number.
const BASE_URL = (process.env.GEORGE_URL || "https://kamatera.tail79cb8e.ts.net").replace(/\/$/, "");
-const BASE_PATH_PREFIX = process.env.GEORGE_PATH_PREFIX ?? "/george";
+// Direct-port URLs (e.g. http://host:9850) reach George's app at root → no prefix.
+// Bare-hostname URLs go through the Tailscale-Serve reverse proxy → "/george" mount.
+const BASE_PATH_PREFIX =
+ process.env.GEORGE_PATH_PREFIX ??
+ (/:\d{2,5}(\/|$)/.test(BASE_URL) ? "" : "/george");
function loadAuthFromKeychain() {
try {
const pw = execSync("security find-generic-password -s dw-agents -a admin -w", { encoding: "utf-8" }).trim();
← 0267de5 initial scaffold (gitify-all 2026-05-06)
·
back to George Mcp
·
Add account param to all george MCP tools (5-account routing a8aaa43 →