Python library and MCP server for controlling Novation Circuit Tracks via MIDI
Project description
circuit-tracks-tools
A Python library and MCP server for controlling a Novation Circuit Tracks synthesizer via MIDI. Control your Circuit Tracks from Python scripts or let an AI agent create music through natural language — just like pair-programming, but for music.
Features
- Song format — create full songs (patterns, patches, macros, FX) in a single call and export to the device
- Synth & drum programming — select patches, play notes/chords, tweak parameters via CC/NRPN
- Patch builder — construct synth patches from scratch with oscillators, filters, envelopes, mod matrix, and macros
- Pattern sequencing — create and edit step-sequencer patterns across synth, drum, and MIDI tracks with p-lock automation
- Patch editing — read, modify, and save synth patches; load
.syxpatch files - Project management — read and write
.ncsproject files; transfer projects to and from the device over SysEx - Parameter morphing — smoothly interpolate synth, drum, and project parameters over time
- Macro control — configure and sweep macro knobs for expressive parameter control
- Sidechain automation — automate volume ducking across all 4 tracks with preset sidechain curves
- Scale quantization — quantize notes to any of the Circuit Tracks' built-in scales
- Live transport — start/stop sequencer, set BPM, mute tracks, queue patterns
Requirements
- Python 3.11+
- A Novation Circuit Tracks connected via USB
- Tested with firmware 1.2.1 (latest as of April 2026) — other versions may work but are untested
Installation
As a Python library
pip install circuit-tracks-tools
With MCP server (for AI agents)
pip install circuit-tracks-tools[mcp]
Quick Start: Python Library
from circuit_tracks import MidiConnection, PatchBuilder
# Connect to the Circuit Tracks
midi = MidiConnection()
midi.connect("Circuit Tracks MIDI")
# Play a C major chord on Synth 1
midi.note_on(channel=0, note=60, velocity=100)
midi.note_on(channel=0, note=64, velocity=100)
midi.note_on(channel=0, note=67, velocity=100)
# Build a pad patch from scratch
patch = PatchBuilder.preset_pad(cutoff=80, attack=40, release=90)
See the API Reference for full library documentation.
Quick Start: MCP Server
The MCP server runs as a subprocess launched by your AI agent. The easiest setup uses uvx (requires uv):
Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"circuit-tracks": {
"command": "uvx",
"args": ["--from", "circuit-tracks-tools[mcp]", "circuit-tracks-mcp"]
}
}
}
Then talk to Claude:
"Let's create a dark techno loop"
The agent will program patterns on your Circuit Tracks as if a human were doing it — selecting sounds, writing sequences, adjusting parameters — and iterate with you on the result.
Claude Desktop (macOS)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"circuit-tracks": {
"command": "uvx",
"args": ["--from", "circuit-tracks-tools[mcp]", "circuit-tracks-mcp"]
}
}
}
Claude Desktop (Windows)
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"circuit-tracks": {
"command": "uvx",
"args": ["--from", "circuit-tracks-tools[mcp]", "circuit-tracks-mcp"]
}
}
}
Without uvx
If you prefer a manual setup, install into a virtual environment and use the full path:
{
"mcpServers": {
"circuit-tracks": {
"command": "/path/to/venv/bin/circuit-tracks-mcp"
}
}
}
Windows Setup
The library and MCP server work on Windows. Install Python 3.11+ from python.org and then:
pip install circuit-tracks-tools[mcp]
The Circuit Tracks appears as a USB MIDI device automatically — no additional driver installation is needed. You can verify it shows up in Device Manager under "Sound, video and game controllers".
Build from Source
git clone https://github.com/namirsab/circuit-tracks-tools.git
cd circuit-tracks-tools
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -e ".[mcp,dev]"
# Set up pre-commit hooks
pre-commit install
# Run tests (no hardware required — MIDI is mocked)
pytest
# Build a distributable wheel
pip install build
python -m build
Project Structure
src/circuit_tracks/ # Standalone library for Circuit Tracks control
midi.py # MIDI connection handling
sequencer.py # Pattern/step sequencer engine
patch.py # Synth patch read/write
patch_builder.py # Patch construction helpers
constants.py # CC numbers, NRPN mappings, channel assignments
macros.py # Macro knob configuration
ncs_parser.py # .ncs project file parser
ncs_transfer.py # SysEx project/patch transfer
song.py # Song format and device export
song_schema.py # Pydantic models and JSON Schema for song format
morph.py # Parameter morphing engine
src/circuit_mcp/ # MCP server (thin wrapper over the library)
server.py # All MCP tool definitions
docs/
ncs-format.md # Reverse-engineered .ncs file format spec
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file circuit_tracks_tools-0.1.1.tar.gz.
File metadata
- Download URL: circuit_tracks_tools-0.1.1.tar.gz
- Upload date:
- Size: 208.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
617ea211b9d10b2697c2dde38b8f3b5f81d6c857668df3cf66fe27b0066b68d2
|
|
| MD5 |
d4c0e8bdf2e74295fd4409fdd0e126bf
|
|
| BLAKE2b-256 |
c75f1f372c19d3b03f66ffee3d15ed90fb4e84377febadf1b972813a4fb9d987
|
Provenance
The following attestation bundles were made for circuit_tracks_tools-0.1.1.tar.gz:
Publisher:
publish.yml on namirsab/circuit-tracks-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
circuit_tracks_tools-0.1.1.tar.gz -
Subject digest:
617ea211b9d10b2697c2dde38b8f3b5f81d6c857668df3cf66fe27b0066b68d2 - Sigstore transparency entry: 1318081932
- Sigstore integration time:
-
Permalink:
namirsab/circuit-tracks-tools@79949d6c3905e67344c252a612e972aed5eb60dd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/namirsab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79949d6c3905e67344c252a612e972aed5eb60dd -
Trigger Event:
push
-
Statement type:
File details
Details for the file circuit_tracks_tools-0.1.1-py3-none-any.whl.
File metadata
- Download URL: circuit_tracks_tools-0.1.1-py3-none-any.whl
- Upload date:
- Size: 91.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bb304922a471d653e3dea09b771cf2da0cc900bb2ab06ae0f4e2a47fd4ed125
|
|
| MD5 |
699437ff6364844b1866b063f5ba1d13
|
|
| BLAKE2b-256 |
3a3a2ef0f0ca07b31b02dbc738eafd4fc59af89bb607ac042c3174ac6db355a7
|
Provenance
The following attestation bundles were made for circuit_tracks_tools-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on namirsab/circuit-tracks-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
circuit_tracks_tools-0.1.1-py3-none-any.whl -
Subject digest:
8bb304922a471d653e3dea09b771cf2da0cc900bb2ab06ae0f4e2a47fd4ed125 - Sigstore transparency entry: 1318082030
- Sigstore integration time:
-
Permalink:
namirsab/circuit-tracks-tools@79949d6c3905e67344c252a612e972aed5eb60dd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/namirsab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79949d6c3905e67344c252a612e972aed5eb60dd -
Trigger Event:
push
-
Statement type: