
Ndjson Local Log Triage Mcp
io.github.vola-trebla由 GitHub 帳號 vola-trebla 發布v0.2.0更新於 Oct 24, 2026
Streams NDJSON log triage: query patterns, detect anomalies, summarize timelines without full load.
概覽
一個本機 MCP 伺服器,以串流方式讀取 NDJSON 日誌檔,讓助理不必整檔載入即可篩選項目、偵測錯誤尖峰並彙整時間軸。
- 可以做什麼
- 依欄位/值比對篩選日誌項目,可選擇依行首樣式重建多行堆疊,並限制回傳筆數。依時間窗分桶統計錯誤,以 Z 分數標出異常偏高的時間窗。依時間窗彙整各嚴重層級的筆數,可自動調整桶大小並放大尖峰時間窗。依 trace ID 跨多個日誌檔重建分散式呼叫鏈,列出涉及的服務與總耗時。推斷日誌檔格式與欄位結構,辨識時間戳與嚴重層級欄位。以 Drain 演算法將訊息聚類成範本並顯示參數分布。啟動背景即時追蹤並推送異常告警,或查詢外部日誌平台。
- 適用情境
- 當助理需要排查大型 NDJSON 日誌時使用,例如查明某個時間點錯誤暴增的原因、跨服務重建一次請求,或在故障期間快速取得嚴重層級時間軸。
- 執行需求
- 透過 npm 套件以 npx 在使用者機器上作為本機程序執行,需要 Node.js。未宣告驗證、環境變數或標頭。助理需要對磁碟上的日誌檔有讀取權限。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Ndjson Local Log Triage Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
🪵 ndjson-local-log-triage-mcp
Your service just crashed. The log file is 2GB. Your AI agent can't help.
MCP server that stream-parses NDJSON log files without loading them into memory — filter by pattern, detect error spikes via Z-score analysis, summarize severity timelines by time window.
🤔 The problem
A service crashes at 3am. The log file is app.log.ndjson and it's 2GB. You ask your agent to find what caused the spike in errors around 03:17. The agent can't read 2GB. It can't even try.
ndjson-local-log-triage-mcp streams the file line by line — never loading it into memory — and gives the agent exactly the slice it needs.
🛠️ Tools
query_log_pattern
Filter log entries by a field/value match. Returns up to N matching entries, streaming the file without loading it entirely. Pass lineStartPattern (e.g. "^{") to reconstruct multiline stack traces silently dropped by the default parser.
detect_error_anomalies
Z-score frequency analysis. Buckets errors by time window, computes mean + stddev, flags windows where the error rate is anomalously high.
summarize_log_timeline
Chronological aggregation of errors, warnings, and info counts per time window. Quick visual of where the incident is.
Pass adaptive: true to auto-scale bucket size to actual event density and zoom in on the peak error window at 10× finer resolution.
correlate_request
Reconstructs a distributed trace from multiple NDJSON log files. Given a trace_id, collects all correlated events in chronological order across all files and surfaces the services involved and total duration.
discover_log_schema
Analyze a log file to infer its wrapper format (NDJSON, Syslog, Kubernetes container logs) and extract type schemas, identifying polymorphic keys, timestamp patterns, and severity fields.
group_semantic_patterns
Cluster log messages dynamically using the fixed-depth tree-based Drain parsing algorithm to isolate distinct log templates and analyze their parameter distributions (wildcard variations).
start_live_triage
Start background log tailing with real-time Z-score anomaly alerting on error frequency spikes and heap memory protection limits. Dispatches notifications directly over standard JSON-RPC channels.
query_external_logs
A unified gateway to query central log providers (Datadog, Splunk, Elasticsearch), converting search patterns to vendor-specific dialects and mapping the output into the standardized OpenTelemetry Log Data Model structure.
⚡ Setup
🚀 Usage
"Analyze /var/log/app.log.ndjson — summarize the error timeline in 5-minute windows, detect any anomalous spikes, and show me the error entries around the spike."
Works great alongside:
- release-readiness-triage-mcp — CI failure triage before release
- env-secret-exposure-analyzer-mcp — secret exposure scanning
📦 Links
- npm: npmjs.com/package/ndjson-local-log-triage-mcp
- GitHub: github.com/vola-trebla/ndjson-local-log-triage-mcp
License
MIT
來源:README.md,提交 76f7060
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分