
Log
io.github.rog0x由 GitHub 帳號 rog0x 發布v1.0.2更新於 Oct 25, 2026
Log parse, filter, analyze for AI agents
概覽
本機 MCP 伺服器,讓 AI 助理解析、過濾、分析、格式化並彙總 JSON、Apache/Nginx、syslog 等常見格式的日誌
- 可以做什麼
- 解析 JSON、Apache/Nginx、syslog 與結構化格式的日誌,或用帶具名擷取群組的自訂正規表達式解析,擷取時間戳、等級、訊息與來源欄位。依等級、ISO 8601 日期範圍、關鍵字、正規表達式或來源過濾項目,並回傳各等級計數。分析日誌模式,提供高頻錯誤、隨時間的錯誤率、請求量、最慢端點與異常偵測。在 JSON、純文字、CSV 與表格之間轉換,依等級上色並產生彙總報告。統計等級分布、日期涵蓋範圍、唯一 IP、常見 User-Agent、HTTP 狀態碼與輸送量。
- 適用情境
- 當你手上有日誌檔案或貼上的日誌文字,希望助理排查錯誤、依時間或等級篩選、找出尖峰與最慢端點,或把原始日誌整理成可讀報告,而不想自己寫解析腳本時適用。
- 執行需求
- 以 stdio 本機程序執行;需安裝 npm 套件並建置,再用 Node.js 在用戶端設定中指向建置後的進入檔案。未宣告帳號、API 金鑰、環境變數或標頭。
安裝
README
@rog0x/mcp-log-tools
Log analysis and processing tools for AI agents, exposed via the Model Context Protocol (MCP).
Tools
parse_logs
Parse log content in common formats: JSON logs, Apache/Nginx access logs, syslog, and structured logs. Supports custom regex patterns with named capture groups. Extracts timestamp, level, message, source, and additional structured fields.
filter_logs
Filter parsed log entries by:
- Log level (ERROR, WARN, INFO, DEBUG)
- Date range (ISO 8601)
- Keyword search (case-insensitive)
- Regex pattern matching
- Source/logger name
Returns matched entries along with level occurrence counts.
analyze_logs
Analyze log patterns to surface operational insights:
- Top 10 most frequent errors (normalized)
- Error rate over time (hourly buckets)
- Request volume per hour
- Slowest endpoints (from HTTP access logs)
- Anomaly detection (sudden spikes or drops using standard deviation)
format_logs
Convert between log formats and produce reports:
- JSON to plain text, plain to JSON, CSV, or table
- ANSI colorization by log level
- Structured field extraction
- Summary report generation
log_stats
Compute comprehensive log statistics:
- Total and non-empty line counts
- Level distribution with percentages
- Date range coverage
- Unique IP addresses and request counts
- Top user agents
- HTTP status code distribution
- Throughput (entries per second)
Setup
Usage with Claude Desktop
Add to your claude_desktop_config.json:
Supported Log Formats
License
MIT
來源:README.md,提交 8a042e8
工具
0版本歷史
1- v1.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。