log-ai-compressor MCP server
io.github.hu-chenyu/log-ai-compressor·v2.13.1·1 starsLocal log forensics: compress logs into citable evidence with root-cause confidence tiers.
not scanned yet
1 stars2.2k downloads/wk
Reviews
Write oneNobody has reviewed log-ai-compressor yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
log-ai-compressor tools
No tool declarations could be read from the package source. They show once the server is installed.
How log-ai-compressor compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 92/100
- higher than 95% of 48,255 servers
- GitHub stars
- 1
- more than 65% of 28,688 servers
- Downloads a week
- 2,182
- more than 95% of 12,191 servers with a package
Release history: 4 versions in the registry since 2026-10-23, latest 2026-10-28, typically several a day.
Install log-ai-compressor in Claude Code, Cursor or VS Code
claude mcp add log-ai-compressor -- uvx log-ai-compressor
What the publisher says
From the log-ai-compressor repository's README, as published. We do not edit it. Read it on GitHub
log-ai-compressor · 本机日志取证层
把一份日志变成「别人能自己核对」的结论包。
每条结论带原文的行号区间和那段原文的 sha256;拿不出因果链就说
证据不足,并精确列出还缺什么才能定论。全部计算在本机完成,日志不出网。
你会拿到什么
examples/app.log(24 行、8 条错误、4 种类型)跑出来是这样 —— 下面这段就是它的真实输出, 你可以自己跑一遍对上:
$ log-ai-compressor run examples/app.log
【日志分析摘要】examples/app.log
原始日志 ≈379 tokens → 压缩后 ≈175 tokens(压缩 54%)
确定性指纹 `56df0a5f2bdff598e23edb83f2487ade1d5607410320188b4c2ab6d05c478ded`(同一份日志跑两遍必须完全一致)
总行数 24,错误 8 行,去重后 4 种,时间范围 2024-03-15 08:00:00 ~ 2024-03-15 08:00:25。
已定位根因:java.net.ConnectException: Connection refused(另有 1 个根因候选)
1. [P0 | ERROR | ×3 | 根因 | 行 4~13] authorization failed: connection refused to db-primary:5432
-> 因果链源头(1 个错误由其衍生)
2. [P0 | ERROR | ×3 | 行 6~11] request 8812 failed: upstream unavailable
3. [P0 | ERROR | ×1 | 根因 | 行 18~22] java.net.ConnectException: Connection refused
-> Caused-by 因果链直连,根因:java.net.ConnectException: Connection refused
4. [P0 | ERROR | ×1 | 行 23~23] stock check timeout after 3000ms item=SKU-7781
报告已导出: examples/app_report.md(MD,9.2 KB)有三处随环境变,别拿它们对不上就以为装错了:
首行的路径回显你给的写法** —— Windows 上是 examples\app.log,
Linux 上是 examples/app.log;
「压缩后 ≈175 tokens」随路径长度变**(摘要里有那一行路径)——
同一份日志,给绝对路径会多几个 token。实测:相对路径 175、
临时目录里的绝对路径 184、仓库里的绝对路径 186;
* 「时间范围」两端都带完整日期 —— 这是 2026-10-23 起统一按 UTC 展示的结果
(此前第二端只显示钟点)。
指纹与行号区间不随这些变 —— 那两个才是结论本身,也是本工具的承诺。
上面那个 175 是照上面那条命令(仓库根目录 + 相对路径)跑出来的数;
这条由 tests/testreadmesampleisreproducible.py 逐行盯着。
注意第 3 行:标题点名的不是「外层症状」而是链尾真因。 这条结论指向日志的第 18~22 行,那段原文的 sha256 一并写进报告 ——
$ log-ai-compressor verify --report report.json
模式:复核已导出报告
对象:报告 report.json
证据:共 5 条引用,匹配 5 条,失配 0 条,源不可读 0 条
自校验结论:VERIFIED
每条结论都能在原始日志里逐行复核。有人事后改了日志主机名? 立刻报出来,退出码 1 (下面这段是真的跑出来的:把 examples/app.log 里的 db-primary 改成 db-primarY 之后重跑 verify):
$ log-ai-compressor verify --report report.json
证据:共 5 条引用,匹配 4 条,失配 1 条
✗ MISMATCH 899a06e12b52 app.log 期望 bc5b93cec7cde01c 实际 1b8242c1671f1e29
自校验结论:TAMPERED # 退出码 1判定没有「大部分通过」这一档 —— 一份掺了假证据的报告, 不该因为大部分为真就放行。四档是 VERIFIED / TAMPERED / UNVERIFIABLE(验不了,不是「查出问题」)/ NO_EVIDENCE (本来就没证据),详见 docs/CLI.md。
装上就用
pip install log-ai-compressor # 硬依赖只有 PyYAML 一个首次运行要多久(2026-10-22 本机实测,Windows / Python 3.11): 装依赖 2.3 秒(pip install log-ai-compressor,pip 有缓存;首次拉包会更久), 之后每份小日志 0.19~0.25 秒。
大文件同样实测过(149.0 MB / 1,456,935 行):58.9 秒, 峰值内存 24.4 MB —— 内存与文件大小无关,因为是流式处理。 报告 457 KB。
Windows 可双击 start.bat 自动定位 Python、装依赖、启动并打开浏览器。
常见报错(都是实测出来的真实输出)
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
log-ai-compressor: common questions
- Is log-ai-compressor MCP server safe?
- Yes, by our scan: it is graded A (92/100). Read the log-ai-compressor safety report
- How do I install log-ai-compressor?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does log-ai-compressor need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is log-ai-compressor maintained?
- The last commit was 11 days ago (2026-10-24). The latest release is v2.13.1.
- How does log-ai-compressor compare with other MCP servers?
- safety score 92/100 (higher than 95% of 48,255 servers); github stars 1 (more than 65% of 28,688 servers); downloads a week 2,182 (more than 95% of 12,191 servers with a package). Full comparison.