From fed166202ee71e721c09b2f48467fe97f6c927a1 Mon Sep 17 00:00:00 2001 From: Tim Lingo <1timlingo@gmail.com> Date: Sat, 27 Jun 2026 14:23:20 -0500 Subject: [PATCH] =?UTF-8?q?feat(connectd):=20@bin/=20=E2=80=94=20spa?= =?UTF-8?q?wn=20a=20bundled=20native=20MCP=20server=20binary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds @bin/ command resolution alongside @node/@bundled: resolves to a native binary in the bundled-servers dir, spawned directly (no Node runtime). Enables native MCP connectors like the Go whatsapp-mcp. Typecheck clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/bridge.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bridge.ts b/src/bridge.ts index 3a88179..3c1ced3 100644 --- a/src/bridge.ts +++ b/src/bridge.ts @@ -32,6 +32,8 @@ export function namespacedName(serverId: string, tool: string): string { // Node we ship in the .app), used to spawn pre-bundled MCP servers. // arg "@bundled/" → a pre-bundled MCP server shipped alongside the bridge (e.g. the // filesystem server for "Your files"), so it runs offline without npx. +// command "@bin/" → a pre-bundled NATIVE MCP server binary shipped alongside the bridge +// (e.g. the Go whatsapp-mcp), spawned directly (no Node runtime). // The bundled-servers dir is the app's resources/.../neuron-connectd/servers (set by the daemons // launcher via NEURON_CONNECTD_BUNDLE_DIR; falls back to a path next to the running bundle). function bundledServersDir(): string { @@ -39,7 +41,10 @@ function bundledServersDir(): string { } function resolveRuntimeCommand(command: string): string { - return command === "@node" ? process.execPath : command; + if (command === "@node") return process.execPath; + // "@bin/": a bundled native binary (e.g. whatsapp-mcp). Resolve to the bundled-servers dir. + if (command.startsWith("@bin/")) return join(bundledServersDir(), command.slice("@bin/".length)); + return command; } function resolveBundledArg(arg: string): string {