TSUNAGI///Matrix — MAPPING

io.github.mushitaro由 GitHub 账号 mushitaro 发布v0.4.0更新于 Oct 30, 2026

BMW E46 M3 DME and SMG II: VE and rf_korr from Testo logs, decode SMG calibrations. Local.

已验证Streamable HTTP可网页运行开发者工具数据与分析

概览

AI 生成的概览

读取宝马 E46 M3 的 MSS54HP DME 镜像、行驶日志与 SMG II 变速箱镜像,给出 VE/rf_korr 调校建议并解码标定数据。

可以做什么
  • 说明这套 E46 M3 工具的用途与当前操作流程
  • 读取 64 KB MSS54HP DME 标定:校验和、逻辑补丁、VE 与暖机表
  • 读取 Testo 或 TUNER 行驶日志:可用行数、被排除的样本及原因
  • 根据 BIN 与日志给出 VE(alpha-N)与 rf_korr 修正建议,可选保存修正后的 BIN
  • 检查、解码并比较 SMG II 镜像:ZB 号、CRC、换挡点、齿比、离合与起步设定
适用场景
适合处理宝马 E46 M3(S54、MSS54HP DME、SMG II)的车主或调校者,希望助手在离线状态下解读 BIN 文件、Testo 行驶日志和 SMG II 标定,无需连接车辆或线缆。
运行要求
通过 npx(Node.js)以 stdio 在本机运行,或使用远程 HTTP 端点供无法运行 npm 的助手使用。无需账号或 API 密钥。解码 SMG II 需要用户自备 MS4X 的 TunerPro XDF 文件,包内不附带。输入文件须为规定大小(64 KB DME 局部镜像、24 KB 或 512 KB SMG 镜像)。
安装前请注意
结果仅为只读计算;写入车辆需在 TSUNAGI 的其他应用中进行,其中 rf_korr、SMG II 编辑与 MIGRATION 需要付费的 WORKS 版本。远程端点会接收上传的 BIN 与日志文件,下载后在内存中计算且不保留;本机使用则不外发任何数据。rf_korr 计算标注为实验性。VIN 与 DME 身份信息被刻意不输出。

安装

在 SourceWeft 中

  1. 打开 控制台中的 TSUNAGI///Matrix — MAPPING,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.mushitaro%2Fmatrix-tsunagi-mapping/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "tsunagi-matrix-mapping": {
      "type": "http",
      "url": "https://matrix-mcp.tsunagi.app/mcp/mapping"
    }
  }
}

README

matrix-tsunagi — TSUNAGI///Matrix

The calculations behind TSUNAGI's BMW E46 M3 tools, as a library, a command line and MCP servers. Read an MSS54HP DME image and a drive log, and get the VE map correction the drive supports. Read an SMG II gearbox image, and decode and compare its calibration. Read a DME backup or a cluster EEPROM backup, and check what it holds. On your own machine, with no car and no cable.

bash
npx matrix-tsunagi mapping ve --sample

--sample runs on the practice files shipped in the package. Replace it with --bin <file.bin> --log <file.csv> for your own.

Installing it for an AI assistant (Claude, ChatGPT and others): see INSTALL.md. It is written so that you can hand this repository to the assistant and it installs what fits its client.

TSUNAGI///M is TSUNAGI's family of tools for the E46 M3 (S54 engine, MSS54HP DME, SMG II). Owners meet the tools on m3.tsunagi.app; AI assistants meet them here. TSUNAGI///Matrix is the family's gate for AI assistants: it computes nothing of its own, and carries each tool's own code to the assistant, one category at a time. This package carries two categories. MAPPING: MSS54HP CSL CONVERT /// TUNER and E46M3SMG2 /// MAPPING. MIGRATION: it reads the backups of MSS54HP CSL CONVERT /// BOOT and E46 M35080 /// MIGRATION, and only reads them.

Ask it

How do I correct the VE (alpha-N) map of my CSL-converted MSS54HP from a Testo log?

bash
npx matrix-tsunagi mapping ve --bin my.bin --log drive.csv --out tuned.bin

Which cells change and by how much, which need more driving and how to drive them, and — with --out — the tuned BIN with its checksums corrected. That file is byte-for-byte what TUNER's DOWNLOAD TUNED gives for the same two files.

What is in my MSS54HP bin? Are its checksums right? Which patches are on it?

bash
npx matrix-tsunagi mapping bin my.bin

Why did most of my log get thrown away?

bash
npx matrix-tsunagi mapping log drive.csv --bin my.bin

Every reason a sample was left out (cold engine, transient, full load, overrun…), each with what to change on the next drive.

What rf_korr table does my drive support? (experimental)

bash
npx matrix-tsunagi mapping rfkorr --bin my.bin --log drive.csv

The exhaust-temperature density correction (KF_RF_KORR_DRREL), cell by cell, with the evidence behind each.

What are my SMG II shift points? What is this SMG image?

bash
npx matrix-tsunagi mapping smg2 image smg.binnpx matrix-tsunagi mapping smg2 read smg.bin --xdf Siemens_SMG_II_510_512K.xdf --item "A1 Speed"

smg2 image needs nothing else: it says whether the image is the 24 KiB calibration window or the full 512 KiB flash, and gives the ZB number and whether the CRC checksums hold. smg2 read decodes every item the MS4X definition names, through E46M3SMG2 /// MAPPING's corrections to it. That includes shift speed thresholds per gear and program, gear ratios, and clutch and launch settings. The definition (Siemens_SMG_II_510_24K.xdf or _512K.xdf) is the MS4X Dev Team's and is not shipped here, so pass your own. The WORKS build of E46M3SMG2 /// MAPPING carries it.

What changed between two SMG II calibrations?

bash
npx matrix-tsunagi mapping smg2 compare before.bin after.bin --xdf Siemens_SMG_II_510_512K.xdf

Which bootloader is in my DME backup, and what is left of the CSL conversion?

bash
npx matrix-tsunagi migration boot backup dme-backup.bin

From BOOT's full 1 MiB backup: standard M3 or CSL bootloader on each processor, whether each bootloader CRC holds, the program number, and the stages left. migration boot compare a.bin b.bin names where two backups differ.

What mileage does this cluster EEPROM hold? Is the dump even a real read?

bash
npx matrix-tsunagi migration m35080 read eeprom.bin

From a 1 KB M35080 backup: whether it is a real chip read (a dead or shorted bus reads as one repeated byte), the mileage in the secure counter, the layout and checksums, and whether the VIN copies agree. migration m35080 compare a.bin b.bin shows which area changed between two dumps.

MIGRATION only reads. The functions that would change an image are not in this package, and npm run verify checks the bundle for them. The VIN and the DME's identity record are never printed, because what a command prints goes into the conversation with the assistant.

What can it do?

bash
npx matrix-tsunagi describe

For AI assistants

  • Run npx matrix-tsunagi describe once. Every command prints JSON on stdout, and errors come as JSON on stderr with exit code 1.
  • Each result has a summary to relay, result with the numbers, and source, which says which tool and version computed it and whether the calculation is experimental.
  • apply appears only when the owner would have to write the result to the car. It names the app, says whether the app is free or WORKS, and says how. apply.how and source.note are in English and Japanese.
  • With no files yet, add --sample to show the command working on the practice BIN and drive.
  • Nothing is sent anywhere. Files are read from the paths you give.

Claude plugin

plugin/ is the Claude plugin, one package for both parts. The public part runs the MAPPING and MIGRATION servers on this computer (Claude Code), with the matrix-public Skill. The WORKS part is the TUNER WORKS connector (bridge/, sign-in on m3) with the tuner-drive Skill, so an owner can talk to TUNER WORKS while it logs the car, from the phone too. It can stage a calibration change, save the session and sync it with the owner's cloud, each after the owner says yes; connecting to the car and writing to it stay with the owner, on the screen. The Skills are only the way in: the procedures come from the servers (about_matrix's howToUse, tuner_guide), so they update with the tools without a new plugin, and the plugin runs the newest matrix-tsunagi on npm. How to install it is in INSTALL.md.

MCP

There are two servers, one per category.

The MAPPING server exposes the same calculations as tools. For TUNER: read_bin, read_log, propose_ve and propose_rfkorr. For SMG2: smg2_image, smg2_read and smg2_compare. And about_matrix. It runs locally over stdio.

The MIGRATION server (npx -y matrix-tsunagi mcp migration, or npx -y matrix-tsunagi-migration) exposes boot_backup, boot_compare, m35080_read, m35080_compare and about_matrix, all read-only.

Claude Code:

bash
claude mcp add matrix-tsunagi-mapping -- npx -y matrix-tsunagi mcp mapping

Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "matrix-tsunagi-mapping": {      "command": "npx",      "args": ["-y", "matrix-tsunagi", "mcp", "mapping"]    }  }}

On Windows, if npx is not found, use "command": "cmd" with "args": ["/c", "npx", "-y", "matrix-tsunagi", "mcp", "mapping"].

Remote (ChatGPT)

For assistants that cannot run npm, the MAPPING server also runs remotely:

https://matrix-mcp.tsunagi.app/mcp/mapping

In ChatGPT, turn on Developer mode (Settings → Security and login), then add it as a plugin by that URL. Attach your BIN and log in the chat and ask. Files reach the server as ChatGPT file parameters: it downloads them from the temporary link ChatGPT issues, computes in memory, returns the result, and keeps nothing. It returns values only, so make the tuned BIN with the free TUNER, and it is MAPPING only, because MIGRATION's dumps carry a VIN and a mileage and stay on your machine. How it handles files is set out in section 11 of the privacy policy.

Library

js
import { mapping } from 'matrix-tsunagi';import fs from 'node:fs';
const ve = mapping.proposeVe({  bin: new Uint8Array(fs.readFileSync('my.bin')),  csv: fs.readFileSync('drive.csv', 'utf8'),});console.log(ve.summary);fs.writeFileSync('tuned.bin', ve.tunedBin);

mapping.readBin, mapping.readLog and mapping.proposeRfKorr take the same inputs. For SMG2 there are mapping.smg2Image({ image }), mapping.smg2Read({ image, xdf, item }) and mapping.smg2Compare({ image, other, xdf }), where xdf is the definition's text.

Putting a result on the car

The calculations are free. Writing a result to the car is done in the apps.

ResultWritten to the car by
VE map (ve)MSS54HP CSL CONVERT /// TUNER, free, in the browser, over a K+DCAN cable. --out also saves the same file here.
rf_korr table (rfkorr)The WORKS build of TUNER, which makes the file and writes it. This package returns the values only.
DME backup (migration boot)Backing a DME up over OBD, verifying it and planning its CSL conversion are done in the WORKS build of MSS54HP CSL CONVERT /// BOOT.
Cluster EEPROM (migration m35080)Reading, backing up and repairing the M35080, and carrying a car's true mileage and coding to a replacement cluster, are done in the WORKS build of E46 M35080 /// MIGRATION. The counter only goes up; the tool carries the true reading.
SMG II calibration (smg2)Reading it from the car, and editing and exporting it, are done in the WORKS build of E46M3SMG2 /// MAPPING, which carries the MS4X definition. This package reads, decodes and compares only.

The WORKS builds are for people who have bought MILE on MESH, and for owners of cars TSUNAGI has worked on, on request. They are TUNER's experimental features, E46M3SMG2 /// MAPPING, E46M3 /// MONITORING, MSS54HP CSL CONVERT /// BOOT and E46 M35080 /// MIGRATION. MILE is a one-time payment, with no subscription and no renewal. A purchaser can allocate MILE to a MILESTONE to say what they would like it spent on. That is a wish on record, not a promise of any release or date.

Inputs

  • BIN: the 65,536-byte MSS54HP calibration partial ("0401 partial BIN"), the file TUNER reads and writes.
  • Log: a CSV with a header row, either Testo's MSS54 export or a CSV TUNER exported. Columns are matched as Testo and TUNER spell them. If a required column is missing, the error names the headers that would be accepted.
  • SMG II image: the 24,576-byte calibration window or the 524,288-byte full flash of the SMG II 510, as E46M3SMG2 /// MAPPING reads and exports them.
  • DME backup: the 1,048,576-byte full MSS54HP image (master and slave), as BOOT backs it up.
  • M35080 image: the 1,024-byte cluster EEPROM, as E46 M35080 /// MIGRATION backs it up.
  • XDF: the MS4X Dev Team's TunerPro definition, Siemens_SMG_II_510_24K.xdf for a window or _512K.xdf for a full read. The other variant is refused rather than read at the wrong offset.

Where the numbers come from

This package does not re-implement anything. It bundles each tool's own code from its public repository, at the commit its submodule is pinned to: mushitaro/mss54hp-csl-convert-tuner (vendor/tuner) and mushitaro/e46m3smg2-mapping (vendor/smg2), mushitaro/mss54hp-csl-convert-boot (vendor/boot) and mushitaro/e46-m35080-migration (vendor/m35080). Every result names the tool, version and commit in source.

npm run verify holds the tuned BIN to a SHA-256 measured from TUNER's own DOWNLOAD TUNED, read out of that same commit. It holds SMG2's decoding to the app's own loadDefinition, item by item. Each has a control that shows the comparison can fail. The SMG2 check needs the MS4X definitions and a car's image, which are not public. Without them it reports SKIP, which is not a pass.

bash
git clone --recursive https://github.com/mushitaro/matrix-tsunagicd matrix-tsunagi && npm install && npm run verify

日本語

TSUNAGI///M(BMW E46 M3 のツール群)の計算を、ライブラリ・コマンド・MCP で使えるようにしたパッケージです。 TSUNAGI///Matrix は、M のツールを AI アシスタントにつなぐ門です。自分では計算せず、各ツールのコードをカテゴリごとに束ねて渡します。 MSS54HP の BIN と走行ログ(Testo の CSV)から、VE マップの補正案、ログのどこが使われなかったかとその直し方、rf_korr の表(試験中)を出します。 SMG II の画像からは、ZB 番号とチェックサム、較正の解読(変速点など)、2 本の比較を出します。解読には、お手持ちの MS4X の XDF が要ります。 MIGRATION は、DME のバックアップ(ブートローダの種類と CRC、CSL 化の残り)と、メーターの M35080 のバックアップ(走行距離、チェックサム、VIN の一致)を読むだけで、書き換えはしません。VIN と DME の識別情報は出力しません。 お手元の PC で計算し、どこにも送信しません。ファイルがなくても --sample で試せます。

VE マップは MSS54HP CSL CONVERT /// TUNER(無料・ブラウザで動作)で車に書き込めます。 rf_korr などの試験中の機能は、TUNER のワークス版でファイルにして書き込みます。 SMG II の車からの読み取り・編集・書き出しは、E46M3SMG2 /// MAPPING のワークス版で行えます。ワークス版には XDF も入っています。 ワークス版は、MESH で MILE をご購入いただいた方と、お申し出いただいた施工オーナーさんがお使いいただけます。 MILE は一回限りのお支払いで、自動更新はありません。 MILESTONE への割り当ては使い道のご希望の表示で、公開や時期を約束するものではありません。

License

MIT, © TSUNAGI. See THIRD-PARTY-NOTICES.md for what is bundled, including the practice BIN.

来源:README.md,提交 d4aab7f

工具

8

about_matrix

About TSUNAGI///Matrix

What TSUNAGI///Matrix is (BMW E46 M3 / S54 / MSS54HP / SMG II tools), which commands exist, which app puts a result on the car, how the WORKS builds and MILE on MESH work, and how to go about these tools (howToUse, the current procedure). Call this first, and before recommending the apps.

无需输入参数。

read_bin

Read an MSS54HP DME image

BMW E46 M3 (S54) MSS54HP DME, CSL conversion: read a 64 KB calibration partial and report the checksums, the logic patches (MAP, TANK VENT, WOT TH, RF GATE), how far the VE (alpha-N) and warm-up tables are from stock, and the VE table.

输入参数bin_pathuse_sample

read_log

Read an MSS54HP drive log

BMW E46 M3 (S54) MSS54HP: read a drive log (Testo CSV, or TUNER's own CSV) and report its channels, how many rows the VE and rf_korr calculations can use, and why the rest were left out — each reason with what to change on the next drive. Pass the BIN it was driven on for the DME's own lambda thresholds.

输入参数bin_pathlog_pathuse_sample

propose_ve

VE map correction from a drive

BMW E46 M3 (S54) MSS54HP, CSL conversion tuning: from a DME image and a drive log, the VE (alpha-N) map the drive supports — which cells change and by how much, which need more driving and how. With out_path, also saves the tuned BIN (checksums corrected), byte-for-byte what MSS54HP CSL CONVERT /// TUNER's DOWNLOAD TUNED produces.

输入参数bin_pathlog_pathout_pathuse_sample

propose_rfkorr

rf_korr table from a drive (experimental)

BMW E46 M3 (S54) MSS54HP: from a DME image and a drive log with exhaust temperature, the rf_korr table (KF_RF_KORR_DRREL, exhaust-temperature density correction) the drive supports, with the evidence per cell. Experimental in the app; returns values only — the WORKS build of TUNER makes the file and writes it.

输入参数bin_pathlog_pathuse_sample

smg2_image

Identify an SMG II image

BMW E46 M3 SMG II (Siemens SMG2 510, the sequential gearbox ECU): say what an image is — the 24 KiB calibration window or the full 512 KiB flash — its ZB number, and whether its CRC checksums hold. Needs no definition.

输入参数image_pathuse_sample

smg2_read

Decode an SMG II calibration

BMW E46 M3 SMG II (Siemens SMG2 510): decode the calibration — shift speed thresholds per gear and program (AUTO, SPORT/RACE, Drivelogic), gear ratios, clutch and launch settings — through the MS4X definition with E46M3SMG2 /// MAPPING's corrections. Pass item for one item's full table and axes.

输入参数itemxdf_path必填image_path

smg2_compare

Compare two SMG II calibrations

BMW E46 M3 SMG II (Siemens SMG2 510): which calibration items differ between two images of the same scope, how many cells, and the largest difference in physical units.

输入参数xdf_path必填image_path必填other_path必填

版本历史

3
  1. v0.4.0最新Oct 23, 2026
  2. v0.2.0Sep 30, 2026
  3. v0.1.0Sep 30, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分