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 產生的概覽

讀取 BMW 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、換檔點、齒比、離合器與起步設定
適用情境
適合處理 BMW 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 分