Labsco
loopwork-ai logo

iMCP

โ˜… 1,500

from loopwork-ai

A macOS app that connects your digital life with AI, providing access to Calendar, Contacts, Location, Maps, Messages, Reminders, and Weather services.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup
<picture> <source media="(prefers-color-scheme: dark)" srcset="Assets/hero-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="Assets/hero-light.svg"> <img alt="iMCP"> </picture>

iMCP is a macOS app for connecting your digital life with AI. It works with Claude Desktop and a growing list of clients that support the Model Context Protocol (MCP).

Capabilities

<table> <tr> <th> <img src="Assets/calendar.svg" width="48" height="48" alt="" role="presentation"/> </th> <td><strong>Calendar</strong></td> <td>View and manage calendar events, including creating new events with customizable settings like recurrence, alarms, and availability status.</td> </tr> <tr> <th> <img src="Assets/contacts.svg" width="48" height="48" alt="" role="presentation"/> </th> <td><strong>Contacts</strong></td> <td>Access contact information about yourself and search your contacts by name, phone number, or email address.</td> </tr> <tr> <th> <img src="Assets/location.svg" width="48" height="48" alt="" role="presentation"/> </th> <td><strong>Location</strong></td> <td>Access current location data and convert between addresses and geographic coordinates.</td> </tr> <tr> <th> <img src="Assets/maps.svg" width="48" height="48" alt="" role="presentation"/> </th> <td><strong>Maps</strong></td> <td>Provides location services including place search, directions, points of interest lookup, travel time estimation, and static map image generation.</td> </tr> <tr> <th> <img src="Assets/messages.svg" width="48" height="48" alt="" role="presentation"/> </th> <td><strong>Messages</strong></td> <td>Access message history with specific participants within customizable date ranges.</td> </tr> <tr> <th> <img src="Assets/reminders.svg" width="48" height="48" alt="" role="presentation"/> </th> <td><strong>Reminders</strong></td> <td>View and create reminders with customizable due dates, priorities, and alerts across different reminder lists.</td> </tr> <tr> <th> <img src="Assets/weather.svg" width="48" height="48" alt="" role="presentation"/> </th> <td><strong>Weather</strong></td> <td>Access current weather conditions including temperature, wind speed, and weather conditions for any location.</td> </tr> </table>

Technical Details

App & CLI

iMCP is a macOS app that bundles a command-line executable, imcp-server.

  • iMCP.app provides UI for configuring services and โ€” most importantly โ€” a means of interacting with macOS system permissions, so that it can access Contacts, Calendar, and other information.
  • imcp-server provides an MCP server that uses standard input/output for communication (stdio transport).

The app and CLI communicate with each other on the local network using Bonjour for automatic discovery. Both advertise a service with type "_mcp._tcp" and domain "local". Requests from MCP clients are read by the CLI from stdin and relayed to the app; responses from the app are received by the CLI and written to stdout. See StdioProxy for implementation details.

For this project, we created what became the official Swift SDK for Model Context Protocol servers and clients. The app uses this package to handle proxied requests from MCP clients.

iMessage Database Access

Apple doesn't provide public APIs for accessing your messages. However, the Messages app on macOS stores data in a SQLite database located at ~/Library/Messages/chat.db.

iMCP runs in App Sandbox, which limits its access to user data and system resources. When you go to enable the Messages service, you'll be prompted to open the chat.db file through the standard file picker. When you do, macOS adds that file to the app's sandbox. NSOpenPanel is magic like that.

But opening the iMessage database is just half the battle. Over the past few years, Apple has moved away from storing messages in plain text and instead toward a proprietary typedstream format.

For this project, we created Madrid: a Swift package for reading your iMessage database. It includes a Swift implementation for decoding Apple's typedstream format, adapted from Christopher Sardegna's imessage-exporter project and blog post about reverse-engineering typedstream.

JSON-LD for Tool Results

The tools provided by iMCP return results as JSON-LD documents. For example, the fetchContacts tool uses the Contacts framework, which represents people and organizations with the CNContact type. Here's how an object of that type is encoded as JSON-LD:

Copy & paste โ€” that's it
{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "Mattt",
  "url": "https://mat.tt"
}

Schema.org provides standard vocabularies for people, postal addresses, events, and many other objects we want to represent. And JSON-LD is a convenient encoding format for humans, AI, and conventional software alike.

For this project, we created Ontology: a Swift package for working with structured data. It includes convenience initializers for types from Apple frameworks, such as those returned by iMCP tools.

Debugging

Using the MCP Inspector

To debug interactions between iMCP and clients, you can use the inspector tool (requires Node.js):

  1. Click <img style="display: inline" width="20" height="16" src="/Assets/icon.svg" /> > "Copy server command to clipboard"

  2. Open a terminal and run the following commands:

    Copy & paste โ€” that's it
    # Download and run inspector package on imcp-server
    npx @modelcontextprotocol/inspector [paste-copied-command]
    
    # Open inspector web app running locally
    open http://127.0.0.1:6274

Inspector lets you see all requests and responses between the client and the iMCP server, which is helpful for understanding how the protocol works.

Using Companion

<img align="right" width="284" src="/Assets/companion-screenshot-add-server.png" />

Companion is a utility for testing and debugging your MCP servers (requires macOS 15 or later). It gives you an easy way to browse and interact with a server's prompts, resources, and tools. Here's how to connect it to iMCP:

  1. Click <img style="display: inline" width="20" height="16" src="/Assets/icon.svg" /> > "Copy server command to clipboard"
  2. Download and open the Companion app
  3. Click the <kbd>+</kbd> button in the toolbar to add an MCP server
  4. Fill out the form:
    • Enter "iMCP" as the name
    • Select "STDIO" as the transport
    • Paste the copied iMCP server command
    • Click "Add Server"
<br clear="all">

Acknowledgments

License

This project is available under the MIT license. See the LICENSE file for more info.

Legal

iMessageยฎ is a registered trademark of Apple Inc. This project is not affiliated with, endorsed, or sponsored by Apple Inc.