emublog2mlv-mcp
Converts ECU Master EMU Black binary logs to MegaLogViewer HD format. Allows AI assistants to inspect channel summaries and perform analysis.
README
emublog2mlv
Convert ECU Master EMU Black .emublog binary logs into a format
MegaLogViewer HD can open —
a MegaSquirt .msl (tab-delimited) or plain .csv.
The EMU Client stores logs in an undocumented gzip-compressed binary format that only its own software can open. This tool decodes that format directly, so you can analyse EMU logs in MegaLogViewer HD (overlay channels, histograms, VE/AFR analysis) instead of being locked into the EMU Client viewer.
Three ways to use it
1. Standalone apps (no Python needed) — easiest
Download from the Releases page:
-
emublog2mlv-gui.exe— double-click for a simple window: add one or many logs (or a whole folder), choose.msl/.csv, set the output folder or a custom name for a single file, then Convert. Best for batch/mass conversion. -
emublog2mlv.exe— command-line version. Drag a log onto it, or:emublog2mlv.exe yourlog.emublog REM -> yourlog.msl emublog2mlv.exe *.emublog REM batch convert
Open the resulting .msl in MegaLogViewer HD.
2. Python package (CLI + library)
pip install git+https://github.com/zazzn/emublog2mlv
emublog2mlv yourlog.emublog # -> yourlog.msl
emublog2mlv yourlog.emublog --csv # -> yourlog.csv
emublog2mlv *.emublog # batch convert
emublog2mlv yourlog.emublog --summary # print channel ranges as JSON (no file written)
As a library:
from emublog2mlv import convert, summarize
convert("yourlog.emublog", fmt="msl") # returns stats dict
summarize("yourlog.emublog") # per-channel min/max/mean
3. MCP server (let an AI use it as a tool)
emublog2mlv ships an MCP server so an AI
assistant (Claude Desktop / Claude Code, etc.) can convert and inspect logs for
you.
pip install "emublog2mlv[mcp] @ git+https://github.com/zazzn/emublog2mlv"
claude mcp add emublog2mlv -- emublog2mlv-mcp
Tools exposed:
| Tool | What it does |
|---|---|
convert_emublog(input_path, output_format="msl", output_path=None) |
Convert a log; returns stats |
emublog_summary(input_path) |
Per-channel min/max/mean/first/last (no file written) |
list_channels() |
The decoded channel map (offsets/scales) |
Then just ask: "Convert C:\logs\drive.emublog and tell me where lambda goes lean."
Output
A .msl file has a name row, a units row, then one row per 25 Hz sample, with a
Time column in seconds. Time is anchored to the device's frameStamp clock,
so it stays accurate even though the real sample rate (~25.18 Hz) jitters — a
naïve index / 25 drifts ~0.7% over a few minutes.
Decoded channels
31 measured channels plus 2 derived (AFR, AFRTarget = λ × 14.7):
RPM, MAP, TPS, VE, IgnitionAngle, IgnFromTable, InjectorsPW,
InjectorsDC, InjCalTime, ShortTermTrim, Lambda, LambdaTarget, IAT,
ChargeTemp, CLT, OilTemp, OilPressure, FuelPressure, IATCorrection,
Ethanol, AirFlow, CAM1valveDC, AccelEnrichment, AccelEnrichmentPW,
KnockSensor, BatteryVoltage, BoostTarget, BoostDC, BoostDCFromTable,
IdleTarget, FCustomCorrActive.
Still unmapped — each needs a drive that exercises it: knock level / ignition retard (a knock event), decel enrichment (overrun), warmup/afterstart (a cold start), boost PID correction (closed-loop boost), plus dwell, BARO, gear, vehicle speed, AFR2/Lambda2, and engine power/torque — they read flat in a gentle cruise. EGT is omitted (this car has no EGT sensor). See Contributing.
How the format was reverse-engineered
ECU Master does not publish the .emublog layout. It was recovered by
correlation:
- The file is gzip-compressed. Decompressed, it is a 12-byte header
followed by fixed 308-byte records, one per sample
(
records = (size − 12) / 308). - Export the same drive from EMU Client to CSV (it caps at 13 channels per export, so several exports are taken). These CSVs are row-aligned to the binary (sample N = record N).
- For each known CSV channel, Pearson-correlate its series against a
u16(oru8) value read at every byte offset; the offset with |r| ≈ 1.0 is the channel, and the linear fit gives the scale. - Overlapping clusters (e.g. oil-pressure / oil-temp / fuel-pressure / coolant packed into bytes 111–115) were pinned by dumping raw bytes next to the CSV truth — temperatures turned out to be single-byte integers, pressures a dominant high byte.
Every decoded channel matches the EMU CSV export to the decimal. (The only discrepancies are ~0.8% of rows where EMU's own CSV export jitters ±1–2 frames against the binary — so this converter is actually more faithful than re-exporting CSV from the EMU Client.)
This was reverse-engineered for EMU Black V2 (firmware 2.169). EMU Black
V3 writes a different .emublog3 layout, which is not supported.
Contributing: add a channel
The channel map lives in src/emublog2mlv/core.py as
the CHANNELS table: (name, unit, offset, kind, scale, extra). To map a new
channel, get a log that exercises it (e.g. a boost pull for boost/knock/EGT),
export it to CSV from EMU Client, correlate each byte offset against the CSV
column, verify the decode against the CSV, then add a row. PRs welcome.
Run the tests:
pip install -e ".[dev]"
pytest -q
License
MIT © 2026 Eric W
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。