Skip to main content
Glama

traktor-mcp

MCP tools for a Traktor collection, over the traktor-nml library.

Traktor has no API: its collection is one XML file, collection.nml. This server exposes the traktor-nml reconciliation over stdio.

tool

writes

what it does

status

no

the collection and the lanes, in one paragraph

plan

no

what a run would change, entry by entry

purge

with apply: true

take out the entries whose file is gone

apply

yes

repoint the entries a run replaced, and add the files no entry has

Install

uv tool install git+https://github.com/alchimestre/traktor-mcp

Related MCP server: Spotify Playlist MCP

Run

traktor-mcp --config ~/traktor.toml

Mounted in an MCP client:

"traktor": {
  "type": "stdio",
  "command": "traktor-mcp",
  "args": ["--config", "/home/you/traktor.toml"]
}

Configuration

config.toml, from --config <path> if given, else from beside the traktor-nml checkout, else the values below.

[paths]
collection = "~/Documents/Native Instruments/Traktor */collection.nml"
lossless   = "~/Music/music-agent/lossless"
lossy      = "~/Music/music-agent/lossy"
state      = "~/Music/music-agent/state"    # optional: a pipeline's job state, read as data

collection is a pattern: a Traktor upgrade changes the directory it lives in. lossless and lossy are the directories the collection is meant to hold; a file in either is a candidate, a file elsewhere is the app's own business and is reported rather than moved. Relative paths resolve against the config file's own directory. No secrets in it.

Before it writes

  1. Close Traktor. It rewrites the collection on exit, over anything written while it was up; apply refuses while it is running.

  2. Run plan first. It writes nothing and takes no time.

  3. apply copies the collection to collection.nml.<stamp>.backup beside it, then repoints and adds in one edit. Every entry nobody is repointing stays byte for byte as Traktor wrote it.

  4. apply removes nothing. purge is the only verb that removes, and only when it is called with apply: true.

  5. Run Check Consistency → Analyze in Traktor after a write. A repointed entry gives up the fingerprint, tempo, loudness, key and grid measured from the audio that is gone, and the app has to measure them again.

Development

uv sync
uv pip install -e ../traktor-nml    # to edit the library at the same time
uv run pytest

MIT licensed.

Available Tools

4 tools
applyA

Write the plan into the collection: one backup beside it, then one edit that leaves every entry nobody is repointing byte for byte as Traktor wrote it. Refuses while Traktor is running. Returns what was written and what to do in the app afterwards.

Inputs: no named parameters. Returns: result

planA

What a run would change, writing nothing: every entry to repoint onto the file that replaced it, every lane file to add, and every entry whose file is gone — either a duplicate the collection holds elsewhere, or a file that is not there and was not replaced.

Inputs: no named parameters. Returns: result

purgeA

Take out every entry in the collection whose file is gone — residue, since a collection is an index of files that exist. A playlist reference to a removed entry is moved to the entry that keeps the track, or dropped when nothing does; history, cues and play counts go with the entry and are reported. Dry run unless apply is true. Refuses while Traktor is running, and takes one backup beside the collection before it writes.

Inputs: apply. Returns: result

statusA

Where the Traktor collection and the two lanes stand: how many entries, how many files are in the lanes, and how many of each thing a run would do. Reads the whole collection and both lanes, writes nothing.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation3/5

    status and plan are distinct read-only views, but purge and apply both mutate the collection with backups and Traktor-running guards, and plan already reports removals that purge handles. The boundaries are understandable from descriptions but not fully crisp.

    Naming Consistency3/5

    All names are single lowercase words, but the set mixes noun-like status/plan with verb-like purge/apply, so there is no predictable action pattern. It is readable but not systematic.

    Tool Count5/5

    Four tools map cleanly to inspect, preview, clean, and commit operations for a narrow collection-maintenance utility. No tool feels extraneous for the stated scope.

    Completeness4/5

    The surface covers the main lifecycle: status, plan, purge, and apply with backups. Minor gaps include no explicit post-apply verification or backup/restore management, but core workflows are covered.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Search and read locally-recorded meeting transcripts over stdio. Read-only, no network. Exposes list_sessions, get_session, and search_transcripts to any MCP client.
      76 PyPI
      7
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A local stdio MCP adapter for the Daykeeper management API. It uses separately issued scoped credentials and exposes read-only tools by default; planning and mutations require explicit opt-in.
      8
      24 npm
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Connects MCP clients to a self-hosted photo library through its REST API, exposing assets, albums, people, search, and optional administrative toolsets with read-only defaults and confirm-gated writes. It supports stdio and localhost Streamable HTTP transports.
      5
      MIT