imsg-mcp 1.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and follows [Semantic Versioning](https://semver.org/).
5
+
6
+ <!-- semantic-release populates entries above this line. -->
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 George G
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # imsg-mcp
2
+
3
+ [![npm version](https://img.shields.io/npm/v/imsg-mcp.svg)](https://www.npmjs.com/package/imsg-mcp)
4
+ [![CI](https://github.com/george43g/imsg-mcp/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/george43g/imsg-mcp/actions/workflows/ci.yml)
5
+ [![Release](https://github.com/george43g/imsg-mcp/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/george43g/imsg-mcp/actions/workflows/release.yml)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+
8
+ **MCP server, CLI, and terminal UI for iMessage on macOS.** Let AI agents read your iMessage / SMS, search history, send messages, and export conversations — without ever leaving your machine. Includes a self-healing watchdog so a wedged query can't take your agent down.
9
+
10
+ ![TUI overview](docs/screenshots/tui-overview.png)
11
+
12
+ [**More screenshots →**](docs/SCREENSHOTS.md) · [**Workflows →**](docs/WORKFLOWS.md) · [**Tool reference →**](docs/TOOLS.md)
13
+
14
+ ---
15
+
16
+ ## Install
17
+
18
+ ### Claude Desktop (one-click)
19
+
20
+ Download `imsg-mcp.mcpb` from [the latest release](https://github.com/george43g/imsg-mcp/releases/latest) and double-click. See [llms-install.md](llms-install.md) for the agent-narrated install flow.
21
+
22
+ ### Any MCP host (npx, one-liner)
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "imessage": {
28
+ "command": "npx",
29
+ "args": ["-y", "imsg-mcp", "mcp"]
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ Drop into `claude_desktop_config.json` (Claude Desktop) or `mcp.json` (Cursor / Warp). Bun users: `bunx imsg-mcp mcp` is ~10× faster cold-start.
36
+
37
+ ### Autodetect everything
38
+
39
+ ```bash
40
+ npx -y imsg-mcp setup --write claude # or --write cursor
41
+ npx -y imsg-mcp doctor # verify Full Disk Access + DB
42
+ ```
43
+
44
+ ---
45
+
46
+ ## Quickstart: Export a group thread
47
+
48
+ The canonical workflow — find a conversation in the TUI, copy its handle, export it from the CLI:
49
+
50
+ ```bash
51
+ imsg tui # browse, /filter to find the group
52
+ # press `y` to copy the threadSlug
53
+ imsg export weekend-crew~imsg~d4e5 \
54
+ --since '3 months ago' \
55
+ --include-attachments \
56
+ --output ~/weekend-crew.md
57
+ ```
58
+
59
+ Full walkthrough with screenshots: [**docs/WORKFLOWS.md**](docs/WORKFLOWS.md).
60
+
61
+ ---
62
+
63
+ ## MCP tools
64
+
65
+ <details>
66
+ <summary><b>15 tools shipped (click to expand)</b></summary>
67
+
68
+ | Tool | Purpose |
69
+ |------|---------|
70
+ | `get_messages` | Paginated messages from a chat. |
71
+ | `get_unread_messages` | Unread messages across all chats. |
72
+ | `list_conversations` | Chats with `threadSlug`, snippets, unread counts. |
73
+ | `search_messages` | Fuzzy + literal search across history. |
74
+ | `send_message` | Send via Messages.app (text + attachments). |
75
+ | `wait_for_reply` | Poll for the next reply. |
76
+ | `export_messages` | Stream a chat to file (md/csv/json/ndjson). |
77
+ | `search_attachments` | Find attachments by mime/date/chat. |
78
+ | `get_attachment` | Fetch attachment bytes (inline or path). |
79
+ | `check_imessage_availability` | Pre-flight iMessage vs SMS reachability. |
80
+ | `chat_analytics` | Pre-aggregated stats (heatmaps, leaderboards, etc). |
81
+ | `list_contacts` / `search_contacts` / `get_contact` | Contact lookup. |
82
+ | `resolve_handle` | Phone/email → contact name. |
83
+
84
+ </details>
85
+
86
+ Full reference (CLI subcommands + MCP tools + every flag): [**docs/TOOLS.md**](docs/TOOLS.md).
87
+
88
+ ---
89
+
90
+ ## Terminal UI
91
+
92
+ ```bash
93
+ imsg tui
94
+ ```
95
+
96
+ Vim-style: `j/k` move, `gg/G` jump, `Enter` drawer, `o` Quick Look an attachment, `:` jump to date, `V` visual select, `e` export, `S` send via other app, `y` copy slug, `c` compose, `q` quit.
97
+
98
+ Themes (`safe` / `powerline`) and a single accent color drive the whole palette. See [docs/TOOLS.md#tui-configuration](docs/TOOLS.md#tui-configuration).
99
+
100
+ ---
101
+
102
+ ## Permissions
103
+
104
+ - **Full Disk Access** — required to read `chat.db` and Address Book. System Settings → Privacy & Security → Full Disk Access → add the terminal/IDE you actually run from.
105
+ - **Automation** — required only for sending. macOS prompts on first send.
106
+
107
+ Privacy: only ever reads your **local** `~/Library/Messages/chat.db`. Nothing is uploaded. The connected MCP host (Claude / Cursor / Warp / …) sees whatever messages the agent fetches — treat those hosts the same way you treat any app with Full Disk Access.
108
+
109
+ ---
110
+
111
+ ## Contributing
112
+
113
+ ```bash
114
+ pnpm install
115
+ pnpm verify # lint + typecheck + test + build
116
+ pnpm hook:install # opt-in pre-push hook for screenshot regen (macOS only)
117
+ pnpm screenshots # regenerate vhs tapes (requires JetBrains Mono)
118
+ pnpm screenshots:native # regenerate native macOS captures (manual only)
119
+ ```
120
+
121
+ Screenshots are auto-regenerated by a local pre-push hook when `src/tui/**` or `scripts/screenshots/*.tape` change. CI verifies that committed PNGs match the current source. See [docs/SCREENSHOTS.md#regeneration](docs/SCREENSHOTS.md#regeneration).
122
+
123
+ ---
124
+
125
+ ## License
126
+
127
+ MIT