
ASTM LIS Analyzer Receiver
io.github.K-Dense-AI由 GitHub 帳號 K-Dense-AI 發布v0.1.3更新於 Oct 24, 2026
MCP server that receives results from clinical/lab analyzers over ASTM E1381/E1394 (CLSI LIS1/LIS2).
概覽
僅接收的 MCP 伺服器,透過 ASTM E1381/E1394 蒐集臨床實驗室分析儀結果,讓助理依檢體、病人、檢驗項目或時間查詢。
- 可以做什麼
- 依檢體 ID、病人 ID、檢驗項目代碼、接收時間或異常旗標篩選已接收結果,並檢視單一結果的完整解碼欄位、註解與原始紀錄。列出最近的 ASTM 訊息,查看分析儀連線狀態、訊息數量與連結層錯誤計數。檢視連線身分、位址、唯讀模式與生效的安全限制,並讀取原始指令日誌以利排查。斷電或換線後重新連線,並在兩次執行之間清除已存結果。
- 適用情境
- 適用於實驗室維運與研究情境:分析儀透過 ASTM 主機介面上傳結果,需要助理查找、篩選或彙整已到達的資料。不用於報告、發布或解讀病人結果,也不用於診斷或任何臨床決策。
- 執行需求
- 以 Python 套件(uvx labmcp-astm-lis)透過 stdio 在本機執行,僅限桌面環境。需要與分析儀建立連線:序列埠裝置路徑,或 TCP 位址/監聽埠,透過 LABMCP_ADDRESS 或命令列選項設定。分析儀須啟用 ASTM E1381 訊框格式與自動結果上傳,並關閉主機查詢與醫囑模式。設定 LABMCP_SIMULATE=1 可使用內建模擬器,無需硬體。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ASTM LIS Analyzer Receiver,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ASTM LIS Analyzer Receiver — MCP Server
Let an AI agent collect and query results from clinical and laboratory analyzers (hematology, clinical chemistry, immunoassay, urinalysis, coagulation) that upload results over the standard ASTM E1381 / E1394 host interface (CLSI LIS1-A / LIS2-A2). The server acts as a small, receive-only LIS endpoint: it acknowledges the analyzer's frames, validates checksums, reassembles messages and lets the agent look results up by sample, patient, test or time.
[!WARNING] Research and lab-operations use only. This is not a medical device and not a validated laboratory information system. It must not be used to report, release or interpret patient results, for diagnosis, or for any clinical decision-making. Results pass through an AI agent that can misread them; always rely on your laboratory's validated LIS/middleware and release process. Patient data is personal health information: patient name, birth date, address and phone are redacted by default; follow your institution's privacy rules before changing that.
Try it without hardware
The simulated analyzer uploads two messages right after start: a CBC with 5-part differential (with H/L flags and suspect-flag comments, one record long enough to need two frames, and one frame corrupted on the line that is NAKed and retransmitted) and a chemistry panel (high glucose and potassium with a hemolysis comment). All patient data in it is fictitious.
Connect your analyzer
On the analyzer, open the host / LIS / "online" communication settings:
- Protocol: ASTM (may be called ASTM E1381/E1394, LIS1-A/LIS2-A2, CLSI or "ASTM host"). Keep the ASTM low-level protocol (ENQ/STX framing) enabled, also over TCP/IP.
- Results: enable automatic result upload.
- Queries and orders: this server does not answer host queries or download orders. Turn off "host query" / "order request" / bidirectional mode, otherwise the analyzer waits for (and times out on) an answer before running samples.
- Link: pick one of
- RS-232: note the baud rate (commonly 9600), 8 data bits, no parity, 1 stop bit (fixed by E1381), and use a null-modem cable.
- TCP, analyzer is the server (it listens on a port): the LIS connects to it.
- TCP, analyzer is the client (you enter the host IP/port on the analyzer): this server listens. Allow the port through the computer's firewall and restrict senders with
allow_from.
- Optional: keep a local record of every message with
--option store_path=~/lis/results.jsonl(the newestmax_messagesare reloaded when the server restarts; if the file cannot be written, messages are still kept in memory andget_connection_statusreportsstore_write_errors).
The receiver starts as soon as the MCP server starts, so uploads are acknowledged even before the agent calls a tool. Received results stay in memory across reconnect (only clear_results or a server restart without store_path removes them), because the analyzer never re-sends a result it has been sent an ACK for.
Add to your MCP client
Claude Code
Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)
Add --read-only to hide clear_results. For other clients, generate the snippet with uvx labmcp config astm-lis --address /dev/ttyUSB0 --client vscode (also cursor, codex, claude-code).
Tools
get_connection_info, get_command_log and reconnect are built into every LabMCP server.
Safety limits
This server is receive-only and never commands the analyzer (it only answers ACK/NAK), so it has no physical safety limits. Privacy settings:
Patient IDs, sex, attending physician and free-text comment records are not redacted (IDs are needed to filter results). If your analyzers put identifying text in comments, treat the output accordingly.
Example prompts
- "Have any results come in from the hematology analyzer in the last hour? List the samples."
- "Show me all flagged results for sample S26-000123, with units, reference ranges and the analyzer's comments."
- "Export today's potassium results as a table of sample ID, value and flag."
- "Is the analyzer link healthy? How many frames were NAKed today and why?"
- "Compare the glucose results of samples S26-000124 and S26-000131."
- "Clear the stored results before we start the next validation run."
Notes
- Receive-only. No order download, no host-query responses and no result acknowledgements beyond the link-level ACK. Query (Q) messages from the analyzer are stored and reported (
kind: "query") but not answered. Order download is planned future work. - Link layer (E1381). Every frame is checked: checksum (modulo-256 sum from the frame number to ETX/ETB, as two hex digits), frame number (first frame 1, then modulo 8; a repeat of the last accepted number is treated as a retransmission and ACKed without duplicating data) and framing. Defective frames get NAK and the analyzer retransmits them. Frames outside an ENQ … EOT session are ignored and counted in
bytes_ignored, which usually means the analyzer is not using the ASTM low-level protocol (raw E1394 without framing is not supported). A session that goes silent for 30 s, or restarts with ENQ, has its incomplete message discarded, as E1381 requires; a message that ends with EOT but no terminator (L) record is kept and flaggedcomplete: false. - Tolerances. Frames with more than 240 text characters and end frames that pack several records are accepted (and counted); a frame whose CR LF never arrives is NAKed after 10 s. Text is decoded as Latin-1 by default (
--option encoding=...; an unknown encoding name is refused at start-up). - Records (E1394). Delimiters are taken from each header record (
H|\^&by default). Escape sequences&F& &S& &R& &E&and the vendor form&|&are decoded; other escapes are kept verbatim. The test code is the first non-empty "local code" component of the Universal Test ID (^^^TSH,^^^^WBC), falling back to the first component. The sample ID is the order's Specimen ID, or the first non-empty component of the Instrument Specimen ID. Values are returned exactly as sent ("<0.1",">500","Cancelled");numeric_valueis only set for plain numbers. - Flags and statuses are passed through as sent. Meanings are only attached for the abnormal flags defined by LIS2-A2 / E1394 (
N L H LL HH < > A U D B W) and the result statuses documented in the vendor specification used (F X); anything else is analyzer-specific, so check your analyzer's host-interface manual. - Timestamps inside records (test started/completed, header time) are the analyzer's local time;
received_atis when this server stored the message (UTC). - Listen mode serves one analyzer per port: a new connection replaces the previous one (analyzers often reconnect after a reboot without closing the old socket). Run one server entry (or port) per analyzer. There is no TLS; keep the port on the lab network and use
allow_from. - Only tested against the simulator and loopback TCP. Differences between vendors' ASTM dialects are common; please report what works (or doesn't) with your analyzer.
Hardware verification
來源:servers/health/astm-lis-analyzer/README.md,提交 46545ea
工具
0版本歷史
2- v0.1.3最新Sep 27, 2026
- v0.1.1Sep 26, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分