npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@foxychat-mcp/apple-imessages

v0.0.2

Published

Model Context Protocol (MCP) server for Apple iMessage integration - send messages, read conversations, search contacts

Readme

Apple iMessages MCP Server

A Model Context Protocol (MCP) server that enables Claude to interact with Apple's iMessage and Contacts applications on macOS. Send messages, read conversations, search contacts, and manage communications directly through Claude.

🚀 Features

  • Send iMessages: Send text messages to contacts via phone number or email
  • Read Conversations: Read message history from specific contacts
  • Unread Messages: Get all unread messages across conversations
  • Contact Search: Search and retrieve contact information
  • Full Disk Access: Securely access Messages database with proper permissions

📋 Requirements

  • macOS: This server only works on macOS systems
  • Messages App: Apple Messages must be configured and running
  • Full Disk Access: Required for reading message database
  • Node.js: Version 18 or higher
  • Bun: For development and building

🔧 Installation

From Source

  1. Clone the repository:

    git clone https://github.com/CodeFox-Repo/Remote-MCP-Servers.git
    cd Remote-MCP-Servers/apple-imessages
  2. Install dependencies:

    bun install
  3. Build the project:

    bun run build

From npm (Coming Soon)

npm install -g @foxychat-mcp/apple-imessages

⚙️ Configuration

1. Grant Full Disk Access

For the server to read iMessages, you need to grant Full Disk Access:

  1. Open System Settings (or System Preferences on older macOS)
  2. Go to Privacy & SecurityPrivacy
  3. Select "Full Disk Access" from the left sidebar
  4. Click the lock icon and authenticate
  5. Find and enable Claude in the list (or add it with the + button)
  6. Restart Claude for changes to take effect

2. Claude Desktop Configuration

Add to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "apple-imessages": {
      "command": "node",
      "args": ["/path/to/your/apple-imessages/dist/main.js"]
    }
  }
}

If installed globally via npm:

{
  "mcpServers": {
    "apple-imessages": {
      "command": "npx",
      "args": ["-y", "@foxychat-mcp/apple-imessages"]
    }
  }
}

🛠️ Available Tools

send_imessage

Send an iMessage to a contact.

  • recipient: Phone number or email address
  • message: Text content to send

search_contacts

Search contacts by name, phone, or email.

  • query: Search term

read_imessages

Read message history from a specific contact.

  • phone_number: Contact's phone number
  • limit: Number of messages to retrieve (default: 10)

get_unread_imessages

Get all unread messages.

  • limit: Number of messages to retrieve (default: 10)

📚 Resources

contacts://all

Access to all contacts from the Contacts app in JSON format.

🔒 Privacy & Security

This server:

  • Only accesses data when explicitly requested through MCP tools
  • Requires explicit Full Disk Access permission
  • Does not store or transmit personal data
  • Operates entirely locally on your machine
  • Uses Apple's official APIs and databases

🛠️ Development

Building

bun run build

Testing

bun test

Code Quality

bun run check    # Lint and format
bun run lint     # Lint only
bun run format   # Format only

Creating New Tools

bun run create-tool <tool-name>

📂 Project Structure

apple-imessages/
├── src/
│   ├── tools/              # MCP tools implementation
│   │   ├── sendImessage/
│   │   ├── searchContacts/
│   │   ├── readImessages/
│   │   └── getUnreadImessages/
│   ├── utils/              # Shared utilities
│   │   ├── appleScript.ts  # AppleScript execution
│   │   ├── database.ts     # Message database access
│   │   ├── messageReader.ts # Message parsing
│   │   └── retry.ts        # Retry mechanisms
│   ├── main.ts             # Server entry point
│   └── types.ts            # Type definitions
└── dist/                   # Built files

🐛 Troubleshooting

"Cannot access Messages database"

  • Ensure Full Disk Access is granted to Claude
  • Restart Claude after granting permissions
  • Check that Messages app is properly configured

"AppleScript error"

  • Ensure Messages app is running
  • Check that the recipient exists in your contacts
  • Verify iMessage is properly set up

Permission Issues

  • Make sure you're running on macOS
  • Verify the built file has execute permissions: chmod +x dist/main.js

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.