Explorar o código

Release v1.0.0 - Update documentation and version

- Update all versions from 0.1.0 to 1.0.0
- Update README with complete feature documentation
- Update CHANGELOG with full 1.0.0 release notes
- Update CLAUDE.md with new tool documentation
- Remove WIP notices (all features implemented and tested)
Robert Sweet hai 5 meses
pai
achega
db2c8cc98b
Modificáronse 6 ficheiros con 145 adicións e 60 borrados
  1. 2 2
      .claude-plugin/marketplace.json
  2. 1 1
      .claude-plugin/plugin.json
  3. 43 20
      CHANGELOG.md
  4. 34 5
      CLAUDE.md
  5. 64 31
      README.md
  6. 1 1
      package.json

+ 2 - 2
.claude-plugin/marketplace.json

@@ -1,7 +1,7 @@
 {
   "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
   "name": "apple-mail-mcp",
-  "version": "0.1.0",
+  "version": "1.0.0",
   "description": "Apple Mail integration for Claude Code via MCP",
   "owner": {
     "name": "Rob Sweet",
@@ -11,7 +11,7 @@
     {
       "name": "apple-mail",
       "description": "Manage Apple Mail through natural language - read, search, send, and organize emails",
-      "version": "0.1.0",
+      "version": "1.0.0",
       "author": {
         "name": "Rob Sweet",
         "email": "rob@superiortech.io"

+ 1 - 1
.claude-plugin/plugin.json

@@ -1,6 +1,6 @@
 {
   "name": "apple-mail",
-  "version": "0.1.0",
+  "version": "1.0.0",
   "description": "Manage Apple Mail through natural language - read, search, send, and organize emails (macOS only)",
   "author": {
     "name": "Rob Sweet",

+ 43 - 20
CHANGELOG.md

@@ -5,27 +5,50 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
-## [Unreleased]
-
-### Added
-- Initial project structure forked from apple-notes-mcp
-- MCP server skeleton with tool definitions
-- TypeScript types for Mail data models (Message, Mailbox, Account)
-- AppleMailManager class with stub methods
-- Working `list-accounts` tool via AppleScript
-- Working `health-check` tool for Mail.app connectivity
-- AppleScript utilities with error handling, retries, and timeouts
-
-### Changed
-- Updated all references from Apple Notes to Apple Mail
-- Updated error mappings for Mail-specific errors
+## [1.0.0] - 2026-01-06
+
+First stable release with full Apple Mail integration.
+
+### Features
+
+#### Message Operations
+- **search-messages** - Search messages by query, sender, subject with filtering options
+- **list-messages** - List messages in any mailbox with pagination
+- **get-message** - Retrieve full message content (subject, body, metadata)
+- **send-email** - Send emails with To, CC, BCC recipients from any account
+- **create-draft** - Save emails to Drafts folder without sending
+- **reply-to-message** - Reply to messages with reply-all support, send or save as draft
+- **forward-message** - Forward messages to new recipients with optional body
+- **mark-as-read** / **mark-as-unread** - Toggle message read status
+- **flag-message** / **unflag-message** - Toggle message flagged status
+- **delete-message** - Move messages to Trash
+- **move-message** - Organize messages into mailboxes
+
+#### Mailbox Operations
+- **list-mailboxes** - List all mailboxes/folders with unread counts
+- **get-unread-count** - Get unread count for specific mailbox or all accounts
+
+#### Account Operations
+- **list-accounts** - List all configured Mail accounts
+
+#### Diagnostics
+- **health-check** - Verify Mail.app connectivity and permissions
+- **get-mail-stats** - Get message and unread counts per account
+
+### Technical
+- Full AppleScript integration with proper escaping and error handling
+- Retry logic with exponential backoff for transient failures
+- User-friendly error messages with actionable suggestions
+- Debug logging support (set DEBUG=1 or VERBOSE=1)
+- 60-second timeout for message search operations
+- Message ID lookup across all mailboxes for reliable operations
 
 ## [0.1.0] - 2026-01-06
 
-Initial release - work in progress.
+Initial release - project skeleton.
 
-### Features (Stubbed)
-- Message operations: search, list, get, send, mark read/unread, flag, delete, move
-- Mailbox operations: list mailboxes, get unread count
-- Account operations: list accounts
-- Diagnostics: health check, mail statistics
+### Added
+- Initial project structure forked from apple-notes-mcp
+- MCP server skeleton with tool definitions
+- TypeScript types for Mail data models
+- AppleScript utilities with error handling

+ 34 - 5
CLAUDE.md

@@ -6,8 +6,6 @@ This file provides guidance for AI agents (Claude, etc.) when using this MCP ser
 
 This MCP server enables AI assistants to interact with Apple Mail on macOS via AppleScript. All operations are local - no data leaves the user's machine.
 
-> ⚠️ **Work in Progress** - Many tools are stubbed and not yet functional.
-
 ## Tool Usage Tips
 
 ### Message Operations
@@ -24,7 +22,23 @@ This MCP server enables AI assistants to interact with Apple Mail on macOS via A
 - `body` is plain text by default
 - Specify `account` to send from a specific account
 
-#### mark-as-read / mark-as-unread / flag-message / delete-message
+#### create-draft
+- Same parameters as `send-email`
+- Saves to Drafts folder without sending
+- User can review and send manually from Mail.app
+
+#### reply-to-message
+- Requires message `id` to reply to
+- Set `replyAll: true` to reply to all recipients
+- Set `send: false` to save as draft instead of sending
+
+#### forward-message
+- Requires message `id` to forward
+- `to` must be an array of recipient addresses
+- Optional `body` to prepend a message
+- Set `send: false` to save as draft instead of sending
+
+#### mark-as-read / mark-as-unread / flag-message / unflag-message / delete-message
 - All require a message `id`
 - Get message IDs from `search-messages` or `list-messages`
 
@@ -56,6 +70,7 @@ This MCP server enables AI assistants to interact with Apple Mail on macOS via A
 | "Message not found" | Message ID is invalid or message was deleted |
 | "Permission denied" | macOS automation permission needed |
 | "Account not found" | Account name doesn't match exactly |
+| "Failed to send email" | Network issue or Mail.app configuration problem |
 
 ## Security Considerations
 
@@ -74,8 +89,22 @@ This MCP server enables AI assistants to interact with Apple Mail on macOS via A
 
 ### Send a reply
 ```
-1. get-message id="..." → read original
-2. send-email to=["sender@..."] subject="Re: ..." body="..."
+1. get-message id="..." → read original message
+2. reply-to-message id="..." body="Thanks for the update!" → reply to sender
+   OR
+   reply-to-message id="..." body="..." replyAll=true → reply to all
+```
+
+### Create a draft for user review
+```
+1. create-draft to=["recipient@example.com"] subject="..." body="..."
+2. Tell user to review the draft in Mail.app before sending
+```
+
+### Forward an email
+```
+1. get-message id="..." → read the message to forward
+2. forward-message id="..." to=["colleague@company.com"] body="FYI - see below"
 ```
 
 ### Organize inbox

+ 64 - 31
README.md

@@ -3,8 +3,7 @@
 A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that enables AI assistants like Claude to read, send, search, and manage emails in Apple Mail on macOS.
 
 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
-
-> ⚠️ **Work in Progress** - This project is in early development. Many features are stubbed out and not yet implemented.
+[![npm version](https://img.shields.io/npm/v/apple-mail-mcp.svg)](https://www.npmjs.com/package/apple-mail-mcp)
 
 ## What is This?
 
@@ -13,8 +12,10 @@ This server acts as a bridge between AI assistants and Apple Mail. Once configur
 - "Check my inbox for unread messages"
 - "Find emails from john@example.com"
 - "Send an email to the team about the meeting"
+- "Create a draft email for me to review"
+- "Reply to that message"
+- "Forward this to my colleague"
 - "Move old newsletters to the Archive folder"
-- "What emails do I have flagged?"
 
 The AI assistant communicates with this server, which then uses AppleScript to interact with the Mail app on your Mac. All data stays local on your machine.
 
@@ -55,22 +56,26 @@ On first use, macOS will ask for permission to automate Mail.app. Click "OK" to
 - **Node.js 20+** - Required for the MCP server
 - **Apple Mail** - Must have at least one account configured
 
-## Features (Planned)
+## Features
 
 | Feature | Status | Description |
 |---------|--------|-------------|
-| **List Messages** | 🚧 Stub | List messages in a mailbox |
-| **Search Messages** | 🚧 Stub | Find emails by sender, subject, content |
-| **Read Messages** | 🚧 Stub | Get full email content |
-| **Send Email** | 🚧 Stub | Compose and send new emails |
-| **Mark Read/Unread** | 🚧 Stub | Change read status |
-| **Flag Messages** | 🚧 Stub | Flag/unflag messages |
-| **Delete Messages** | 🚧 Stub | Move messages to trash |
-| **Move Messages** | 🚧 Stub | Organize into mailboxes |
-| **List Mailboxes** | 🚧 Stub | Show all folders |
-| **List Accounts** | ✅ Done | Show configured accounts |
-| **Health Check** | ✅ Done | Verify Mail.app connectivity |
-| **Statistics** | 🚧 Stub | Unread counts, totals |
+| **List Messages** | ✅ | List messages in any mailbox |
+| **Search Messages** | ✅ | Find emails by sender, subject, content |
+| **Read Messages** | ✅ | Get full email content |
+| **Send Email** | ✅ | Compose and send new emails |
+| **Create Draft** | ✅ | Save emails to Drafts folder |
+| **Reply** | ✅ | Reply to messages (with reply-all support) |
+| **Forward** | ✅ | Forward messages to new recipients |
+| **Mark Read/Unread** | ✅ | Change read status |
+| **Flag/Unflag** | ✅ | Flag or unflag messages |
+| **Delete Messages** | ✅ | Move messages to trash |
+| **Move Messages** | ✅ | Organize into mailboxes |
+| **List Mailboxes** | ✅ | Show all folders with counts |
+| **List Accounts** | ✅ | Show configured accounts |
+| **Unread Count** | ✅ | Get unread counts per mailbox |
+| **Health Check** | ✅ | Verify Mail.app connectivity |
+| **Statistics** | ✅ | Message and unread counts |
 
 ## Tool Reference
 
@@ -81,13 +86,9 @@ Search for messages matching criteria.
 
 | Parameter | Type | Required | Description |
 |-----------|------|----------|-------------|
-| `query` | string | No | Text to search for |
-| `from` | string | No | Filter by sender |
-| `subject` | string | No | Filter by subject |
-| `mailbox` | string | No | Mailbox to search in |
+| `query` | string | No | Text to search in subject/sender |
+| `mailbox` | string | No | Mailbox to search in (default: INBOX) |
 | `account` | string | No | Account to search in |
-| `isRead` | boolean | No | Filter by read status |
-| `isFlagged` | boolean | No | Filter by flagged status |
 | `limit` | number | No | Max results (default: 50) |
 
 #### `get-message`
@@ -105,19 +106,50 @@ List messages in a mailbox.
 | `mailbox` | string | No | Mailbox name (default: INBOX) |
 | `account` | string | No | Account name |
 | `limit` | number | No | Max messages (default: 50) |
-| `unreadOnly` | boolean | No | Only unread messages |
 
 #### `send-email`
-Send a new email.
+Send a new email immediately.
+
+| Parameter | Type | Required | Description |
+|-----------|------|----------|-------------|
+| `to` | string[] | Yes | Recipient addresses |
+| `subject` | string | Yes | Email subject |
+| `body` | string | Yes | Email body (plain text) |
+| `cc` | string[] | No | CC recipients |
+| `bcc` | string[] | No | BCC recipients |
+| `account` | string | No | Send from specific account |
+
+#### `create-draft`
+Save an email to Drafts without sending.
 
 | Parameter | Type | Required | Description |
 |-----------|------|----------|-------------|
 | `to` | string[] | Yes | Recipient addresses |
 | `subject` | string | Yes | Email subject |
-| `body` | string | Yes | Email body |
+| `body` | string | Yes | Email body (plain text) |
 | `cc` | string[] | No | CC recipients |
 | `bcc` | string[] | No | BCC recipients |
-| `account` | string | No | Send from account |
+| `account` | string | No | Account for draft |
+
+#### `reply-to-message`
+Reply to an existing message.
+
+| Parameter | Type | Required | Description |
+|-----------|------|----------|-------------|
+| `id` | string | Yes | Message ID to reply to |
+| `body` | string | Yes | Reply body |
+| `replyAll` | boolean | No | Reply to all recipients (default: false) |
+| `send` | boolean | No | Send immediately (default: true, false = save as draft) |
+
+#### `forward-message`
+Forward a message to new recipients.
+
+| Parameter | Type | Required | Description |
+|-----------|------|----------|-------------|
+| `id` | string | Yes | Message ID to forward |
+| `to` | string[] | Yes | Recipients to forward to |
+| `body` | string | No | Message to prepend |
+| `send` | boolean | No | Send immediately (default: true, false = save as draft) |
 
 #### `mark-as-read` / `mark-as-unread`
 Change read status of a message.
@@ -126,8 +158,8 @@ Change read status of a message.
 |-----------|------|----------|-------------|
 | `id` | string | Yes | Message ID |
 
-#### `flag-message`
-Flag a message.
+#### `flag-message` / `unflag-message`
+Flag or unflag a message.
 
 | Parameter | Type | Required | Description |
 |-----------|------|----------|-------------|
@@ -152,7 +184,7 @@ Move a message to a different mailbox.
 ### Mailbox Operations
 
 #### `list-mailboxes`
-List all mailboxes.
+List all mailboxes for an account.
 
 | Parameter | Type | Required | Description |
 |-----------|------|----------|-------------|
@@ -163,7 +195,7 @@ Get unread message count.
 
 | Parameter | Type | Required | Description |
 |-----------|------|----------|-------------|
-| `mailbox` | string | No | Mailbox to check |
+| `mailbox` | string | No | Mailbox to check (omit for total) |
 | `account` | string | No | Account to check |
 
 ### Account Operations
@@ -181,7 +213,7 @@ Verify Mail.app connectivity and permissions.
 **Parameters:** None
 
 #### `get-mail-stats`
-Get mail statistics (total messages, unread counts).
+Get mail statistics (total messages, unread counts per account).
 
 **Parameters:** None
 
@@ -190,6 +222,7 @@ Get mail statistics (total messages, unread counts).
 - **Local only** - All operations happen locally via AppleScript
 - **Permission required** - macOS will prompt for automation permission
 - **No credential storage** - The server doesn't store any passwords
+- **Email safety** - Review emails before sending via `create-draft` + manual send
 
 ## Development
 

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "apple-mail-mcp",
-  "version": "0.1.0",
+  "version": "1.0.0",
   "description": "MCP server for Apple Mail - read, search, send, and manage emails via Claude",
   "type": "module",
   "main": "build/index.js",