macOS Companion MCP Server
Enables AI agents to directly access native macOS services, media, system health, and administration tools through a local MCP server.
README
<p align="center"> <img src="https://raw.githubusercontent.com/modelcontextprotocol/logo/main/mcp-logo-dark.svg" alt="MCP Logo" width="120" /> </p>
macOS Companion MCP Server ๐ป
The Local Bridge Between AI Agents and the macOS Substrate.
You don't need another generic electron wrapper. You need raw, direct access to the native data structures already running on your machine. macos-mcp is a bare-metal Model Context Protocol (MCP) server that hooks your agents (OpenClaw, Claude Desktop, Cursor) directly into native macOS services, media, and system administration utilities.
This is critical because context engineering is an ongoing exercise. A simple file-read tool won't help when you need to know if the CPU is throttling, what your latest podcast playback head is, or if Apple Notes is refusing to sync.
๐ฏ The Toolset
Highly granular tools exposed directly to your agent layer:
| Domain | Tools | Actionable Intel Provided |
|---|---|---|
| System Health | run_health_audit, get_battery_health, get_storage_scan, get_startup_items |
Machine Intel. Deep dive into thermal pressure, cycle counts, memory swaps, and local Time Machine snapshots. |
| Native Apps | list_calendars, get_calendar_events, create_reminder, get_note, send_imessage |
Productivity. Headless access to Reminders, Notes, and Calendar without UI bloat. |
| Media / Web | get_music_state, get_safari_tabs, get_recent_podcast_episodes |
Context. Directly reads MTLibrary.sqlite to find exact podcast listening playback heads. |
| Admin | run_disk_cleanup, kill_process, restart_service, run_shortcut |
Control. Triggers native /usr/bin/shortcuts and clears DerivedData or user caches safely. |
๐ Getting Started
1. Installation
Clone it, build it, and point your MCP config at the dist/index.js file.
git clone https://github.com/surendranb/macos-mcp.git
cd macos-mcp
npm install
npm run build
2. Configuration (Claude Desktop / Cursor)
Add the server to your agent's MCP settings configuration file:
{
"mcpServers": {
"macos-companion-mcp": {
"command": "node",
"args": ["/absolute/path/to/macos-mcp/dist/index.js"]
}
}
}
Note: Replace /absolute/path/to/ with the actual path to where you cloned the repository.
๐ ๏ธ Project Philosophy (The "Anti-Slop" Rules)
This project focuses on bare-metal efficiency for local AI agents:
- Zero Sloppy Abstractions: We hit
/usr/bin/shortcutsexplicitly. No PATH collisions with python environments. - No Bulky SQLite Bindings: The server executes queries against local databases using macOS's built-in
sqlite3command-line utility. This prevents heavy native compilation failures ofnode-sqlitepackages on Apple Silicon. - Fire and Forget Warmups: Notes and Reminders have aggressive headless cold-start times. We background
osascriptcalls at startup to warm the process memory so the agent isn't left waiting. - Local Only: All processing stays on the machine.
๐งช Testing
A regular laptop combined with basic testing harnesses is enough. Run npm run test to spin up a headless stdio test suite that probes the endpoints and outputs a clean success dashboard.
License
MIT License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.