New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

mailappmcp

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailappmcp

MCP server for macOS Mail.app — gives Claude native email access via AppleScript

Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
37
5.71%
Maintainers
1
Weekly downloads
 
Created
Source

import { runAppleScript, escapeForAppleScript, FIELD_SEP } from "@mailappmcp/shared"; export async function readMessage(account, mailbox, messageId) { const acct = escapeForAppleScript(account); const mbox = escapeForAppleScript(mailbox); const msgId = escapeForAppleScript(messageId); const script = tell application "Mail" set msgs to (messages of mailbox "${mbox}" of account "${acct}" whose message id is "${msgId}") if (count of msgs) is 0 then return "NOT_FOUND" end if set m to item 1 of msgs set toRecips to "" repeat with r in to recipients of m set toRecips to toRecips & address of r & "," end repeat set ccRecips to "" repeat with r in cc recipients of m set ccRecips to ccRecips & address of r & "," end repeat return (subject of m) & "${FIELD_SEP}" & (sender of m) & "${FIELD_SEP}" & toRecips & "${FIELD_SEP}" & ccRecips & "${FIELD_SEP}" & (date received of m as string) & "${FIELD_SEP}" & (content of m) end tell; const raw = await runAppleScript(script); if (raw === "NOT_FOUND") { return null; } const parts = raw.split(FIELD_SEP); return { subject: (parts[0] ?? "").trim(), sender: (parts[1] ?? "").trim(), to: (parts[2] ?? "").trim().split(",").filter(Boolean), cc: (parts[3] ?? "").trim().split(",").filter(Boolean), dateReceived: (parts[4] ?? "").trim(), body: (parts[5] ?? "").trim(), }; }

Keywords

mcp

FAQs

Package last updated on 05 Apr 2026

Related posts