Skip to main content
Glama
README.md
# apple-log-mcp

Local MCP server for Apple platform console, unified, and diagnostic logs.

## Install

```bash
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 build
```

## Codex config

Add this to `~/.codex/config.toml`.

```toml
[mcp_servers.apple_log]
command = "/bin/zsh"
args = ["-lc", "node \"$HOME/.local/share/apple-log-mcp/dist/index.js\""]
startup_timeout_sec = 30
```

Restart Codex after changing the config.

## Claude Desktop config

Add this to your MCP config JSON.

```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:

```json
{
  "target": "simulator",
  "device": "booted",
  "bundleId": "com.example.app",
  "streams": ["console", "unified"],
  "terminateExisting": true
}
```

Then read logs:

```json
{
  "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 Swift `Logger` usually go through Apple unified logging.
- The MCP does not expose a raw shell. It wraps `xcrun devicectl`, `xcrun simctl`, and `log`.

TDQS

A3.5/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a distinct purpose: listing devices, and managing log sessions with separate start, stop, list, and read operations. No overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent 'apple_verb_noun' snake_case pattern (e.g., apple_list_devices, apple_start_live_logs). Perfect uniformity.

Tool Count5/5

Five tools is an appropriate size for a focused log management server, covering essential operations without being overbearing.

Completeness4/5

The server covers the core lifecycle of log sessions (list, start, read, stop) and device enumeration. Minor gaps like log filtering or configuration are missing, but the main workflow is supported.

Maintenance

ActivityMaintained
ResponsivenessSyncing