local-mcp 3.0.409 → 3.0.413

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/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  [![macOS](https://img.shields.io/badge/macOS-13%2B-111111?style=flat-square)](https://local-mcp.com?ref=npm)
7
7
  [![Signed](https://img.shields.io/badge/Developer%20ID-notarized-111111?style=flat-square)](https://local-mcp.com?ref=npm)
8
8
  [![Privacy](https://img.shields.io/badge/data-stays%20on%20device-2e7d32?style=flat-square)](https://local-mcp.com/en/privacy)
9
+ [![Glama](https://glama.ai/mcp/servers/lanchuske/local-mcp-releases/badge)](https://glama.ai/mcp/servers/lanchuske/local-mcp-releases?ref=npm)
9
10
 
10
11
  **No cloud. No tokens. No API keys. 100% free.**
11
12
 
package/index.js CHANGED
@@ -279,7 +279,39 @@ function detectManualUninstall() {
279
279
  )
280
280
  }
281
281
 
282
+ // Comandos que este wrapper entiende. Sin argumentos arranca el server MCP por stdio, que es
283
+ // como lo lanzan los clientes de IA — ese camino NO cambia.
284
+ const COMANDOS = ['setup', 'update', 'uninstall', 'status']
285
+
286
+ function mostrarAyuda() {
287
+ console.log(`local-mcp — Local MCP Server
288
+
289
+ Uso:
290
+ local-mcp arranca el server MCP por stdio (lo que hace un cliente de IA)
291
+ local-mcp setup instala y configura
292
+ local-mcp status muestra el estado
293
+ local-mcp update limpia el cache del runtime
294
+ local-mcp uninstall desinstala
295
+
296
+ local-mcp --help esta ayuda`)
297
+ }
298
+
282
299
  async function main() {
300
+ // Un argumento que no entendemos NO puede caer al camino por defecto: ese camino descarga
301
+ // el runtime e instala la app del tray. Medido el 2026-09-20: `local-mcp --help` bajó
302
+ // teams-proxy e instaló LocalMCPTray.app en ~/Applications, en una máquina donde el usuario
303
+ // sólo buscaba ayuda de CLI. Un comando de consulta no instala software.
304
+ //
305
+ // Sin argumentos sigue arrancando el server, que es como lo invocan los clientes de IA.
306
+ if (cmd !== undefined && !COMANDOS.includes(cmd)) {
307
+ const pedidoDeAyuda = ['--help', '-h', 'help'].includes(cmd)
308
+ mostrarAyuda()
309
+ if (!pedidoDeAyuda) {
310
+ console.error(`\nNo conozco el comando "${cmd}".`)
311
+ }
312
+ process.exit(pedidoDeAyuda ? 0 : 2)
313
+ }
314
+
283
315
  if (cmd === 'setup') {
284
316
  // Clear uninstall sentinel — user explicitly wants to (re-)install
285
317
  clearUninstallSentinels()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "local-mcp",
3
- "version": "3.0.409",
4
- "description": "Let ChatGPT, Claude, Cursor & any MCP client actually use your Mac — read & reply to email, manage your calendar, text over iMessage, find files, work with Teams, Slack & Office. On your Mac, no API keys, free.",
3
+ "version": "3.0.413",
4
+ "description": "Let ChatGPT, Claude, Cursor & any MCP client actually use your Mac or Windows PC — read & reply to email, manage your calendar, text over iMessage, find files, work with Teams, Slack & Office. Runs locally, no API keys, free.",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "local-mcp": "index.js"
package/setup.js CHANGED
@@ -836,6 +836,20 @@ async function _associateEmail(email, token) {
836
836
  })
837
837
  }
838
838
 
839
+ // Where install-ref is persisted for the LONG-RUNNING process to read back on every
840
+ // heartbeat. NOT the same directory on every platform: Mac's Swift heartbeat
841
+ // (HeartbeatManager.swift installRef) reads ~/.local/share/local-mcp/install-ref, no
842
+ // /bin — go-server's config.InstallRef() (Windows AND Linux) reads
843
+ // <cache dir>/install-ref WITH /bin, via config.Dir(), which is the exact directory
844
+ // download.js's CACHE_DIR already computes per platform. Measured live on Windows
845
+ // 2026-09-18: this used to hardcode the darwin-shaped path unconditionally, so a
846
+ // Windows (or Linux) npm/npx install persisted its ref where nothing ever read it
847
+ // back — resolveInstallRef's file/env/ADS ladder never even looked there.
848
+ function _installRefDir(platform = process.platform, home = HOME, cacheDir = download.CACHE_DIR) {
849
+ if (platform === 'darwin') return path.join(home, '.local', 'share', 'local-mcp')
850
+ return cacheDir
851
+ }
852
+
839
853
  // On darwin the anon cloud_token is persisted in config.json (cfgFile), which the Swift
840
854
  // tray already reads. Off darwin, the go-server reads it EXCLUSIVELY from
841
855
  // getCacheDir()/.cloud-token as a plain trimmed string (tunnel.go:454,513-523) — it never
@@ -1022,7 +1036,7 @@ function _pingInstall(clients, method, email = '', binaryVersion = '') {
1022
1036
  // machine_id + ref in one event (machine-level attribution, deduped, and it
1023
1037
  // closes install events that fire before machine_id exists). Best-effort.
1024
1038
  try {
1025
- const _refDir = path.join(HOME, '.local', 'share', 'local-mcp')
1039
+ const _refDir = _installRefDir()
1026
1040
  fs.mkdirSync(_refDir, { recursive: true })
1027
1041
  fs.writeFileSync(path.join(_refDir, 'install-ref'), _getRef())
1028
1042
  } catch {}
@@ -1172,7 +1186,7 @@ module.exports = {
1172
1186
  CLIENTS_REPORT_SCHEMA,
1173
1187
  _notSupportedOnPlatformResult,
1174
1188
  _launcherSpawnSpec, _writeLaunchScript, _writeLaunchSpec,
1175
- _getMachineId, _healthCheckSpec, _localMcpConfigDir,
1189
+ _getMachineId, _healthCheckSpec, _localMcpConfigDir, _installRefDir,
1176
1190
  _cloudTokenPath, _readCachedCloudToken, _writeCloudToken, _registerAnonToken,
1177
1191
  _autoLaunchClient, _fetchClientsCatalog,
1178
1192
  }