apple-log-mcp
by BBC6BAE9
apple-log-mcp
Local MCP server for Apple platform console, unified, and diagnostic logs.
Install
git clone https://github.com/BBC6BAE9/apple-log-mcp.git "$HOME/.local/share/apple-log-mcp"
cd "$HOME/.local/share/apple-log-mcp"
npm install
npm run buildCodex config
Add this to ~/.codex/config.toml.
[mcp_servers.apple_log]
command = "/bin/zsh"
args = ["-lc", "node \"$HOME/.local/share/apple-log-mcp/dist/index.js\""]
startup_timeout_sec = 30Restart Codex after changing the config.
Claude Desktop config
Add this to your MCP config JSON.
{
"mcpServers": {
"apple_log": {
"command": "/bin/zsh",
"args": ["-lc", "node \"$HOME/.local/share/apple-log-mcp/dist/index.js\""]
}
}
}Tools
apple_list_devices: list physical and simulated Apple devices.apple_start_live_logs: start a live capture session.apple_read_live_logs: read recent or incremental log lines.apple_stop_live_logs: stop a capture session.apple_list_log_sessions: list active sessions.
Example
Start live logs for a simulator:
{
"target": "simulator",
"device": "booted",
"bundleId": "com.example.app",
"streams": ["console", "unified"],
"terminateExisting": true
}Then read logs:
{
"sessionId": "<session id from apple_start_live_logs>",
"limit": 200
}Notes
Swift
print()is stdout. To capture it reliably, start the app through this MCP.Objective-C
NSLog,os_log, and SwiftLoggerusually go through Apple unified logging.The MCP does not expose a raw shell. It wraps
xcrun devicectl,xcrun simctl, andlog.