local-mcp 2.12.0 → 3.0.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 +2 -3
  2. package/package.json +1 -1
  3. package/setup.js +5 -7
package/download.js CHANGED
@@ -19,17 +19,16 @@ const TRAY_APP = '/Applications/LocalMCPTray.app'
19
19
 
20
20
  function _getMachineId() {
21
21
  const { execSync } = require('child_process')
22
- const crypto = require('crypto')
23
22
  try {
24
23
  const r = execSync('security find-generic-password -s com.local-mcp.machine-id -a machine-id -w 2>/dev/null', { stdio: 'pipe' })
25
24
  const id = r.toString().trim()
26
25
  if (id) return id
27
26
  } catch {}
28
27
  try {
28
+ // Full hardware UUID (same format as Swift server)
29
29
  const ioreg = execSync('ioreg -rd1 -c IOPlatformExpertDevice', { stdio: 'pipe' }).toString()
30
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)
31
+ return match ? match[1] : os.hostname()
33
32
  } catch {}
34
33
  return ''
35
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-mcp",
3
- "version": "2.12.0",
3
+ "version": "3.0.0",
4
4
  "description": "Pilot MCP — connect Claude Desktop, Cursor, Windsurf to Mail, Calendar, Contacts, Teams, OneDrive on macOS. Privacy-first: all data stays on your Mac.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/setup.js CHANGED
@@ -233,20 +233,18 @@ async function _installTray() {
233
233
 
234
234
  function _getMachineId() {
235
235
  try {
236
- // Try reading from macOS Keychain (same as server.py)
236
+ // Try reading from macOS Keychain (shared with Swift server)
237
237
  const r = execSync('security find-generic-password -s com.local-mcp.machine-id -a machine-id -w 2>/dev/null', { stdio: 'pipe' })
238
238
  const id = r.toString().trim()
239
239
  if (id) return id
240
240
  } catch {}
241
241
  try {
242
- // Generate from hardware UUID
243
- const crypto = require('crypto')
242
+ // Generate from hardware UUID (full UUID, same format as Swift server)
244
243
  const ioreg = execSync('ioreg -rd1 -c IOPlatformExpertDevice', { stdio: 'pipe' }).toString()
245
244
  const match = ioreg.match(/"IOPlatformUUID"\s*=\s*"([^"]+)"/)
246
- const hwUuid = match ? match[1] : require('os').hostname()
247
- const id = crypto.createHash('sha256').update(hwUuid).digest('hex').slice(0, 24)
248
- // Save to Keychain
249
- try { execSync(`security add-generic-password -s com.local-mcp.machine-id -a machine-id -w ${id} -U 2>/dev/null`, { stdio: 'pipe' }) } catch {}
245
+ const id = match ? match[1] : require('os').hostname()
246
+ // Save to Keychain for Swift server to read
247
+ try { execSync(`security add-generic-password -s com.local-mcp.machine-id -a machine-id -w "${id}" -U 2>/dev/null`, { stdio: 'pipe' }) } catch {}
250
248
  return id
251
249
  } catch {}
252
250
  return ''