Mass Spectrometry Data — Claude Code MCP server for LC-MS files
Lets an agent browse LC-MS runs, plot chromatograms, pull spectra, locate MS2 scans by precursor m/z and run a quick QC.
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio ms-data -- uvx labmcp-ms-dataWhat Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion) does
The server works on a folder of LC-MS runs. It lists the files, reports instrument and acquisition settings, draws TIC and BPC traces, pulls ion chromatograms with apex and area, and locates MS2 scans near a given precursor m/z. mzML, mzML.gz and mzMLb go through pyteomics; Bruker timsTOF (.d, TDF) is read straight from its SQLite schema with timsrust. No hardware is controlled here — it is a data server.
Vendor files from Thermo, Waters, Agilent, SCIEX, Shimadzu and Bruker BAF need conversion to mzML, and the converter is yours to install. Nothing vendor-specific ships with the package. Pick ThermoRawFileParser for Thermo on any OS, ProteoWizard msconvert on Windows, or msconvert inside Docker on Linux and macOS. The Docker route means accepting the vendor licences, and on Apple Silicon the container runs under x86-64 emulation, so expect it to drag.
Point the server at your data with --address; without it the current directory is used. Launching from the filesystem root, which several MCP clients do by default, fails unless --address is given. Access stays inside that folder: .. segments, absolute paths elsewhere and symlinks leading out are rejected. Adding --read-only hides convert_to_mzml, the one tool that writes a data file; CSV exports to a save_path inside the folder still work. A save_path has to end in .csv, and an existing file is kept unless the call sets overwrite=true.
What it helps with
- see which LC-MS runs sit in a folder
- read instrument and acquisition settings from a run
- plot a TIC or BPC trace
- locate MS2 scans for a chosen precursor m/z
- get apex and area for an extracted ion chromatogram
Example prompts for the agent
- List the runs in my data folder and show the instrument settings
- Plot the BPC for the latest run and tell me which ion dominates
- Find MS2 scans with precursor m/z 195.08 inside a retention window
How to install Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion)
Platform CLI
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio ms-data -- uvx labmcp-ms-dataReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ms-data <command>
Platform CLI
codex mcp add ms-data --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> -- uvx labmcp-ms-dataReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ms-data <command>
Config file
{
"mcpServers": {
"ms-data": {
"command": "uvx",
"args": [
"labmcp-ms-data"
],
"env": {
"LABMCP_ADDRESS": "<LABMCP_ADDRESS>",
"LABMCP_SIMULATE": "<LABMCP_SIMULATE>",
"LABMCP_READ_ONLY": "<LABMCP_READ_ONLY>",
"LABMCP_LIMITS": "<LABMCP_LIMITS>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ms-data <command>
Config file
{
"servers": {
"ms-data": {
"type": "stdio",
"command": "uvx",
"args": [
"labmcp-ms-data"
],
"env": {
"LABMCP_ADDRESS": "<LABMCP_ADDRESS>",
"LABMCP_SIMULATE": "<LABMCP_SIMULATE>",
"LABMCP_READ_ONLY": "<LABMCP_READ_ONLY>",
"LABMCP_LIMITS": "<LABMCP_LIMITS>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ms-data <command>
Platform CLI
gemini mcp add -e LABMCP_ADDRESS=<LABMCP_ADDRESS> -e LABMCP_SIMULATE=<LABMCP_SIMULATE> -e LABMCP_READ_ONLY=<LABMCP_READ_ONLY> -e LABMCP_LIMITS=<LABMCP_LIMITS> ms-data uvx labmcp-ms-dataReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ms-data <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion)
How do I install Mass Spectrometry Data in Claude Code?
Run claude mcp add labmcp-ms-data -- uvx labmcp-ms-data. For environment variables use the longer form: `claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio ms-data -- uvx labmcp-ms-data`.
What does this MCP server do?
It gives an agent read access to LC-MS data: run listings, TIC and BPC, extracted ion chromatograms with apex and area, spectra, and MS2 lookup by precursor m/z. It also converts vendor files to mzML.
Do I need vendor libraries?
No. The package neither bundles nor downloads them. You supply the converter — ThermoRawFileParser, msconvert, or msconvert in Docker — otherwise convert_to_mzml returns setup instructions instead of converting.