
Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion)
io.github.K-Dense-AIPublished by GitHub account K-Dense-AIv0.1.1Updated Oct 27, 2026
MCP server for LC-MS data in mzML/mzMLb and Bruker timsTOF files; vendor formats via msconvert.
Overview
Local MCP server that lets an assistant list, read and analyse LC-MS data files (mzML, mzMLb, Bruker timsTOF) and convert vendor formats to mzML.
- What you can do
- List runs in a data folder and detect each file's vendor and format, flagging which need conversion
- Describe a run: instrument, acquisition date, spectra per MS level, RT and m/z ranges, polarity, ion mobility
- Plot chromatograms: TIC, BPC and extracted ion chromatograms with apex RT, area and FWHM
- Read spectra by index, scan number, native ID or retention time, and find MS2 scans by precursor m/z
- Run a quick QC summary with plain-language warnings, and export chromatogram or peak lists to CSV
- Convert vendor files to mzML with a converter the user installed
- When to use it
- Useful when you have LC-MS runs on disk and want an assistant to inspect acquisition metadata, compare extracted ion chromatograms, locate MS2 spectra for a precursor, or triage runs for QC problems without opening vendor software.
- Requirements
- Runs locally via uvx from the labmcp-ms-data PyPI package; needs a data folder passed with --address (it refuses to start in the filesystem root without one). Optional extras for Bruker timsTOF spectra/XICs and mzMLb. Vendor conversion requires a separately installed converter (ThermoRawFileParser, ProteoWizard msconvert, or Docker with the pwiz image). No authentication declared.
Installation
In SourceWeft
- Open Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion) in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion) — MCP Server
Let an AI agent find, read and analyse LC-MS data files from any vendor through open interfaces: list the runs in a folder, report the instrument and acquisition details, plot TIC/BPC chromatograms, extract ion chromatograms with apex and area, read spectra, find MS2 scans by precursor m/z, and run a quick QC. Vendor files are converted to mzML with a converter you have installed. This is a data server: it controls no hardware.
Try it without data
--simulate serves one synthetic 12-minute DDA LC-MS/MS run (simulated_lcms_run.mzML): eight known analytes (caffeine, sulfamethoxazole, leucine enkephalin, angiotensin II 2+, verapamil, glu-fibrinopeptide B 2+, reserpine, terfenadine) eluting as Gaussian LC peaks with isotope envelopes, a polysiloxane background ion, chemical noise, a top-5 DDA method with dynamic exclusion and fragment spectra, AGC-like injection times, and one electrospray dropout at ~10.6 min for the QC tool to find.
Point it at your data
-
Install (pick the extras you need):
-
Choose the data folder with
--address(default: the current directory; the server refuses to start in the filesystem root, where many MCP clients launch servers, without an--address). Subfolders are searched. The agent can only read and write inside this folder: paths with.., absolute paths elsewhere and symlinks pointing outside are refused. -
Vendor files (optional): install a converter yourself; this package never bundles or downloads vendor libraries.
- Thermo .raw, any OS: ThermoRawFileParser (
--option converter=thermorawfileparser, plus--option converter_path=/opt/trfp/ThermoRawFileParser.dllif it isn't on PATH;.dllis started withdotnet,.exewithmonoon Linux/macOS). Withconverter=auto, aconverter_pathis recognised from its file name. - All vendors, Windows: ProteoWizard msconvert (
--option converter=msconvert). - All vendors, Linux/macOS: Docker and
docker pull proteowizard/pwiz-skyline-i-agree-to-the-vendor-licenses(--option converter=docker). Pulling the image means you accept the vendor licences. Only the input's folder (read-only) and the output folder are mounted into the container. On Apple Silicon it runs under x86-64 emulation (slow). On Linux the output files are owned by root. converter=auto(default) tries ThermoRawFileParser for Thermo files, then msconvert, then Docker.
The commands used are:
ThermoRawFileParser -i=<file> -o=<dir> -f=2 [-p] [-g]andmsconvert <file> -o <dir> --mzML --zlib [--gzip] [--filter "peakPicking vendor msLevel=1-"](inside Docker viawine msconvert). They are run without a shell, with a timeout; on timeout the converter's whole process tree (and the Docker container) is killed and the incomplete output is deleted. - Thermo .raw, any OS: ThermoRawFileParser (
Add to your MCP client
Claude Code
Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)
Add --read-only to hide convert_to_mzml (the only tool that writes a data file; save_path CSV exports inside the data folder remain available). A save_path must end in .csv (a name without an extension gets one), and an existing file is never replaced unless the call passes overwrite=true. For other clients, generate the snippet with uvx labmcp config ms-data --address /path/to/data --client vscode (also cursor, codex, claude-code).
Tools
get_connection_info, get_command_log and reconnect are built into every LabMCP server (reconnect here closes the cached runs). There are no HAZARD tools, because nothing physical is controlled, so no SAFETY stop tool is needed.
Safety limits
Override at launch: --limit max_conversion_time_s=7200.
Example prompts
- "Which runs are in this folder, and which ones need converting?"
- "Give me the instrument, acquisition date and scan counts for QC_2024_03_01.mzML."
- "Extract XICs for caffeine (195.0877) and verapamil (455.2904) at 5 ppm and report apex RT and area."
- "Find every MS2 scan of m/z 523.7745 between 5 and 7 min and show me the fragments of the most intense one."
- "Run a QC on the last three runs: any spray dropouts, and how many MS2 per cycle?"
- "Convert sample_07.raw to mzML, then plot its base peak chromatogram."
Notes
- Format support: mzML (indexed or not, optionally
.gz) through pyteomics (Apache-2.0), using the PSI-MS vocabulary bundled with psims (no download). mzMLb needs the[mzmlb]extra (h5py, hdf5plugin). Gzipped mzML is decompressed to a temporary file for random access. - Bruker timsTOF (TDF): run metadata (instrument, serial, date, m/z and 1/K0 ranges), the TIC (
Frames.SummedIntensities), BPC intensity (Frames.MaxIntensity, the most intense single peak in any mobility scan; its m/z is not stored) and the DDA precursor list are read straight from theanalysis.tdfSQLite tables (GlobalMetadata,Frames,Precursors,PasefFrameMsMsInfo), so they work without extras. Spectra and XICs need the[bruker]extra (timsrust-pyo3, Apache-2.0, wheels for Linux/macOS/Windows). MS1 and diaPASEF frames are summed over ion mobility (diaPASEF MS2 frames mix all isolation windows); each ddaPASEF precursor is one MS2 spectrum. Ion mobility is not resolved in the outputs. Bruker BAF.dfolders need conversion. - Vendor formats: Thermo, Waters, Agilent, SCIEX, Shimadzu and Bruker BAF files can only be decoded with the vendors' own libraries, whose licences don't allow redistribution. The server detects them and converts them with a tool you installed (see above). It never downloads vendor code.
- Numbers: retention times are in minutes (mzML scan start times in seconds are converted, going by the unit accession); XIC intensity is the sum of all peaks inside ± tolerance; areas are trapezoidal integrals over RT in minutes, with no baseline subtraction, between the points where the trace falls to 1 % of the apex or reaches a valley. The FWHM is measured within those bounds (it is
nullwhen a co-eluting peak keeps the trace above half height). Use them for relative comparisons. - Big files: the first access to a run makes one pass over all spectra to index it (TIC, precursors, RTs). Up to 4 runs stay cached (
--option cache_size=N). A run is reopened automatically when the file changes (modification time or size). XICs read every spectrum in the RT window, so narrow the window on long runs. - Profile data: chromatograms and XICs work as-is.
get_spectrumreports local maxima as "peaks". Convert with peak picking for proper centroids.
Hardware verification
Source: servers/chemistry/ms-data/README.md at commit 46545ea
Tools
0Version history
1- v0.1.1LatestSep 27, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts