traktor-mcp
Inspect and reconcile your Traktor collection from an MCP client.
Uses traktor-nml to update collection.nml when audio files are replaced or added, without editing XML by hand.
| Requirement or limit | Detail |
|---|---|
| Runtime | Python 3.13+, uv, Git |
| Client | Local MCP server support over stdio |
| Files | Access to the Traktor collection and music directories on the same machine |
| Scope | Collection maintenance, not playback or live deck control |
| Status | Early version: 0.1.0 |
| Licence | MIT |
Setup
-
Install from GitHub:
uv tool install git+https://github.com/alchimestre/traktor-mcp
-
Check that the executable is on your PATH:
traktor-mcp --helpIf the command is not found, add the directory printed by
uv tool dir --binto your PATH. -
Create
traktor.toml. The default collection is inDocuments/Native Instruments/Traktor <version>/collection.nml; replace the paths below with your actual locations:[paths] collection = "/path/to/Traktor/collection.nml" lossless = "/path/to/music/lossless" lossy = "/path/to/music/lossy"
losslessandlossyare the music directories to import from. Relative paths resolve against the configuration file's directory. Addstateonly if a local pipeline tracks file replacements there: its<run>/tracks.jsonlrecords withreplacesandlocal_pathidentify replacement files. Without that data, replacement matching uses filenames. Check the reported collection path before approving a write. -
Add the server to your MCP client's configuration. For clients using
mcpServers, merge this entry into the existing object:{ "mcpServers": { "traktor": { "command": "traktor-mcp", "args": ["--config", "/path/to/traktor.toml"] } } }
Replace the config path with an absolute path. If the client cannot find
traktor-mcp, use the executable's absolute path from step 2. Other clients may use a different configuration wrapper; the command and arguments stay the same. -
Restart or reload the client, then ask: “Call Traktor's
statusandplan. Show the proposed changes without writing anything.”planreports entries to repoint, files to add, and missing files. Check the reported collection path before approving a write.
Tools
| Tool | Writes to collection | Effect |
|---|---|---|
status |
No | Summarise the collection and configured music directories |
plan |
No | List proposed replacements, additions and missing files |
apply |
Yes | Repoint replaced files and add new files; remove no entries |
purge |
Only with apply: true |
Remove entries whose files are missing; preview by default |
Files in lossless and lossy are candidates for import. Files elsewhere are reported rather than moved.
For shell use without an MCP client, use traktor-nml directly.
Before writing
- Close Traktor. It rewrites the collection on exit and can overwrite external changes. Both write operations refuse while Traktor is running.
- Call
planand inspect its output.applywrites immediately when called; it has no separate confirmation argument. - Call
applyonly after reviewing replacements and additions. It backs up the collection beside the original before writing; untouched entries retain their original XML. - Preview
purgeseparately before calling it withapply: true. Removed entries lose their history, cues and play counts. Playlist references are reassigned to a retained entry or dropped. A backup is taken before writing. - Open Traktor and run Check Consistency → Analyze for replaced tracks. Their old fingerprint, tempo, loudness, key and beatgrid measurements must be regenerated.
Development
-
Install the project and development dependencies:
uv sync -
Run the tests:
uv run pytest
To work on the library alongside the server, override it with a sibling checkout:
uv pip install -e ../traktor-nml
Publishing
-
Configure a PyPI Trusted Publisher for this GitHub repository, workflow
publish.yml, environmentpypi. -
Dispatch the workflow from
mainwith the release tag or commit SHA asref:gh workflow run publish.yml --repo alchimestre/traktor-mcp --ref main -f ref=v0.1.0
-
Check the workflow result before announcing the release. Published PyPI versions cannot be overwritten.
Metadata
Release files for traktor-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| traktor_mcp-0.1.0.tar.gz | 45.9 kB | Without provenance | Details for traktor_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| traktor_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for traktor_mcp-0.1.0-py3-none-any.whl |
Total release size: 52.6 kB
Release files / traktor_mcp-0.1.0.tar.gz
| Download URL | traktor_mcp-0.1.0.tar.gz |
|---|---|
| Size | 45.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
566279717cd05c491b29167a67428c21aa88db4d497568740d7bde5f10473361
|
|
BLAKE2b-256 checksum How to use checksums |
2d1da131a3a1c6a2be24f3a44f623d87c822dfc4d824805507ff4e5ccf9077b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / traktor_mcp-0.1.0-py3-none-any.whl
| Download URL | traktor_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8517059a17f891a2412ef86863029f4c1071a9a9a0382e9989d933381e94c627
|
|
BLAKE2b-256 checksum How to use checksums |
19316ad53d20c3566a5f5dbcc144f5e5e0a11286bfbb55a77633a4908f42bfa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for traktor-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.