Log

io.github.rog0x由 GitHub 帳號 rog0x 發布v1.0.2更新於 Oct 25, 2026

Log parse, filter, analyze for AI agents

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理解析、過濾、分析、格式化並彙總 JSON、Apache/Nginx、syslog 等常見格式的日誌

可以做什麼
解析 JSON、Apache/Nginx、syslog 與結構化格式的日誌,或用帶具名擷取群組的自訂正規表達式解析,擷取時間戳、等級、訊息與來源欄位。依等級、ISO 8601 日期範圍、關鍵字、正規表達式或來源過濾項目,並回傳各等級計數。分析日誌模式,提供高頻錯誤、隨時間的錯誤率、請求量、最慢端點與異常偵測。在 JSON、純文字、CSV 與表格之間轉換,依等級上色並產生彙總報告。統計等級分布、日期涵蓋範圍、唯一 IP、常見 User-Agent、HTTP 狀態碼與輸送量。
適用情境
當你手上有日誌檔案或貼上的日誌文字,希望助理排查錯誤、依時間或等級篩選、找出尖峰與最慢端點,或把原始日誌整理成可讀報告,而不想自己寫解析腳本時適用。
執行需求
以 stdio 本機程序執行;需安裝 npm 套件並建置,再用 Node.js 在用戶端設定中指向建置後的進入檔案。未宣告帳號、API 金鑰、環境變數或標頭。
安裝前請注意
日誌內容會傳給助理及其模型供應商,含憑證、權杖、個人資料或內部主機名稱的日誌會因此外洩。這些工具讀取並轉換傳入的文字;README 未說明會寫入或刪除檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Log,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

bash
npm installnpm run build

Usage with Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "log-tools": {      "command": "node",      "args": ["path/to/mcp-log-tools/dist/index.js"]    }  }}

Supported Log Formats

FormatExample
JSON{"timestamp":"2024-01-15T10:30:00Z","level":"ERROR","message":"Connection failed"}
Apache/Nginx127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /index.html HTTP/1.1" 200 2326
SyslogJan 1 00:00:00 hostname process[1234]: Something happened
Structured2024-01-15T10:30:00.000Z [ERROR] [ModuleName] Something failed
CustomAny format using a regex with named capture groups

License

MIT

來源:README.md,提交 8a042e8

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。