macinput exposes macOS keyboard, mouse, and screenshot control to MCP-compatible AI clients.
Use it when your agent needs to:
- inspect the current macOS desktop through screenshots
- click or move the mouse
- scroll vertically or horizontally
- type text or send shortcuts
- paste short text into inputs that do not reliably accept direct typing events
Grant these permissions to the application that launches the server:
- Accessibility
- Screen Recording
Common launchers:
- Terminal / iTerm2
- Claude Desktop
- Cursor
- VS Code
If permissions are missing:
- mouse and keyboard tools may silently do nothing
- screenshot capture may fail with a permission error
The server must run in an active macOS desktop session. It is not intended for headless or locked-screen execution.
uv syncOr:
python -m pip install -e .macinput-mcpmacinput-mcp --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp{
"mcpServers": {
"macinput": {
"command": "uv",
"args": [
"--directory",
"/path/to/macinput",
"run",
"macinput-mcp"
]
}
}
}Environment variables:
MACINPUT_DEFAULT_SCREENSHOT_TTLMACINPUT_MAX_SCREENSHOT_TTLMACINPUT_MAX_TYPING_LENGTHMACINPUT_MIN_ACTION_DELAYMACINPUT_DEFAULT_TYPING_INTERVAL
Example:
MACINPUT_DEFAULT_SCREENSHOT_TTL=15 MACINPUT_MAX_TYPING_LENGTH=500 macinput-mcp- Use a dedicated macOS account or test machine when possible.
- Keep screenshot retention short.
- Avoid leaving sensitive apps visible when the agent does not need them.
- Prefer
stdiounless your host requires HTTP. - Verify focus before typing, because typing always goes to the currently focused app.
- Prefer
paste_text_inputwhen a target app ignores or inconsistently handlestype_text_input.
Check Screen Recording permission for the host app.
Check Accessibility permission for the host app.
Require the agent to capture a fresh screenshot before every click on a changed screen.
Use Python 3.10 or newer. Current MCP SDK releases do not target older Python versions.