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).

已验证STDIO仅桌面位置与生活数据与分析

概览

AI 生成的概览

只接收的 MCP 服务器,通过 ASTM E1381/E1394 采集临床实验室分析仪结果,并让助手按样本、患者、检验项目或时间查询。

可以做什么
按样本 ID、患者 ID、检验项目代码、接收时间或异常标志筛选已接收结果,并查看单条结果的完整解码字段、注释与原始记录。列出最近的 ASTM 消息,查看分析仪链路状态、消息数量和链路层错误计数。查看连接身份、地址、只读模式与生效的安全限制,并读取原始命令日志用于排查。断电或换线后重连链路,并在两次运行之间清空已存结果。
适用场景
适用于实验室运维与研究场景:分析仪通过 ASTM 主机接口上传结果,需要助手查找、筛选或汇总已到达的数据。不用于报告、发布或解读患者结果,也不用于诊断或任何临床决策。
运行要求
以 Python 包(uvx labmcp-astm-lis)通过 stdio 在本机运行,仅限桌面环境。需要与分析仪建立连接:串口设备路径,或 TCP 地址/监听端口,通过 LABMCP_ADDRESS 或命令行选项设置。分析仪须启用 ASTM E1381 帧格式和自动结果上传,并关闭主机查询与医嘱模式。设置 LABMCP_SIMULATE=1 可用内置模拟器,无需硬件。
安装前请注意
明确不是医疗器械,也不是经过验证的 LIS;结果会经过可能误读的 AI 助手,应以实验室已验证的 LIS 和发布流程为准。患者姓名、出生日期、地址和电话默认脱敏,但患者 ID、性别、医生和自由文本注释不脱敏,须遵守机构隐私规定。监听模式没有 TLS,应用 allow_from 限制来源并仅限实验室网络。clear_results 会删除已存消息,LABMCP_READ_ONLY=1 可隐藏该工具。仅在模拟器和回环 TCP 上测试过,尚未在真实分析仪上验证。

安装

在 SourceWeft 中

  1. 打开 控制台中的 ASTM LIS Analyzer Receiver,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

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.

Packagelabmcp-astm-lis
InstrumentsAnalyzers whose host-interface manual specifies ASTM E1381/E1394 (CLSI LIS1-A/LIS2-A2) result upload, e.g. models from Sysmex, Roche (cobas), Abbott, Beckman Coulter, Mindray and others. Check your model's host-interface manual.
InterfacesRS-232 (serial://), TCP/IP with the analyzer as server (tcp://analyzer:port), TCP/IP with the analyzer as client (--option listen_port=5000)
ProtocolASTM E1381 low-level protocol (ENQ/ACK/NAK/EOT, framed text with modulo-8 frame numbers and checksums) + ASTM E1394 records H, P, O, R, C, Q, L. Implemented from the publicly available Beckman Coulter UniCel DxI / Access 2 LIS Vendor Information, C03112-AF (chapters 2–4); the ASTM/CLSI standards themselves are purchase-only. Receive-only.
Status🧪 simulated: tested against a wire-level analyzer simulator and loopback TCP, not yet verified on an analyzer. Report a hardware test

Try it without hardware

bash
uvx labmcp-astm-lis --simulate --check

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:

  1. 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.
  2. Results: enable automatic result upload.
  3. 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.
  4. 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.
      bash
      uvx labmcp-astm-lis --address /dev/ttyUSB0 --check                        # Linuxuvx labmcp-astm-lis --address serial://COM3?baudrate=19200 --check        # Windows, non-default baud
    • TCP, analyzer is the server (it listens on a port): the LIS connects to it.
      bash
      uvx labmcp-astm-lis --address tcp://192.168.1.80:5000 --check
    • 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.
      bash
      uvx labmcp-astm-lis --option listen_port=5000 --option allow_from=192.168.1.80 --check
  5. Optional: keep a local record of every message with --option store_path=~/lis/results.jsonl (the newest max_messages are reloaded when the server restarts; if the file cannot be written, messages are still kept in memory and get_connection_status reports store_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

bash
claude mcp add analyzer -- uvx labmcp-astm-lis --option listen_port=5000 --option store_path=~/lis/results.jsonl

Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)

json
{  "mcpServers": {    "analyzer": {      "command": "uvx",      "args": ["labmcp-astm-lis", "--address", "/dev/ttyUSB0"]    }  }}

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

ToolKindDescription
clear_results🎛 controlDelete all received messages and results from this server's memory (e.g. between runs).
get_command_log👁 readReturn the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.
get_connection_info👁 readReport which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.
get_connection_status👁 readReport the analyzer link state, the messages and results received, and link-layer error counters.
get_result_detail👁 readShow every decoded field of one result, with its comments, order and patient context, raw records and message header.
get_results👁 readReturn received results, filtered by sample ID, patient ID, test code, time received or abnormal flag (newest last).
list_received_messages👁 readList the most recent ASTM messages received (newest last).
reconnect🛑 safetyClose and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).

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:

OptionDefaultMeaning
redact_patient_infotrueMasks P-record fields 6 (patient name), 7 (mother's maiden name), 8 (birth date), 11 (address) and 13 (telephone) as REDACTED before anything is stored, logged, written to store_path or returned by a tool
allow_from(any)In listen mode, only accept connections from these IP addresses (;- or space-separated)
max_messages5000Messages kept in memory; oldest are dropped first

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 flagged complete: 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_value is 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_at is 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

ModelFirmwareInterfaceVerified byDate
none yet: be the first

来源:servers/health/astm-lis-analyzer/README.md,提交 46545ea

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.1.3最新Sep 27, 2026
  2. v0.1.1Sep 26, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分