local-mcp 3.0.429 → 3.0.431

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
@@ -1,6 +1,6 @@
1
1
  # Local MCP
2
2
 
3
- > **Use your Mac or Windows PC from ChatGPT & Claude.ai on the web** — plus local tools for Claude Desktop, Cursor, Windsurf, VS Code & Zed. Connect any AI to Mail, Calendar, Contacts, iMessage, Teams, Slack, WhatsApp, Signal, OneDrive, Google Drive, Notion, Microsoft 365, Notes, Reminders, OmniFocus, Word/Excel/PowerPoint and more. Runs on your computer, no API keys — local tools read your data on your machine, and your AI provider receives the content needed for each request.
3
+ > **Use your Mac or Windows PC from ChatGPT & Claude.ai on the web** — plus local tools for Claude Desktop, Cursor, Windsurf (Devin), VS Code & Zed. Connect any AI to Mail, Calendar, Contacts, iMessage, Teams, Slack, WhatsApp, Signal, OneDrive, Google Drive, Notion, Microsoft 365, Notes, Reminders, OmniFocus, Word/Excel/PowerPoint and more. Runs on your computer, no API keys — local tools read your data on your machine, and your AI provider receives the content needed for each request.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/local-mcp?style=flat-square&label=npm)](https://www.npmjs.com/package/local-mcp)
6
6
  [![Platform](https://img.shields.io/badge/platform-macOS%2013%2B%20%7C%20Windows%2010%2B-111111?style=flat-square)](https://local-mcp.com?ref=npm)
@@ -16,15 +16,21 @@
16
16
 
17
17
  | Method | | Best for |
18
18
  |---|---|---|
19
- | **Installer** | [Download `LMCP-Installer.pkg`](https://download.local-mcp.com/LMCP-Installer.pkg) | Most users and managed fleets (MDM-deployable) |
20
- | **Terminal** | `curl -fsSL 'https://local-mcp.com/install?ref=npm' \| bash` | One-line setup |
21
- | **npx** | `npx -y local-mcp@latest setup` | Configuring AI clients from an existing Node environment |
19
+ | **Installer** | [Download LMCP](https://local-mcp.com/download?ref=npm) — picks Mac or Windows for you | Most users |
20
+ | **Terminal** | `curl -fsSL 'https://local-mcp.com/install?ref=npm' \| bash` | One-line setup on a Mac |
21
+ | **npx** | `npx -y local-mcp@latest setup` | Configuring AI clients from an existing Node environment; `link` then links this machine to your LMCP account with a code you approve on the web |
22
+
23
+ **Managed fleets (MDM):** deploy the signed package [`LMCP-Installer.pkg`](https://download.local-mcp.com/LMCP-Installer.pkg) on Macs.
22
24
 
23
25
  **Windows without Node.js:** `npx` is not available there. Use the Windows installer instead: [`LMCP-Setup.exe`](https://download.local-mcp.com/LMCP-Setup.exe).
24
26
 
25
- Auto-detects and configures Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, and Zed. Restart your AI client once.
27
+ Using ChatGPT or Claude.ai on the web needs the LMCP app (installer); npx sets up desktop AI clients.
28
+
29
+ <!-- generado:clientes (scripts/readme-npm.py; no editar a mano) -->
30
+ Auto-detects and configures Claude Desktop, Claude Code, Cursor, Windsurf (Devin), VS Code, Zed, LM Studio, Warp, Antigravity, Cline, Roo Code, Codex, Jan, OpenCode, Goose, and Hermes. Restart your AI client once.
31
+ <!-- /generado:clientes -->
26
32
 
27
- > **Cursor users:** LMCP tools only appear in **Agent mode**. Open a new Composer window (⌘I) and make sure the mode selector shows **Agent** (not Chat or Edit). Without Agent mode, the tools are installed but invisible.
33
+ > **Cursor users:** tools appear in Agent mode.
28
34
 
29
35
  ### MCP config (manual)
30
36
 
@@ -77,67 +83,17 @@ LMCP runs a native MCP server that bridges the apps on your Mac or Windows PC to
77
83
 
78
84
  &nbsp;
79
85
 
80
- ## Tool catalog (macOS)
81
-
82
- Email (12): `list_accounts` `list_email_accounts` `list_emails` `read_email` `send_email` `reply_email` `create_draft` `search_emails` `move_email` `save_attachment` `create_email_folder` `list_email_folders`
83
-
84
- Calendar (5): `list_calendar_names` `list_calendar_events` `create_calendar_event` `update_calendar_event` `delete_calendar_event`
85
-
86
- Contacts (3): `list_contacts` `search_contacts` `get_contact`
87
-
88
- Teams (9): `teams_list_teams` `teams_list_channels` `teams_list_chats` `teams_read_channel_messages` `teams_read_chat_messages` `teams_search_messages` `teams_call_history` `teams_send_message` `teams_send_channel_message`
89
-
90
- Slack (4): `slack_list_workspaces` `slack_list_channels` `slack_read_channel_messages` `slack_search_messages`
91
-
92
- WhatsApp (7): `whatsapp_connect` `whatsapp_disconnect` `whatsapp_list_chats` `whatsapp_read_messages` `whatsapp_search_messages` `whatsapp_send_message` `whatsapp_send_file`
93
-
94
- Signal (5): `signal_connect` `signal_list_chats` `signal_read_messages` `signal_search_messages` `signal_compose_guidance`
95
-
96
- OneDrive (9): `onedrive_root` `onedrive_list_files` `onedrive_read_file` `onedrive_write_file` `onedrive_move_file` `onedrive_delete_file` `onedrive_search_files` `onedrive_file_info` `onedrive_set_scope`
97
-
98
- Google Drive (6): `gdrive_root` `gdrive_list_files` `gdrive_read_file` `gdrive_write_file` `gdrive_search_files` `gdrive_file_info`
99
-
100
- Zoom (2): `zoom_list_recordings` `zoom_read_transcript`
101
-
102
- Notion (7): `notion_list_pages` `notion_read_page` `notion_search` `notion_list_databases` `notion_read_database` `notion_list_workspaces` `notion_open_page`
103
-
104
- Documents (9): `word_create` `word_read` `word_append` `excel_create` `excel_read` `excel_write_cell` `ppt_create` `ppt_read` `pdf_read`
105
-
106
- Image Playground (1): `image_playground_generate`
86
+ ## Tools
107
87
 
108
- Outlook (1): `outlook_diagnose` — health check for Outlook accounts. Use generic Mail/Calendar/Contacts tools for actual Outlook email/calendar access via Mail.app.
88
+ The full, current list of tools, by app and platform: **[local-mcp.com/tools](https://local-mcp.com/tools?ref=npm)**.
109
89
 
110
- Reminders (9): `get_reminder_folders` `list_reminders` `create_reminder` `update_reminder` `complete_reminder` `delete_reminder` `create_reminder_list` `rename_reminder_folder` `delete_reminder_folder`
90
+ <!-- generado:tools (scripts/readme-npm.py; no editar a mano) -->
91
+ **macOS and Windows:** `agent_ack` `agent_checkin` `agent_inbox` `agent_mesh_create` `agent_mesh_invite` `agent_mesh_join` `agent_mesh_revoke` `agent_mesh_status` `agent_send` `agent_sent` `agents_list` `configure_clients` `connect_m365_account` `connect_servicenow` `connect_todoist` `create_referral_invites` `daily_brief` `disconnect_m365_account` `disconnect_servicenow` `disconnect_todoist` `enable_service` `excel_create` `excel_read` `excel_write_cell` `file_list` `file_read` `file_search` `file_write` `gdrive_disconnect` `gdrive_file_info` `gdrive_list_files` `gdrive_read_file` `gdrive_root` `gdrive_search_files` `gdrive_write_file` `get_audit_log` `get_config` `get_datetime` `get_m365_person` `get_weather` `list_displays` `list_m365_accounts` `list_m365_people_insights` `list_referral_candidates` `list_windows` `lmcp_install_upgrade` `lmcp_state` `lmcp_upgrade_diagnostics` `m365_create_contact` `m365_create_draft` `m365_create_email_folder` `m365_create_event` `m365_delete_event` `m365_get_contact` `m365_list_contacts` `m365_list_email_folders` `m365_list_emails` `m365_list_events` `m365_mark_email_read` `m365_move_email` `m365_read_email` `m365_reply_email` `m365_search_contacts` `m365_search_emails` `m365_send_email` `m365_update_contact` `media_probe` `nordvpn_diagnose` `nordvpn_servers` `nordvpn_status` `obsidian_list_vaults` `obsidian_read_note` `obsidian_search_notes` `obsidian_write_note` `onedrive_delete_file` `onedrive_disconnect` `onedrive_file_info` `onedrive_list_files` `onedrive_move_file` `onedrive_read_file` `onedrive_root` `onedrive_search_files` `onedrive_set_scope` `onedrive_write_file` `outlook_diagnose` `pdf_read` `ppt_create` `ppt_read` `proton_disconnect` `proton_list_emails` `proton_read_email` `proton_search_emails` `proton_send_email` `proton_status` `recipe_delete` `recipe_discover` `recipe_export` `recipe_get` `recipe_import` `recipe_install` `recipe_list` `recipe_rename` `recipe_run` `recipe_runs` `recipe_save` `report_friction` `report_problem` `request_feature` `run_diagnostics` `run_terminal_command` `search_m365_directory` `servicenow_add_comment` `servicenow_create_incident` `servicenow_get_incident` `servicenow_list_my_incidents` `servicenow_search_incidents` `servicenow_search_kb` `servicenow_update_incident` `set_always_allowed` `set_default_m365_account` `set_default_telegram_account` `set_default_whatsapp_account` `slack_disconnect` `slack_list_workspaces` `stocks_get_chart` `stocks_get_quote` `stocks_search_symbol` `submit_diagnostics` `teams_call_history` `teams_list_channels` `teams_list_chats` `teams_list_teams` `teams_read_channel_messages` `teams_read_chat_messages` `teams_search_messages` `teams_send_channel_message` `teams_send_message` `telegram_connect` `telegram_delete_message` `telegram_disconnect` `telegram_list_accounts` `telegram_list_chats` `telegram_read_messages` `telegram_search_messages` `telegram_send_message` `telegram_unwatch_chats` `telegram_watch_chats` `telegram_watch_status` `thunderbird_accounts_status` `thunderbird_disconnect` `thunderbird_list_accounts` `thunderbird_list_emails` `thunderbird_read_email` `thunderbird_search_contacts` `thunderbird_search_emails` `thunderbird_send_email` `todo_complete_task` `todo_create_task` `todo_get_folders` `todo_list_tasks` `todoist_complete_task` `todoist_create_task` `todoist_list_projects` `todoist_list_tasks` `ui_click` `ui_find_element` `ui_get_element` `ui_keystroke` `ui_menu_bar_click` `ui_read_tree` `ui_type` `ui_wait_for_element` `video_blur_region` `video_concat` `video_export_gif` `video_reframe` `video_trim` `web_click` `web_eval` `web_extract` `web_find` `web_login` `web_navigate` `web_read` `web_screenshot` `web_session_close` `web_session_delete` `web_session_list` `web_show` `web_type` `web_wait_for` `whatsapp_connect` `whatsapp_create_group` `whatsapp_diagnose` `whatsapp_disconnect` `whatsapp_forward_message` `whatsapp_group_info` `whatsapp_list_accounts` `whatsapp_list_chats` `whatsapp_list_groups` `whatsapp_read_messages` `whatsapp_read_poll` `whatsapp_save_media` `whatsapp_search_contacts` `whatsapp_search_messages` `whatsapp_send_file` `whatsapp_send_message` `whatsapp_send_poll` `whatsapp_sync` `window_focus` `window_set_frame` `word_append` `word_create` `word_read` `zoom_list_recordings` `zoom_read_transcript`
111
92
 
112
- To Do (4): `todo_get_folders` `todo_list_tasks` `todo_create_task` `todo_complete_task`
93
+ **macOS only:** `agent_authorize` `agent_mesh_leave` `complete_omnifocus_task` `complete_reminder` `connect_chatgpt` `copy_email` `create_calendar_event` `create_draft` `create_email_folder` `create_note` `create_omnifocus_task` `create_reminder` `create_reminder_list` `delete_calendar_event` `delete_note` `delete_reminder` `delete_reminder_folder` `finder_list` `finder_search` `flag_email` `gdrive_delete_file` `get_contact` `get_reminder_folders` `image_playground_generate` `list_accounts` `list_calendar_events` `list_calendar_names` `list_contacts` `list_email_accounts` `list_email_folders` `list_emails` `list_message_chats` `list_missing_permissions` `list_notes` `list_omnifocus_folders` `list_omnifocus_projects` `list_omnifocus_tags` `list_omnifocus_tasks` `list_reminders` `lmcp_doctor` `mark_email_read` `move_email` `music_add_to_playlist` `music_list_playlists` `music_next_track` `music_now_playing` `music_pause` `music_play` `music_previous_track` `music_search_library` `music_set_volume` `notion_disconnect` `notion_list_databases` `notion_list_pages` `notion_list_workspaces` `notion_open_page` `notion_read_database` `notion_read_page` `notion_search` `permissions_status` `read_email` `read_messages` `read_note` `recipe_submit_for_review` `record_marker` `rename_reminder_folder` `reply_email` `save_attachment` `screen_record_start` `screen_record_status` `screen_record_stop` `screenshot_capture` `search_contacts` `search_emails` `search_messages` `search_notes` `search_omnifocus_tasks` `send_email` `send_message` `shortcuts_list` `shortcuts_run` `shortcuts_view` `signal_compose_guidance` `signal_connect` `signal_disconnect` `signal_list_chats` `signal_read_messages` `signal_search_messages` `slack_list_channels` `slack_read_channel_messages` `slack_search_messages` `survey_respond` `survey_skip` `update_calendar_event` `update_note` `update_reminder` `zalo_connect` `zalo_diagnose` `zalo_disconnect` `zalo_list_chats` `zalo_read_messages` `zalo_search_messages` `zalo_send_message`
113
94
 
114
- OmniFocus (7): `list_omnifocus_tasks` `list_omnifocus_projects` `list_omnifocus_folders` `list_omnifocus_tags` `search_omnifocus_tasks` `create_omnifocus_task` `complete_omnifocus_task`
115
-
116
- Notes (5): `list_notes` `read_note` `search_notes` `create_note` `update_note`
117
-
118
- Messages (4): `list_message_chats` `read_messages` `search_messages` `send_message`
119
-
120
- Stocks (3): `stocks_get_quote` `stocks_get_chart` `stocks_search_symbol`
121
-
122
- Weather (1): `get_weather`
123
-
124
- Finder (5): `finder_search` `finder_list` `fs_list` `fs_read` `fs_search`
125
-
126
- Web (13): `web_login` `web_navigate` `web_read` `web_find` `web_click` `web_type` `web_extract` `web_wait_for` `web_screenshot` `web_show` `web_eval` `web_session_list` `web_session_close`
127
-
128
- Microsoft 365 (16): `connect_m365_account` `disconnect_m365_account` `m365_list_emails` `m365_read_email` `m365_send_email` `m365_reply_email` `m365_search_emails` `m365_list_events` `m365_create_event` `m365_delete_event` `search_m365_directory` `get_m365_person` `list_m365_people_insights` `m365_list_contacts` `m365_search_contacts` `m365_get_contact`
129
-
130
- ServiceNow (9): `connect_servicenow` `disconnect_servicenow` `servicenow_list_my_incidents` `servicenow_search_incidents` `servicenow_get_incident` `servicenow_create_incident` `servicenow_update_incident` `servicenow_add_comment` `servicenow_search_kb`
131
-
132
- NordVPN (3): `nordvpn_status` `nordvpn_servers` `nordvpn_diagnose`
133
-
134
- Referral (2): `create_referral_invites` `list_referral_candidates`
135
-
136
- Agent mesh (9): `agent_mesh_status` `agent_mesh_create` `agent_mesh_invite` `agent_mesh_join` `agent_mesh_revoke` `agent_checkin` `agents_list` `agent_send` `agent_inbox`
137
-
138
- System (12): `lmcp_state` `get_config` `get_datetime` `daily_brief` `run_diagnostics` `get_audit_log` `lmcp_install_upgrade` `lmcp_upgrade_diagnostics` `report_problem` `request_feature` `report_friction` `run_terminal_command`
139
-
140
- Shortcuts (3): `shortcuts_list` `shortcuts_run` `shortcuts_view`
95
+ **Windows only:** `explorer_list` `explorer_search` `gdrive_set_scope` `outlook_calendar_create_event` `outlook_calendar_delete_event` `outlook_calendar_list_events` `outlook_calendar_list_names` `outlook_contacts_list` `outlook_contacts_search` `outlook_create_folder` `outlook_flag_email` `outlook_forward_email` `outlook_get_contact` `outlook_list_accounts` `outlook_list_emails` `outlook_mark_email_read` `outlook_move_email` `outlook_read_email` `outlook_reply_all` `outlook_reply_email` `outlook_save_attachment` `outlook_search_emails` `outlook_send_email` `sharepoint_list_files` `sharepoint_list_sites` `sharepoint_read_file` `todo_list_lists` `update_local_mcp` `update_self_diagnosis`
96
+ <!-- /generado:tools -->
141
97
 
142
98
  &nbsp;
143
99
 
@@ -155,8 +111,8 @@ Shortcuts (3): `shortcuts_list` `shortcuts_run` `shortcuts_view`
155
111
  Full policy: **[local-mcp.com/en/privacy](https://local-mcp.com/en/privacy)**.
156
112
 
157
113
  - **What we collect from your apps:** Nothing. Reading email, calendar, contacts, messages, files, and other Mac apps runs entirely on your machine — no email content, calendar events, contacts, messages, or file contents are ever transmitted to our servers or any third party. No API keys or accounts are required for your apps.
158
- - **Anonymous telemetry:** server/OS version, CPU architecture, uptime, a hashed machine ID, and tool-call counts (never content). No personal information included. Disable in LMCP Settings.
159
- - **Optional cloud relay:** opt-in and disabled by default. When enabled, MCP traffic you initiate passes through an encrypted WebSocket tunnel and is never stored; only the email used to associate the tunnel is retained.
114
+ - **Anonymous telemetry:** server/OS version, CPU architecture, uptime, a hashed machine ID, and tool-call counts (never content). No personal information included. Disable it in the LMCP menu-bar / tray settings.
115
+ - **Optional cloud relay:** opt-in and disabled by default. When enabled, MCP traffic you initiate passes through an encrypted WebSocket tunnel and is never stored. The tunnel belongs to the LMCP account you sign in with; no email is typed in to set it up.
160
116
  - **Third-party sharing:** none. Hosting/CDN providers (Railway, Cloudflare) never receive your personal Mac data.
161
117
  - **Retention:** heartbeats 90 days; install events 12 months (anonymized after); account records for their duration + 1 year; feedback until resolved or deleted on request.
162
118
  - **Contact:** privacy and data-rights requests — [privacy@local-mcp.com](mailto:privacy@local-mcp.com).
@@ -166,18 +122,32 @@ Full policy: **[local-mcp.com/en/privacy](https://local-mcp.com/en/privacy)**.
166
122
  ## Requirements
167
123
 
168
124
  - macOS 13 Ventura or later (Apple Silicon and Intel), or Windows 10 or later (64-bit)
169
- - One of: Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, Zed
125
+ <!-- generado:rutas (scripts/readme-npm.py; no editar a mano) -->
126
+ - One of: Claude Desktop, Claude Code, Cursor, Windsurf (Devin), VS Code, Zed, LM Studio, Warp, Antigravity, Cline, Roo Code, Codex, Jan, OpenCode, Goose, and Hermes
170
127
 
171
128
  ### Config file locations
172
129
 
173
- | Client | Path |
174
- |--------|------|
175
- | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` |
176
- | Claude Code | `~/.claude.json` |
177
- | Cursor | `~/.cursor/mcp.json` |
178
- | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
179
- | VS Code | `~/.vscode/mcp.json` |
180
- | Zed | `~/.config/zed/settings.json` |
130
+ `{host}` is the VS Code-family editor that hosts the extension: `Code`, `Code - Insiders`, `Cursor` or `VSCodium`.
131
+
132
+ | Client | macOS | Windows |
133
+ |--------|-------|---------|
134
+ | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` | `%APPDATA%/Claude/claude_desktop_config.json`<br>`%LOCALAPPDATA%/Packages/Claude_*/LocalCache/Roaming/Claude/claude_desktop_config.json` |
135
+ | Claude Code | `~/.claude.json` | `~/.claude.json` |
136
+ | Cursor | `~/.cursor/mcp.json` | `~/.cursor/mcp.json` |
137
+ | Windsurf (Devin) | `~/.config/devin/mcp_config.json`<br>`~/.codeium/windsurf/mcp_config.json` | `~/.codeium/windsurf/mcp_config.json` |
138
+ | VS Code | `~/Library/Application Support/Code/User/mcp.json` | `%APPDATA%/Code/User/mcp.json` |
139
+ | Zed | `~/.config/zed/settings.json` | `%APPDATA%/Zed/settings.json` |
140
+ | LM Studio | `~/.lmstudio/mcp.json` | `~/.lmstudio/mcp.json` |
141
+ | Warp | `~/.warp/.mcp.json` | `~/.warp/.mcp.json` |
142
+ | Antigravity | `~/.gemini/config/mcp_config.json`<br>`~/.gemini/antigravity/mcp_config.json` | `~/.gemini/config/mcp_config.json`<br>`~/.gemini/antigravity/mcp_config.json` |
143
+ | Cline | `~/Library/Application Support/{host}/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` | `%APPDATA%/{host}/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` |
144
+ | Roo Code | `~/Library/Application Support/{host}/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json` | `%APPDATA%/{host}/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json` |
145
+ | Codex | `~/.codex/config.toml` | `~/.codex/config.toml` |
146
+ | Jan | `~/Library/Application Support/Jan/data/mcp_config.json` | `%APPDATA%/Jan/data/mcp_config.json` |
147
+ | OpenCode | `~/.config/opencode/opencode.json` | `~/.config/opencode/opencode.json` |
148
+ | Goose | `~/.config/goose/config.yaml` | `%APPDATA%/Block/goose/config/config.yaml` |
149
+ | Hermes | `~/.hermes/config.yaml` | `%LOCALAPPDATA%/hermes/config.yaml` |
150
+ <!-- /generado:rutas -->
181
151
 
182
152
  &nbsp;
183
153
 
@@ -196,14 +166,18 @@ The LMCP server ships inside the npm package: npm installs the signed binary for
196
166
 
197
167
  ## Uninstall
198
168
 
169
+ Mac:
170
+
199
171
  ```bash
200
172
  curl -fsSL 'https://local-mcp.com/uninstall' | bash
201
173
  ```
202
174
 
203
- Stops all background processes, removes the LaunchAgent, deletes the app and binaries, and cleans up MCP config entries from every configured AI client. Your emails, calendar, and other data are never stored by LMCP and remain completely untouched.
175
+ On a Mac: stops all background processes, removes the LaunchAgent, deletes the app and binaries, and cleans up MCP config entries from every configured AI client.
176
+
177
+ On Windows: **Settings → Apps → Installed apps → LMCP → Uninstall**. Your emails, calendar, and other data are never stored by LMCP and remain completely untouched.
204
178
 
205
179
  &nbsp;
206
180
 
207
181
  ## Links
208
182
 
209
- [Website](https://local-mcp.com?ref=npm) · [GitHub](https://github.com/colibird-ai/local-mcp-releases) · [Guides](https://local-mcp.com/guides) · Support: ctpo@colibird.co
183
+ [Website](https://local-mcp.com?ref=npm) · [GitHub](https://github.com/colibird-ai/local-mcp-releases) · [Guides](https://local-mcp.com/guides) · [Tools](https://local-mcp.com/tools?ref=npm) · Support: [hello@local-mcp.com](mailto:hello@local-mcp.com)
package/bundled.js CHANGED
@@ -22,6 +22,40 @@ const TARGETS = {
22
22
  'win32-arm64': { pkg: 'local-mcp-windows-arm64', os: 'win32', cpu: 'arm64', bin: 'lmcp-server.exe', url: 'windows_arm64', hash: 'windows-arm64' },
23
23
  }
24
24
 
25
+ // lmcp-npm#138: every server command the wrapper runs → the first release that has it, per OS.
26
+ // npm 3.0.429 shipped link.js with the 3.0.428 servers, which lack `link --json` (lmcp-win#1227,
27
+ // lmcp-mac#1457). scripts/paquetes-plataforma.sh refuses a binary below a floor, so the wrapper never
28
+ // publishes ahead of its servers; test/servidor-minimo-138.test.js holds every command to this table.
29
+ // 3.0.423 is the first release npm carries: older commands need nothing more.
30
+ const SERVER_MIN = {
31
+ '--auto': { darwin: '3.0.423', win32: '3.0.423' },
32
+ '--version': { darwin: '3.0.423', win32: '3.0.423' },
33
+ '--export-tools': { darwin: '3.0.423', win32: '3.0.423' },
34
+ // `extra`: value flags setup.js pushes onto the command (`--command=<c>`, `--arg=<a>`), same release.
35
+ '--configure-clients --json': { darwin: '3.0.423', win32: '3.0.423', extra: ['--command=', '--arg='] },
36
+ 'link --json': { darwin: '3.0.429', win32: '3.0.429' },
37
+ 'link --approve --json': { darwin: '3.0.429', win32: '3.0.429' },
38
+ 'link --deny --json': { darwin: '3.0.429', win32: '3.0.429' },
39
+ // lmcp-api#761: optional. The wrapper goes on without it (runRegister reads «unsupported»), so it never
40
+ // holds a package back. Each OS's floor is set when that OS's release ships the subcommand: the Mac
41
+ // and Windows numbers are independent lines, the same number is not the same features.
42
+ 'register --json': { darwin: null, win32: null, optional: true },
43
+ }
44
+
45
+ const _version = (v) => (/^\d+\.\d+\.\d+$/.test(String(v)) ? String(v).split('.').map(Number) : null)
46
+
47
+ /** The commands a server of `os` at release `version` lacks; all of them when the version is unreadable. */
48
+ function serverMissing (os, version) {
49
+ const v = _version(version)
50
+ return Object.keys(SERVER_MIN).filter((c) => {
51
+ if (SERVER_MIN[c].optional) return false
52
+ const min = _version(SERVER_MIN[c][os])
53
+ if (!v || !min) return true
54
+ const d = v.findIndex((x, i) => x !== min[i])
55
+ return d !== -1 && v[d] < min[d]
56
+ }).sort()
57
+ }
58
+
25
59
  /**
26
60
  * Absolute path of the bundled server for this platform, or null when there is none: an
27
61
  * unsupported platform/arch, or the platform package was not installed (`--omit=optional`, a
@@ -37,4 +71,4 @@ function bundledServerPath (platform = process.platform, arch = process.arch, re
37
71
  }
38
72
  }
39
73
 
40
- module.exports = { TARGETS, bundledServerPath }
74
+ module.exports = { TARGETS, SERVER_MIN, serverMissing, bundledServerPath }
package/index.js CHANGED
@@ -74,6 +74,8 @@ function marcarAvisoDesinstalado() {
74
74
  // client would relaunch it in a loop). It stays alive on stdio and answers initialize and every tool
75
75
  // with a clear error, until the client closes stdin. Newline-delimited JSON-RPC, no dependencies.
76
76
  const MENSAJE_DESINSTALADO = 'LMCP was uninstalled; remove it from this AI client'
77
+ // #159: said before anything is touched. Stopping the server instead would end a live AI session.
78
+ const UNINSTALL_IN_USE = 'LMCP was not uninstalled: an open AI app is using it, and nothing was changed.\nClose your AI apps, then run again: npx -y local-mcp@latest uninstall'
77
79
  function quedarseVivoDesinstalado() {
78
80
  evento.silenciar()
79
81
  if (process.stdin.isTTY) process.exit(0)
@@ -136,10 +138,15 @@ function reportarLanzamiento(outcome, opciones) {
136
138
  }
137
139
  // Antes que nada: un `spawned` que en Windows esperaba su id sale ahora, por el proceso suelto (#21).
138
140
  // La red dice además por qué (#82), como clase: una excepción que nadie atrapó, o no se sabe.
141
+ // #133: la excepción lleva su clase o su código de Node (evento.claseDeError), nunca el mensaje.
139
142
  let razonDeSalida = 'unknown'
143
+ let claseDeSalida
140
144
  if (ES_LANZAMIENTO) {
141
- process.on('uncaughtExceptionMonitor', () => { razonDeSalida = 'uncaught-exception' })
142
- process.on('exit', () => { evento.soltarPendiente(); reportarLanzamiento('other', { reason: razonDeSalida }) })
145
+ process.on('uncaughtExceptionMonitor', (err) => { razonDeSalida = 'uncaught-exception'; claseDeSalida = evento.claseDeError(err) })
146
+ process.on('exit', () => {
147
+ evento.soltarPendiente()
148
+ reportarLanzamiento('other', { reason: razonDeSalida, errorClass: claseDeSalida })
149
+ })
143
150
  }
144
151
  // #82: un server que sale con error dentro de esta ventana no arrancó. El `spawned` espera a que
145
152
  // pase; el server y el cliente no esperan nada: sólo se demora el evento.
@@ -267,6 +274,14 @@ async function main() {
267
274
  if (cmd === 'uninstall') {
268
275
  const { CACHE_DIR } = require('./download')
269
276
  const fs = require('fs')
277
+ const { runtimeInUse } = require('./unconfigure')
278
+
279
+ // #159: with the app the runtime stays, so what runs from it does not matter.
280
+ if (!menuBarAppInstalled() && runtimeInUse(CACHE_DIR).length) {
281
+ console.error(UNINSTALL_IN_USE)
282
+ process.exitCode = 1
283
+ return
284
+ }
270
285
 
271
286
  if (process.platform === 'darwin') {
272
287
  const home = os.homedir()
@@ -313,13 +328,30 @@ async function main() {
313
328
  console.log('Could not remove the entries from your AI apps: ' + e.message)
314
329
  }
315
330
 
316
- if (fs.existsSync(CACHE_DIR)) {
317
- fs.rmSync(CACHE_DIR, { recursive: true, force: true })
331
+ // #144: on Windows the installed app shares the runtime folder (its lmcp-tray.exe lives there),
332
+ // the Roaming config and both credentials. Read before anything is removed; with the app, none of it is.
333
+ const { localState, removeLocalState, localStateReport } = require('./unconfigure')
334
+ const st = localState({ appInstalled: menuBarAppInstalled() })
335
+ if (st && st.appInstalled) {
336
+ console.log(`The LMCP app is installed: its runtime (${CACHE_DIR}), settings and sign-in stay. Uninstall the app from Windows Settings to remove them.`)
337
+ } else if (fs.existsSync(CACHE_DIR)) {
338
+ try {
339
+ fs.rmSync(CACHE_DIR, { recursive: true, force: true })
340
+ } catch (e) { // #159: started after the check, or held some other way
341
+ console.error(`LMCP was not fully uninstalled (${e.code}): close your AI apps, then run again: npx -y local-mcp@latest uninstall`)
342
+ process.exitCode = 1
343
+ return
344
+ }
318
345
  console.log(`Removed the runtime from ${CACHE_DIR}`)
319
346
  } else {
320
347
  console.log('No cached runtime.')
321
348
  }
322
- console.log('Local MCP uninstalled.')
349
+ // #144: without the app, also the relay token, the device key, the Roaming config, logs and caches.
350
+ try {
351
+ for (const line of localStateReport(removeLocalState(st))) console.log(line)
352
+ } catch (e) {
353
+ console.log('Could not remove all of LMCP\'s data: ' + e.message)
354
+ }
323
355
  return
324
356
  }
325
357
 
@@ -476,7 +508,11 @@ async function main() {
476
508
  if (arranque) {
477
509
  clearTimeout(arranque)
478
510
  if (code === 0) reportarLanzamiento('spawned')
479
- else reportarLanzamiento('spawn-failed', { reason: signal ? 'signal' : 'early-exit' })
511
+ else if (signal) {
512
+ // #133: el cliente que cierra el server es `client-closed`; una señal de caída sigue siendo una falla.
513
+ const s = evento.salidaPorSenal(signal)
514
+ reportarLanzamiento(s.outcome, { reason: s.reason, signal: s.signal })
515
+ } else reportarLanzamiento('spawn-failed', { reason: 'early-exit' })
480
516
  }
481
517
  process.exit(code ?? 0)
482
518
  })
@@ -519,6 +555,7 @@ async function main() {
519
555
  if (require.main === module) {
520
556
  main().catch(err => {
521
557
  razonDeSalida = 'uncaught-exception'
558
+ claseDeSalida = evento.claseDeError(err)
522
559
  process.stderr.write(`Error fatal: ${err.message}\n`)
523
560
  process.exit(1)
524
561
  })
package/launch-event.js CHANGED
@@ -20,7 +20,7 @@ const DESTINO = { hostname: 'office-mcp-production.up.railway.app', path: '/laun
20
20
  const PLATAFORMAS = ['darwin', 'win32', 'linux', 'other']
21
21
  const CLASES = ['none', 'stdio', 'unknown', 'start', 'serve', 'server', 'run', 'mcp', '--stdio', 'other-word', 'other-flag']
22
22
  const OUTCOMES = ['spawned', 'rejected-argument', 'unsupported-node', 'unsupported-platform',
23
- 'download-failed', 'spawn-failed', 'uninstalled', 'other']
23
+ 'download-failed', 'spawn-failed', 'uninstalled', 'other', 'client-closed']
24
24
  // #82: por qué falló, como clase. Sólo acompaña a un outcome de falla, y sólo donde hay algo que
25
25
  // clasificar (`download-failed`, `spawn-failed`, `other`); `checksum-mismatch` e `init-failed`
26
26
  // son del contrato y este wrapper no los produce.
@@ -32,6 +32,23 @@ const CAMINO = 'npm-wrapper' // launch_path: quién arrancó el server
32
32
  const FUENTES = ['bundled', 'app_embedded', 'missing_platform']
33
33
  let fuenteBinario
34
34
  function fuente (valor) { if (FUENTES.includes(valor)) fuenteBinario = valor }
35
+ // #133: la señal que terminó al server, por su nombre. Las que un cliente manda para cerrarlo son `client-closed`,
36
+ // no una falla; las demás son una caída. SIGKILL queda como caída: puede ser el cliente, pero también el sistema
37
+ // matando al proceso, y desde acá no se distingue.
38
+ const SENALES = ['SIGTERM', 'SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGKILL', 'SIGPIPE', 'SIGSEGV', 'SIGABRT', 'SIGBUS',
39
+ 'SIGILL', 'SIGFPE', 'SIGTRAP', 'SIGUSR1', 'SIGUSR2', 'SIGBREAK']
40
+ const DEL_CLIENTE = ['SIGTERM', 'SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGPIPE', 'SIGBREAK']
41
+ function salidaPorSenal (signal) {
42
+ const s = SENALES.includes(signal) ? { signal } : {}
43
+ return DEL_CLIENTE.includes(signal) ? { outcome: 'client-closed', ...s } : { outcome: 'spawn-failed', reason: 'signal', ...s }
44
+ }
45
+ // #133: de una excepción no atrapada viaja su código de Node o su clase, nunca el mensaje.
46
+ const RE_CLASE_ERROR = /^[A-Za-z][A-Za-z0-9_]{0,47}$/
47
+ function claseDeError (err) {
48
+ if (!err || typeof err !== 'object') return undefined
49
+ for (const v of [err.code, err.name]) if (typeof v === 'string' && RE_CLASE_ERROR.test(v)) return v
50
+ return undefined
51
+ }
35
52
  const RE_VERSION = /^\d{1,3}\.\d{1,3}\.\d{1,5}$/
36
53
  const RE_MAQUINA = /^[A-Za-z0-9._:{}-]{1,64}$/
37
54
  const [TIMEOUT_MS, TOPE_MS] = [3000, 4000] // el pedido · la vida del proceso suelto
@@ -90,7 +107,11 @@ function cuerpo (outcome, clase, deps = {}) {
90
107
  launch_path: CAMINO
91
108
  }
92
109
  // Una razón fuera del conjunto no viaja, y un `spawned` no lleva razón; el evento sale igual.
93
- if (outcome !== 'spawned' && RAZONES.includes(deps.reason)) c.reason = deps.reason
110
+ if (outcome !== 'spawned' && outcome !== 'client-closed' && RAZONES.includes(deps.reason)) c.reason = deps.reason
111
+ if (SENALES.includes(deps.signal) && (outcome === 'client-closed' || c.reason === 'signal')) c.signal_name = deps.signal
112
+ if (outcome !== 'spawned' && typeof deps.errorClass === 'string' && RE_CLASE_ERROR.test(deps.errorClass)) {
113
+ c.error_class = deps.errorClass
114
+ }
94
115
  const f = 'binarySource' in deps ? deps.binarySource : fuenteBinario
95
116
  if (FUENTES.includes(f)) c.binary_source = f
96
117
  const id = 'machineId' in deps ? deps.machineId : idDeMaquina()
@@ -176,7 +197,7 @@ function idDeHardwareWindows (listo) {
176
197
  // Una persona en una terminal (stdin TTY) no es un cliente de IA lanzando el server: no reporta.
177
198
  let reportado = false
178
199
  let pendiente = null
179
- function reportar (outcome, clase, { enProceso = false, reason } = {}) {
200
+ function reportar (outcome, clase, { enProceso = false, reason, signal, errorClass } = {}) {
180
201
  if (reportado) return
181
202
  reportado = true
182
203
  try {
@@ -207,7 +228,7 @@ function reportar (outcome, clase, { enProceso = false, reason } = {}) {
207
228
  if (c) enviar(c, { soltar: true })
208
229
  return
209
230
  }
210
- lanzarSuelto(outcome, clase, reason)
231
+ lanzarSuelto(outcome, clase, { reason, signal, errorClass })
211
232
  } catch {}
212
233
  }
213
234
 
@@ -215,11 +236,24 @@ function reportar (outcome, clase, { enProceso = false, reason } = {}) {
215
236
  // como reportado para que la red del `exit` tampoco lo mande como `other`.
216
237
  function silenciar () { reportado = true }
217
238
 
218
- function lanzarSuelto (outcome, clase, reason) {
219
- // La razón viaja como argumento sólo si es del conjunto: al proceso suelto no le llega texto libre.
220
- // La fuente del binario va detrás, también sólo si es del conjunto (RAZONES y FUENTES no se cruzan).
221
- const hijo = cp.spawn(process.execPath, [__filename, outcome, clase, ...(RAZONES.includes(reason) ? [reason] : []),
222
- ...(FUENTES.includes(fuenteBinario) ? [fuenteBinario] : [])],
239
+ // La razón, la fuente del binario y la señal viajan como argumento sólo si son del conjunto (los tres no se
240
+ // cruzan); la clase de error, sólo si pasa su regex y con prefijo. Al proceso suelto no le llega texto libre.
241
+ function argumentosSueltos (outcome, clase, { reason, signal, errorClass } = {}) {
242
+ return [outcome, clase, ...(RAZONES.includes(reason) ? [reason] : []),
243
+ ...(FUENTES.includes(fuenteBinario) ? [fuenteBinario] : []),
244
+ ...(SENALES.includes(signal) ? [signal] : []),
245
+ ...(typeof errorClass === 'string' && RE_CLASE_ERROR.test(errorClass) ? ['error_class=' + errorClass] : [])]
246
+ }
247
+ function desdeArgv (argv) {
248
+ const resto = argv.slice(2)
249
+ const clase = resto.map(a => a.startsWith('error_class=') ? a.slice(12) : null).find(a => a !== null)
250
+ return { outcome: argv[0], clase: argv[1], reason: resto.find(a => RAZONES.includes(a)),
251
+ binarySource: resto.find(a => FUENTES.includes(a)), signal: resto.find(a => SENALES.includes(a)),
252
+ errorClass: clase !== undefined && RE_CLASE_ERROR.test(clase) ? clase : undefined }
253
+ }
254
+
255
+ function lanzarSuelto (outcome, clase, opciones) {
256
+ const hijo = cp.spawn(process.execPath, [__filename, ...argumentosSueltos(outcome, clase, opciones)],
223
257
  { detached: true, stdio: 'ignore', windowsHide: true })
224
258
  hijo.on('error', () => {})
225
259
  hijo.unref()
@@ -238,12 +272,11 @@ function soltarPendiente () {
238
272
  // Como programa es el proceso suelto: `node launch-event.js <outcome> <clase> [reason] [binary_source]`.
239
273
  if (require.main === module) {
240
274
  setTimeout(() => process.exit(0), TOPE_MS).unref()
241
- const c = apagado() ? null : cuerpo(process.argv[2], process.argv[3], {
242
- reason: process.argv.slice(4).find(a => RAZONES.includes(a)),
243
- binarySource: process.argv.slice(4).find(a => FUENTES.includes(a))
244
- })
275
+ const a = desdeArgv(process.argv.slice(2))
276
+ const c = apagado() ? null : cuerpo(a.outcome, a.clase, a)
245
277
  if (c) enviar(c)
246
278
  }
247
279
 
248
- module.exports = { PLATAFORMAS, CLASES, OUTCOMES, RAZONES, CAMINO, FUENTES, fuente, razonDeError, RE_VERSION, RE_MAQUINA, TOPE_ID_MS, claseDeArgumento, apagado, cuerpo, reportar, silenciar, soltarPendiente,
280
+ module.exports = { PLATAFORMAS, CLASES, OUTCOMES, RAZONES, CAMINO, FUENTES, SENALES, RE_CLASE_ERROR, fuente, razonDeError,
281
+ salidaPorSenal, claseDeError, argumentosSueltos, desdeArgv, RE_VERSION, RE_MAQUINA, TOPE_ID_MS, claseDeArgumento, apagado, cuerpo, reportar, silenciar, soltarPendiente,
249
282
  _idDeHardwareWindows: idDeHardwareWindows } // costura de test