Skip to main content
Glama

send_imessage

Send iMessages directly from Claude Desktop to phone numbers or email addresses using the macOS Messages app.

Instructions

Send an iMessage using Messages app

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipientYesPhone number or email of the recipient
messageYesMessage content to send

Implementation Reference

  • Handler for the send_imessage tool. Extracts recipient and message from arguments, validates them, escapes the message for AppleScript, executes AppleScript to send the iMessage via Messages app, and returns success or error response.
    case "send_imessage": { const recipient = String(request.params.arguments?.recipient); const message = String(request.params.arguments?.message); if (!recipient || !message) { throw new Error("Recipient and message are required"); } const escapedMessage = message.replace(/"/g, '\\"'); const script = ` tell application "Messages" send "${escapedMessage}" to buddy "${recipient}" of (service 1 whose service type = iMessage) end tell `; try { await runAppleScript(script); return { content: [ { type: "text", text: `Message sent successfully to ${recipient}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Failed to send message: ${getErrorMessage(error)}`, }, ], isError: true, }; } }
  • Input schema definition for send_imessage tool, specifying recipient and message as required string properties.
    inputSchema: { type: "object", properties: { recipient: { type: "string", description: "Phone number or email of the recipient", }, message: { type: "string", description: "Message content to send", }, }, required: ["recipient", "message"], },
  • src/index.ts:123-140 (registration)
    Registration of the send_imessage tool in the ListTools response, including name, description, and input schema.
    { name: "send_imessage", description: "Send an iMessage using Messages app", inputSchema: { type: "object", properties: { recipient: { type: "string", description: "Phone number or email of the recipient", }, message: { type: "string", description: "Message content to send", }, }, required: ["recipient", "message"], }, },
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marissamarym/imessage-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server