
Acpi Mcp
io.github.0xmortuex由 GitHub 帳號 0xmortuex 發布v0.1.0更新於 Oct 24, 2026
Read ACPI tables from a live QEMU guest or files and explain them for OS developers.
概覽
從執行中的 QEMU 客體或表檔案讀取 ACPI 韌體表,並為作業系統開發者解釋其含義。
- 可以做什麼
- 從 QEMU gdbstub 連接埠或表檔案目錄載入表集,並列出已載入的表集
- 列出所有表及其位址、長度、檢查碼與 OEM,並可對原始位元組做十六進位傾印
- 解碼並解釋單一表,如 FADT、MADT、HPET、MCFG、DSDT/SSDT 與 FACS
- 將 ISA IRQ 對應到 GSI 與 I/O APIC 腳位,並給出極性與觸發方式
- 回答關機、重置、HPET、PCI 設定空間、CPU、PM 計時器、鍵盤、序列埠與 SCI 等 OS 開發問題
- 在已安裝 iasl 時把 AML 反組譯為 ASL
- 適用情境
- 適合在 x86 上撰寫或除錯業餘或研究用作業系統核心時,需要了解韌體實際建構了什麼:CPU 與 APIC 配置、中斷路由、PCIe 設定空間,或關機與重置的具體埠寫入。也適合在不讀規格書的情況下檢視已擷取的 acpidump 輸出。
- 執行需求
- 以 Python 套件形式在本機執行(pip install acpi-mcp),透過 stdio 通訊。即時讀取需以 -s 啟動 QEMU 的 gdbstub;從 /sys/firmware/acpi/tables 讀取本機表需要 root 權限。AML 反組譯需選用安裝 iasl。不需帳號、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Acpi Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
acpi-mcp
Let your AI agent read the firmware's ACPI tables and tell you what they mean.
acpi-mcp is an MCP server that reads ACPI tables and explains them for OS developers. It covers how many CPUs there are and their APIC IDs, where the I/O APIC lives, which ISA IRQs are remapped, where the HPET and PCIe config space are, and the exact port writes that power the machine off or reset it.
It reads tables from three places:
- a live QEMU guest, out of guest physical memory through QEMU's gdbstub (works even after the guest turns on paging);
- a directory of table files: Linux's
/sys/firmware/acpi/tables, oracpidump -boutput from any machine; - optionally, AML disassembly with
iaslif you have it installed. Nothing else needs it.
Companion to qemu-mcp (boot and drive the VM) and gdbstub-mcp (debug the kernel).
What it looks like
This is real output from QEMU 11 (-M q35 -smp 2), read live from the guest:
The recipes are tested, not just printed. The integration tests write the exact
instructions acpi_find prescribes into a live guest, run them, and check the
result: the shutdown recipe powers off both -M pc and -M q35, and the reset
recipe resets q35. A control case that only runs hlt keeps running.
Why
ACPI is the first wall every hobby OS hits after "hello world". You need it for SMP, the I/O APIC, the HPET, PCIe and power-off. The tables are binary structures spread across firmware memory, the spec runs to over a thousand pages, and the bugs are silent: miss the IRQ0 → GSI2 override and your timer simply never fires. This server reads the tables your firmware actually built and answers in terms of what to program.
As far as I could find, no other MCP server reads or explains ACPI tables.
Install
Usage
Start QEMU with its gdbstub (-s). -S is fine, because acpi-mcp lets the firmware
run until the tables exist:
Then ask your agent something like "load the ACPI tables from the VM on port 1234 and tell me how to route the keyboard interrupt through the I/O APIC".
On a Linux machine you can read its own tables (as root):
Tools
How it reads a live VM
- It connects to the gdbstub. QEMU pauses the guest while a debugger is attached.
- It switches the stub to physical memory with QEMU's
Qqemu.PhyMemMode:1, so ACPI's physical pointers work even when the guest has paging on. On stubs without this packet it reads virtual addresses and says so in the output. - It searches the EBDA and
0xE0000-0xFFFFFfor a checksummedRSD PTR, then walks the XSDT (or RSDT), the FADT, the DSDT and the FACS. - If the CPU hasn't run the firmware yet (
-S), it runs the guest in short bursts until a complete, checksum-valid table set exists. It returns as soon as one does. - It detaches with
D;1, and the guest continues. Passresume=Falseto leave it paused, for example before attaching gdbstub-mcp to a-SVM. QEMU allows only one debugger at a time.
Limits
- The AML reader is a structured walker, not an interpreter. It parses the Scope,
Device and Name objects that describe devices and skips Method bodies. Anything a
method computes at runtime, such as a
_STAthat hides a device, isn't evaluated. If it ever has to fall back to byte-scanning a region (anIfat scope level), the output says so. Useacpi_disassemble(iasl) for an exact listing. - UEFI guests (OVMF) pass the RSDP to the OS through the EFI system table, not the
BIOS area, so the live search won't find it. Load those tables from a directory
(
acpidump -b) for now. - x86 only for now. ARM's ACPI (GICC/GICD in the MADT, GTDT) is on the backlog.
Tests
The unit tests run on real tables captured from QEMU (tests/fixtures/tables/), so
they need no QEMU. tests/test_qemu_integration.py reads live tables from i386 and
x86_64 guests on both pc and q35, checks that the CPU count follows -smp, checks
resume semantics, and runs the shutdown and reset recipes inside the guest. It skips
any QEMU binary that isn't installed.
License
MIT
來源:README.md,提交 7416f8b
工具
0版本歷史
1- v0.1.0最新Oct 11, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分