@funly/macpilot
v0.3.0
Published
MCP server for MacPilot — gives AI agents mouse, keyboard, screenshot, and accessibility control of macOS via a local HTTP API
Downloads
388
Maintainers
Readme
@funly/macpilot
MCP (Model Context Protocol) server for MacPilot — gives AI agents mouse, keyboard, screenshot, and accessibility control of macOS desktops.
MacPilot is a local HTTP API that runs as a menu bar app on macOS. This MCP server wraps that API so any MCP-compatible AI agent (Claude, etc.) can control the desktop through standard MCP tool calls instead of raw HTTP.
Quick Start
Install
npm install -g @funly/macpilotConfigure in Claude Code / Claude Desktop
Add to your MCP config:
{
"mcpServers": {
"macpilot": {
"command": "npx",
"args": ["-y", "@funly/macpilot"],
"env": {
"MACPILOT_HOST": "127.0.0.1",
"MACPILOT_PORT": "49901",
"MACPILOT_API_KEY": ""
}
}
}
}Environment Variables
| Variable | Default | Description |
|---|---|---|
| MACPILOT_HOST | 127.0.0.1 | MacPilot server host |
| MACPILOT_PORT | 49901 | MacPilot server port |
| MACPILOT_API_KEY | (empty) | API key if MacPilot has auth enabled |
Available Tools
Session Management
session_status— Check current status (available/active/user_control/user_finished/paused)session_start— Start a session (required before any actions)session_end— End session (always call when done)
Screenshots
capture_window— Screenshot a window (returns image + dimensions)capture_region— Screenshot a screen region
Mouse
mouse_click— Click using normalized coords (nx/ny 0.0–1.0)mouse_double_click— Double-click (select word)mouse_scroll— Scroll at positionmouse_move— Move cursormouse_drag— Drag between positionsmouse_position— Get current cursor position
Keyboard
click_and_type— Click field + type text (most reliable form filling)keyboard_type— Type text via clipboard pastekeyboard_key— Press key with modifierskeyboard_shortcut— Named shortcuts (copy, paste, etc.)
Apps & Windows
list_apps— All running apps with windowIdsfocus_app— Bring app to frontlaunch_app— Launch an appfocused_app— Get frontmost app
Accessibility
accessibility_elements— List UI elements (buttons, fields, labels)
Batch & Debug
batch— Multiple actions in one calldiagnostics— Recent API call log
Workflow
session_startwith your agent namelist_appsto find target windowcapture_windowto see the screen- Calculate
nx = pixelX / imageWidth,ny = pixelY / imageHeight mouse_clickorclick_and_typeat those coordinatescapture_windowagain to verifysession_endwhen done
License
MIT
