console-mcp
An MCP server for streaming and searching macOS Console.app and iOS device logs, enabling real-time log access and debugging through natural language.
README
Console MCP Server — macOS & iOS Log Streaming for AI Assistants
An MCP (Model Context Protocol) server for streaming and searching macOS Console.app and iOS device logs directly from Claude, GitHub Copilot, or any MCP-compatible AI assistant.
Stream real-time logs, search crash reports, filter by severity, and debug iOS simulators and physical devices — all through natural language.
Features
- List Devices - Show connected iOS devices
- List Simulators - Show available iOS Simulators
- Get Logs - Fetch recent logs filtered by process or subsystem
- Get Device Logs - Fetch logs from connected iOS devices
- Get Simulator Logs - Fetch logs from iOS Simulators
- Get Logs by Level - Filter logs by severity (fault, error, warning, info, debug)
- Stream Logs - Capture live logs for a specified duration
- Search Logs - Search through historical logs (supports regex)
- Get Crash Logs - List and read crash reports
- Watch for Pattern - Stream until a pattern matches
- Export Logs - Save logs to file for sharing
- VPN Logs - Quick shortcut to get WorxVPN-specific logs
Installation
git clone https://github.com/rohithgoud30/console-mcp.git
cd console-mcp
npm install
npm run build
For iOS Device Logs
Install libimobiledevice for direct iOS device log streaming:
brew install libimobiledevice
Configuration
Add to your .vscode/mcp.json:
{
"servers": {
"console": {
"command": "node",
"args": ["/path/to/console-mcp/dist/index.js"]
}
}
}
Tools
list_devices
List connected iOS devices with their UDIDs.
list_simulators
List available iOS Simulators.
| Parameter | Type | Description |
|---|---|---|
onlyBooted |
boolean | Only show running simulators (default: false) |
runtime |
string | Filter by runtime (e.g., 'iOS 17') |
get_logs
Get recent logs from macOS.
| Parameter | Type | Description |
|---|---|---|
process |
string | Filter by process name (e.g., 'Safari') |
subsystem |
string | Filter by subsystem (e.g., 'com.apple.network') |
lastMinutes |
number | Minutes of logs to fetch (default: 5) |
maxLines |
number | Max lines to return (default: 200) |
get_logs_by_level
Get logs filtered by severity level.
| Parameter | Type | Description |
|---|---|---|
level |
string | Log level: fault, error, warning, info, debug (required) |
process |
string | Filter by process name |
lastMinutes |
number | Minutes of logs to fetch (default: 5) |
maxLines |
number | Max lines to return (default: 200) |
get_device_logs
Get logs from a connected iOS device. Requires libimobiledevice.
| Parameter | Type | Description |
|---|---|---|
device |
string | Device name or UDID (required) |
process |
string | Filter by process name |
lastMinutes |
number | Minutes of logs to capture (default: 5, max: 10) |
maxLines |
number | Max lines to return (default: 200) |
get_simulator_logs
Get logs from an iOS Simulator. Simulator must be booted.
| Parameter | Type | Description |
|---|---|---|
simulator |
string | Simulator name or UDID (required) |
process |
string | Filter by process name |
lastMinutes |
number | Minutes of logs to fetch (default: 5) |
maxLines |
number | Max lines to return (default: 200) |
stream_logs
Stream live logs for a duration.
| Parameter | Type | Description |
|---|---|---|
process |
string | Filter by process name |
durationSeconds |
number | How long to stream (default: 10, max: 30) |
stream_simulator_logs
Stream live logs from an iOS Simulator.
| Parameter | Type | Description |
|---|---|---|
simulator |
string | Simulator name or UDID (required) |
process |
string | Filter by process name |
durationSeconds |
number | How long to stream (default: 10, max: 30) |
search_logs
Search through recent logs with text or regex.
| Parameter | Type | Description |
|---|---|---|
query |
string | Text or regex pattern to search for (required) |
useRegex |
boolean | Treat query as regex (default: false) |
lastMinutes |
number | Minutes to search (default: 30) |
maxLines |
number | Max matching lines (default: 100) |
get_crash_logs
List recent crash reports from DiagnosticReports.
| Parameter | Type | Description |
|---|---|---|
process |
string | Filter by process/app name |
lastDays |
number | Days to search back (default: 7) |
maxReports |
number | Max reports to list (default: 10) |
read_crash_report
Read the full content of a specific crash report.
| Parameter | Type | Description |
|---|---|---|
filename |
string | Crash report filename (required) |
watch_for_pattern
Stream logs until a pattern matches. Great for test automation.
| Parameter | Type | Description |
|---|---|---|
pattern |
string | Text or regex to watch for (required) |
useRegex |
boolean | Treat pattern as regex (default: false) |
process |
string | Filter by process name |
timeoutSeconds |
number | Max wait time (default: 30, max: 60) |
export_logs
Export logs to a file on the Desktop.
| Parameter | Type | Description |
|---|---|---|
logs |
string | Log content to export (required) |
filename |
string | Optional filename |
format |
string | Export format: txt or json (default: txt) |
get_vpn_logs
Shortcut to get WorxVPN extension logs.
| Parameter | Type | Description |
|---|---|---|
lastMinutes |
number | Minutes of logs (default: 5) |
maxLines |
number | Max lines (default: 300) |
Usage Examples
// In Copilot chat:
"List my iOS simulators"
"Get logs from iPhone 15 Pro simulator"
"Show device logs from my iPhone"
"Get the last 5 minutes of Safari logs"
"Show me all error logs from the last 10 minutes"
"Search logs for 'authentication' using regex"
"Get crash logs for MyApp"
"Read the crash report MyApp-2024-12-27.crash"
"Watch for 'connection established' while I connect"
"Export these logs to a file"
"Stream logs for 15 seconds while I reproduce the bug"
"Show me WorxVPN logs"
Requirements
- macOS 13+ (Ventura or later)
- Node.js 18+
- Xcode (for simulators and
xcruntools) libimobiledevice(optional, for iOS device logs)
Notes
- macOS
logcommand is used for local logs xcrun simctlis used for simulator logsidevicesyslogfrom libimobiledevice is used for iOS device logs- iOS device must be paired and trusted for log access
- Crash reports are found in
~/Library/Logs/DiagnosticReports - Exported logs are saved to
~/Desktop/ConsoleMCP-Exports/
Credits
Originally created by devstroop. This fork includes custom modifications and enhancements.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。