
Thermo Orbitrap (Instrument API)
io.github.K-Dense-AI由 GitHub 账号 K-Dense-AI 发布v0.1.1更新于 Oct 27, 2026
MCP server adapter for Thermo Fisher Orbitrap mass spectrometers via the licensed Instrument API.
概览
该适配器让 AI 助手在 Windows 仪器电脑上通过 Thermo 授权的 Instrument API 监控并操控 Thermo Fisher Orbitrap 质谱仪。
- 可以做什么
- 查看连接信息、仪器模式、真空度、许可证与安全限值
- 读取最近的扫描(MS 级数、母离子 m/z、进样时间、最强质心),并等待下一次扫描
- 列出仪器支持的扫描参数
- 提交经校验的自定义扫描,设置或取消重复扫描
- 启动、暂停、恢复、停止采集到 raw 文件,断电后可重连
- 查看原始命令日志,并可将扫描质心导出为新的 CSV 文件
- 适用场景
- 适用于在 Windows 仪器电脑上运行受支持 Orbitrap(Tribrid、Exploris 240/480、Q Exactive)且已获得 Thermo 签署 IAPI 许可证的实验室,希望助手实时查看扫描或提交扫描、执行采集。内置模拟器可在无硬件时试用。
- 运行要求
- 需在 Windows 仪器电脑上安装 Python 3.10+ 及 windows 附加包(pythonnet),安装 Tune,取得并应用 Thermo 签署的 IAPI 许可证,并将 IAPI 程序集放入指定目录。通过仪器型号、assembly_dir 等选项配置,可选环境变量 LABMCP_ADDRESS、LABMCP_LIMITS、LABMCP_READ_ONLY、LABMCP_SIMULATE。
安装
在 SourceWeft 中
- 打开 控制台中的 Thermo Orbitrap (Instrument API),将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Thermo Orbitrap (Instrument API): MCP Server
Let an AI agent watch and steer a Thermo Fisher Orbitrap mass spectrometer in real time: check the instrument mode and vacuum, read the scans streaming off the instrument (filtered by MS order, with the most intense centroids), place validated custom scans and pick up their results, set a repeating scan, and start, pause or stop acquisitions to a raw file. It does this through Thermo's own Instrument API (IAPI).
[!IMPORTANT] This is an adapter. It contains no Thermo software. The IAPI is a Windows .NET API. To use it you need a signed IAPI software licence agreement with Thermo Fisher Scientific, with the licence applied to your instrument (legal requirements, licence FAQ, how to obtain a licence). This package never bundles or downloads the IAPI assemblies: you point it at the ones you obtained. It has never been tested on real hardware. Everything below was developed against the official IAPI interface definitions and examples and a simulator.
Try it without hardware
The simulator is an Orbitrap Exploris 480 by default (--option sim_model=eclipse or qexactive-hf for the others). It runs a synthetic tryptic digest: MS1 survey scans in On mode, a data-dependent top-10 method during an acquisition, custom and repeating scans that come back with their access id, realistic transient and injection times, and a status log with vacuum readings every ~5 s.
Connect your instrument
On the Windows instrument PC, with Tune installed and your IAPI licence applied:
- Get the IAPI assemblies that come with your licence (for a Tribrid:
API-2.0.dll,Spectrum-1.0.dll,Thermo.TNG.Factory.dllandFusion.API-2.0.dllfor Tune 4.3 orFusion.API-1.0.dllfor Tune 4.2 and earlier). Put them in a folder, e.g.C:\IAPI. - Install Python 3.10+ and the server with pythonnet:
- Test the connection (the instrument family picks the connection recipe from the IAPI examples):
The server gives a specific message if it is not running on Windows, pythonnet is missing, the folder or an assembly is missing, the IAPI service does not connect (Tune not running), or IAPI refuses a command for lack of a licence.
Other options: readbacks=Name1;Name2 (instrument values to show in get_instrument_status; the tool lists the names your instrument exposes), exclusive_scans=true (exclusive rather than cooperative IScans access), runtime=coreclr, connect_timeout_s, buffer_size (scans kept in memory, default 500).
Add to your MCP client
Add --read-only to let the agent watch scans and status but not place scans or start acquisitions. The stop and cancel tools stay available. To reach the server from another computer, run it with --transport http --host 0.0.0.0 --port 8000 on the instrument PC and protect that port.
Tools
get_connection_info, get_command_log and reconnect are built into every LabMCP server. Every IAPI control call (with the exact scan values sent) is recorded in the command log.
Safety limits
Override at launch: --limit max_custom_scans_per_minute=600.
On top of these limits, every custom and repeating scan value is checked against the instrument's own IScans.PossibleParameters before anything is sent: the parameter name must exist, numbers must lie inside the instrument's range (for example the m/z range for FirstMass/LastMass), and choice parameters such as OrbitrapResolution must be one of the allowed values. IAPI itself silently ignores illegal values, which is why the server checks first, and why accepted values are sent in the instrument's own spelling (hcd goes out as HCD, 2.0 for an integer parameter as 2).
stop_acquisition attempts every step (cancel the acquisition, the custom scans, the repeating scan, Standby) even if one fails, and reports what failed.
Example prompts
- "Is the Orbitrap in On mode and what are the vacuum readings? How many scans came in during the last minute?"
- "Show me the last 5 MS2 scans with their precursor m/z, injection times and top 10 fragments."
- "Place a 120k SIM scan on m/z 524.26 with a 10 m/z window and tell me the most intense peaks you see."
- "Start a 30-minute acquisition to D:\Data\HeLa_test.raw with sample name HeLa 200 ng, then check every few minutes that MS2 scans are still arriving."
Notes
- Instrument mode: scans only arrive in On mode, and custom scans and acquisitions need it too.
stop_acquisition(standby=true)switches to Standby. This server has no tool to switch back to On (do that in Tune). - Custom scans: values you leave out come from the instrument's defaults, as Thermo documents for
IScanDefinition.Values.running_numbercomes back as the scan'saccess_id(trailer itemAccess Id:). The server numbers scans automatically if you don't. A custom scan usually finishes before the agent's next tool call, sowait_for_scan(access_id=...)also returns a result that arrived after the scan was placed but before the wait started. IAPI leaves the result undefined when several custom scans are placed before the instrument has processed the earlier ones; the rate limit keeps this under control. - Parameter names differ by model and Tune version (e.g.
Analyzeron Tribrids). Useget_possible_scan_parametersand pass anything that has no named argument throughextra_parameters. - Scan headers:
scan_number,ms_order,scan_modeandprecursor_mzcome from header keys used in Thermo's examples (Scan,MSOrder,ScanMode,PrecursorMass[0]).master_scan_number,agc_targetandinjection_time_msare read from the trailer names Thermo raw files use (Master Scan Number:,AGC Target:,Ion Injection Time (ms):). The IAPI repository doesn't document these, so they may benullon your instrument. Useinclude_header_trailer=trueto see exactly what it sends. - Readbacks: IAPI has no fixed list of readback names (vacuum gauges, voltages).
get_instrument_statusshows the names fromIInstrumentValues.ValueNamesand the latest scanStatusLog, where the vacuum readings usually appear. - Licence check: on Exploris instruments the server reports whether an API licence is present (
IExplorisInstrumentAccess.Licenses). Tribrid and Exactive instruments enforce the licence in the instrument service, and a refused command reports it. - Verified API surface: every IAPI member the pythonnet backend touches is listed with its source file in
iapi_members.py(checked against thermofisherlsms/iapi@c246dcc). A test fails if the backend uses a name that isn't in that list. - Scan data: each scan's .NET object is copied and disposed at once, as Thermo's examples require (otherwise the instrument's shared memory stays blocked). Up to 5 000 centroids per scan are kept.
max_centroidslimits what a tool returns, andget_recent_scans(save_path=...)writes all kept centroids to a new CSV file (the path must end in.csvand must not exist yet: existing files are never overwritten).
Hardware verification
来源:servers/chemistry/thermo-iapi/README.md,提交 46545ea
工具
0版本历史
1- v0.1.1最新Sep 27, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分