local-mcp 1.107.0 → 1.109.0

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 (3) hide show
  1. package/download.js +21 -1
  2. package/package.json +1 -1
  3. package/setup.js +7 -10
package/download.js CHANGED
@@ -17,6 +17,23 @@ const CACHE_DIR = path.join(os.homedir(), '.local', 'share', 'local-mcp', 'bin
17
17
  const TRAY_DIR = path.join(os.homedir(), '.local', 'share', 'local-mcp', 'tray') // metadata dir
18
18
  const TRAY_APP = '/Applications/LocalMCPTray.app'
19
19
 
20
+ function _getMachineId() {
21
+ const { execSync } = require('child_process')
22
+ const crypto = require('crypto')
23
+ try {
24
+ const r = execSync('security find-generic-password -s com.local-mcp.machine-id -a machine-id -w 2>/dev/null', { stdio: 'pipe' })
25
+ const id = r.toString().trim()
26
+ if (id) return id
27
+ } catch {}
28
+ try {
29
+ const ioreg = execSync('ioreg -rd1 -c IOPlatformExpertDevice', { stdio: 'pipe' }).toString()
30
+ const match = ioreg.match(/"IOPlatformUUID"\s*=\s*"([^"]+)"/)
31
+ const hwUuid = match ? match[1] : os.hostname()
32
+ return crypto.createHash('sha256').update(hwUuid).digest('hex').slice(0, 24)
33
+ } catch {}
34
+ return ''
35
+ }
36
+
20
37
  function getArch() {
21
38
  const arch = process.arch
22
39
  if (arch === 'arm64') return 'darwin-arm64'
@@ -26,10 +43,13 @@ function getArch() {
26
43
 
27
44
  /**
28
45
  * Obtiene la versión más reciente del binario desde el backend.
46
+ * Si esta máquina está en beta_machines, el backend retorna la versión beta.
29
47
  */
30
48
  async function getLatestBinary() {
49
+ const machineId = _getMachineId()
50
+ const qs = machineId ? `?machine_id=${encodeURIComponent(machineId)}` : ''
31
51
  return new Promise((resolve, reject) => {
32
- const req = https.get(`${BACKEND_URL}/runtime/latest`, { timeout: 10000 }, (res) => {
52
+ const req = https.get(`${BACKEND_URL}/runtime/latest${qs}`, { timeout: 10000 }, (res) => {
33
53
  let data = ''
34
54
  res.on('data', chunk => data += chunk)
35
55
  res.on('end', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-mcp",
3
- "version": "1.107.0",
3
+ "version": "1.109.0",
4
4
  "description": "MCP server for macOS \u2014 connect Claude Desktop, Cursor, Windsurf to Mail, Calendar, Contacts, Teams, OneDrive. Privacy-first: all data stays on your Mac.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/setup.js CHANGED
@@ -116,14 +116,14 @@ async function runSetup(opts = {}) {
116
116
  const detected = CLIENTS.filter(c => c.detect())
117
117
 
118
118
  if (detected.length === 0) {
119
- console.log('No se detectaron clientes MCP instalados.')
120
- console.log('Instalá Claude Desktop, Cursor, Windsurf o VS Code y ejecutá este comando nuevamente.\n')
121
- console.log('Config manual (copiá en el archivo de config de tu cliente):')
119
+ console.log('No AI clients detected.')
120
+ console.log('Install Claude Desktop, Cursor, Windsurf, or VS Code and run this command again.\n')
121
+ console.log('Or add this manually to your AI client config:')
122
122
  console.log(JSON.stringify({ mcpServers: { 'local-mcp': { command: NPX_COMMAND, args: NPX_ARGS } } }, null, 2))
123
123
  return
124
124
  }
125
125
 
126
- console.log(`Clientes detectados: ${detected.map(c => c.name).join(', ')}\n`)
126
+ console.log(`Detected: ${detected.map(c => c.name).join(', ')}\n`)
127
127
 
128
128
  const configured = []
129
129
  const failed = []
@@ -132,7 +132,7 @@ async function runSetup(opts = {}) {
132
132
  try {
133
133
  injectMcpConfig(client)
134
134
  configured.push(client.name)
135
- console.log(`✓ ${client.name} configurado`)
135
+ console.log(`✓ ${client.name} configured`)
136
136
  } catch (err) {
137
137
  failed.push(client.name)
138
138
  console.error(`✗ ${client.name}: ${err.message}`)
@@ -149,9 +149,9 @@ async function runSetup(opts = {}) {
149
149
  if (!cfg.license_email) {
150
150
  cfg.license_email = email
151
151
  _writeJson(cfgFile, cfg)
152
- console.log(`✓ Email guardado en config: ${email}`)
152
+ console.log(`✓ Email saved: ${email}`)
153
153
  }
154
- } catch { /* config no existe aún, se creará al arrancar */ }
154
+ } catch { /* config not created yet will be created on first run */ }
155
155
  }
156
156
 
157
157
  console.log('\n──────────────────────────────────────')
@@ -170,9 +170,6 @@ async function runSetup(opts = {}) {
170
170
  console.log(`⚠ Could not configure: ${failed.join(', ')} — check permissions and try again.\n`)
171
171
  }
172
172
 
173
- console.log('MCP config written:')
174
- console.log(JSON.stringify({ mcpServers: { 'local-mcp': { command: NPX_COMMAND, args: NPX_ARGS } } }, null, 2))
175
-
176
173
  // Instalar y lanzar el tray (menu bar app) — arm64 only, non-fatal
177
174
  await _installTray()
178
175