# Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion)

Lets an agent browse LC-MS runs, plot chromatograms, pull spectra, locate MS2 scans by precursor m/z and run a quick QC.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 23
- Author: K-Dense-AI
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/K-Dense-AI/lab-instrument-mcps/tree/HEAD/servers/chemistry/ms-data
- Updated: 2026-09-26
- HTML: https://affpapa.org/en/nevibecode/mcp/mass-spectrometry-data-mzml-bruker-tdf-vendor-conversion

## What it 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`.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `LABMCP_ADDRESS`, `LABMCP_SIMULATE`, `LABMCP_READ_ONLY`, `LABMCP_LIMITS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
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>

### Codex

**Platform CLI**
```bash
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-data
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
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-data
```
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>

## When to use it
- 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
- 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

## Similar
- [pyopenms](https://affpapa.org/en/nevibecode/skills/pyopenms.md) — skill · 1900 installs
- [tooluniverse-proteomics-analysis](https://affpapa.org/en/nevibecode/skills/tooluniverse-proteomics-analysis.md) — skill · 408 installs
- [tooluniverse-metabolomics](https://affpapa.org/en/nevibecode/skills/tooluniverse-metabolomics.md) — skill · 355 installs
- [matchms](https://affpapa.org/en/nevibecode/skills/matchms.md) — skill · 1900 installs
- [pride-skill](https://affpapa.org/en/nevibecode/skills/pride-skill.md) — skill · 13 installs
- [sciagent-skills](https://affpapa.org/en/nevibecode/plugins/sciagent-skills.md) — plugin · ★ 383

From the same set: [k-dense-ai/lab-instrument-mcps](https://affpapa.org/en/nevibecode/by/k-dense-ai/lab-instrument-mcps.md) — 15 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
