MsgPack (LsMsgPack)
io.github.mlsomersv2026.10.10.2更新於 Oct 10, 2026
Decodes MsgPack (LsMsgPack schemas, type ids) as text and reads it from variables while debugging.
概覽
將 MsgPack 二進位資料解碼為可讀的 JSON,並可讀取在 VS Code 或 Visual Studio 偵錯工具中暫停的程式之 byte 變數。
- 功能
- 此伺服器會把 MsgPack 資料轉成帶註解的 JSON,並解析 LsMsgPack 索引式結構描述,讓型別與屬性編號變成名稱。工具可從十六進位、base64、byte 值、檔案或先前解碼的文件中解碼資料;列出偵錯工作階段與暫停堆疊框架的變數;讀取並解碼暫停程式中某個運算式的位元組;解釋指定位移處位元組的意義;搜尋文字或值;以及把資料讀入已編譯 .NET 組件的類別並回報不符之處。解碼後的資料會取得文件編號,方便後續呼叫,輸出可依路徑、位元組範圍、檢視與位移選項篩選。
- 適用情境
- 當助理需要檢查難以用十六進位或 base64 閱讀的 MsgPack 資料時很有用,尤其是結構描述僅以 16 位元組編號引用的 LsMsgPack 資料。也適合在 VS Code 或 Visual Studio 中偵錯 .NET 程式,讓助理讀取暫停堆疊框架中變數或成員的位元組並解碼。
- 執行需求
- 需要 .NET 執行階段 8 或更新版本;以全域工具 LsMsgPack.Mcp 安裝,命令為 lsmsgpack-mcp,透過 stdio 在本機執行。偵錯功能需要 VS Code 的 MsgPack Explorer 擴充功能或 Visual Studio 的 MsgPack Debugger Extension,它們會監聽 127.0.0.1,並在使用者設定目錄下寫入含連接埠與權杖的鎖定檔。未宣告任何帳戶、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MsgPack (LsMsgPack),將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
LsMsgPack MCP server
MsgPack for AI agents. An MCP server and a command line tool that decode MsgPack data into text an AI (or a person in a terminal) can read, and that read the bytes of a variable of a program paused in the debugger of VS Code or Visual Studio.
Language models read text, not bytes. Hex or base64 costs several tokens per byte, and decoding it by hand is slow and error-prone. Some data can't be decoded from the bytes at all: LsMsgPack's indexed schema writes property names as indexes, and a schema reference holds only the 16-byte id of the schema. This tool decodes the data with the LsMsgPack library itself (the code of MsgPack Explorer) and writes it as JSON with comments:
It reads any MsgPack, not only data written by LsMsgPack. Errors come with their offset, and the values read after an error are marked.
Install
Requires the .NET runtime 8 or later.
From source: dotnet publish LsMsgPackMcpServer -c Release -o <folder>, then run dotnet <folder>/LsMsgPackMcp.dll in place of lsmsgpack-mcp.
Add it to your agent
In VS Code, MsgPack: Copy MCP Server Configuration... copies these: for the tool when it is installed, otherwise for the server that comes with the extension (its path has the extension's version in it, so copy it again after an update).
Tools
Every decoded payload gets a document id (doc1, doc2...) for follow-up calls. The output can be narrowed and switched with these options:
view:objects(default),items(the MsgPack encodings with offsets) orboth.path(e.g.Lines[2]),from/to(a byte range),maxNodes,maxString.offsetsadds the offset of every value.issuestakeserrors,allornone.endianandcontinueOnError(on by default).
Debugging
The MsgPack extensions of VS Code (MsgPack Explorer) and Visual Studio (MsgPack Debugger Extension) listen on 127.0.0.1. They write a lock file with their port and a random token to ~/.lsmsgpack/ide (%USERPROFILE%\.lsmsgpack\ide). The MCP server uses the IDE that started it, otherwise the one whose workspace holds its working directory (ide picks one when several run).
- By default only variable and member paths are read (
buffer,this._payload,response.Content,items[2].Data), no method calls. The IDE setting can allow any expression:lsmsgpack.mcp.allowAnyExpressionin VS Code (user settings only), Tools > Options > MsgPack Explorer in Visual Studio. - A stream that can't seek is consumed by reading it, so the IDE asks the user first.
- The IDE settings can turn the bridge off:
lsmsgpack.mcp.enabledin VS Code, and the same options page in Visual Studio.
Command line
lsmsgpack-mcp --help lists the options. Without arguments it runs the MCP server on stdin/stdout.
More: docs/Mcp.md.
來源:LsMsgPackMcpServer/README.md,提交 7be5fc8
工具
0版本歷史
1- v2026.10.10.2最新Oct 10, 2026


