ableton-ai 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. ableton_ai-1.0.0/.github/workflows/fix-code-style.yml +36 -0
  2. ableton_ai-1.0.0/.github/workflows/lint.yml +32 -0
  3. ableton_ai-1.0.0/.github/workflows/publish.yml +45 -0
  4. ableton_ai-1.0.0/.github/workflows/tests.yml +34 -0
  5. ableton_ai-1.0.0/.gitignore +19 -0
  6. ableton_ai-1.0.0/.pre-commit-config.yaml +28 -0
  7. ableton_ai-1.0.0/.python-version +1 -0
  8. ableton_ai-1.0.0/CHANGELOG.md +24 -0
  9. ableton_ai-1.0.0/CONTRIBUTING.md +43 -0
  10. ableton_ai-1.0.0/LICENSE +23 -0
  11. ableton_ai-1.0.0/PKG-INFO +178 -0
  12. ableton_ai-1.0.0/README.md +141 -0
  13. ableton_ai-1.0.0/examples/README.md +119 -0
  14. ableton_ai-1.0.0/examples/ollama_example.py +267 -0
  15. ableton_ai-1.0.0/pyproject.toml +148 -0
  16. ableton_ai-1.0.0/remote_script/__init__.py +7221 -0
  17. ableton_ai-1.0.0/rest_api/__init__.py +9 -0
  18. ableton_ai-1.0.0/rest_api/requirements-rest.txt +5 -0
  19. ableton_ai-1.0.0/rest_api/rest_api_server.py +2130 -0
  20. ableton_ai-1.0.0/skills/ableton/SKILL.md +189 -0
  21. ableton_ai-1.0.0/src/ableton_ai/__init__.py +39 -0
  22. ableton_ai-1.0.0/src/ableton_ai/config.py +95 -0
  23. ableton_ai-1.0.0/src/ableton_ai/connection.py +210 -0
  24. ableton_ai-1.0.0/src/ableton_ai/exceptions.py +66 -0
  25. ableton_ai-1.0.0/src/ableton_ai/install.py +103 -0
  26. ableton_ai-1.0.0/src/ableton_ai/server.py +60 -0
  27. ableton_ai-1.0.0/src/ableton_ai/tools/__init__.py +58 -0
  28. ableton_ai-1.0.0/src/ableton_ai/tools/_base.py +71 -0
  29. ableton_ai-1.0.0/src/ableton_ai/tools/arrangement.py +179 -0
  30. ableton_ai-1.0.0/src/ableton_ai/tools/automation.py +72 -0
  31. ableton_ai-1.0.0/src/ableton_ai/tools/browser.py +214 -0
  32. ableton_ai-1.0.0/src/ableton_ai/tools/clips.py +290 -0
  33. ableton_ai-1.0.0/src/ableton_ai/tools/devices.py +183 -0
  34. ableton_ai-1.0.0/src/ableton_ai/tools/music.py +40 -0
  35. ableton_ai-1.0.0/src/ableton_ai/tools/notes.py +138 -0
  36. ableton_ai-1.0.0/src/ableton_ai/tools/session.py +396 -0
  37. ableton_ai-1.0.0/src/ableton_ai/tools/tracks.py +477 -0
  38. ableton_ai-1.0.0/tests/__init__.py +0 -0
  39. ableton_ai-1.0.0/tests/conftest.py +343 -0
  40. ableton_ai-1.0.0/tests/fixtures/__init__.py +0 -0
  41. ableton_ai-1.0.0/tests/fixtures/mock_ableton.py +275 -0
  42. ableton_ai-1.0.0/tests/integration/__init__.py +0 -0
  43. ableton_ai-1.0.0/tests/integration/test_workflows.py +621 -0
  44. ableton_ai-1.0.0/tests/requirements-test.txt +6 -0
  45. ableton_ai-1.0.0/tests/unit/__init__.py +0 -0
  46. ableton_ai-1.0.0/tests/unit/test_connection.py +195 -0
  47. ableton_ai-1.0.0/tests/unit/test_error_handling.py +601 -0
  48. ableton_ai-1.0.0/tests/unit/test_install.py +70 -0
  49. ableton_ai-1.0.0/tests/unit/test_rest_api_complete.py +1795 -0
  50. ableton_ai-1.0.0/tests/unit/test_security.py +649 -0
  51. ableton_ai-1.0.0/tests/unit/test_tools.py +140 -0
  52. ableton_ai-1.0.0/tests/unit/test_validation.py +777 -0
  53. ableton_ai-1.0.0/uv.lock +1230 -0
@@ -0,0 +1,36 @@
1
+ # The equivalent of Spatie's fix-php-code-style-issues workflow.
2
+ # Instead of failing a PR over formatting, it fixes it and pushes the fix back.
3
+ name: fix code style
4
+
5
+ on:
6
+ push:
7
+ branches: [main]
8
+ paths:
9
+ - "**.py"
10
+ - "pyproject.toml"
11
+
12
+ permissions:
13
+ contents: write
14
+
15
+ jobs:
16
+ ruff:
17
+ runs-on: ubuntu-latest
18
+ name: ruff fix
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ with:
22
+ ref: ${{ github.head_ref }}
23
+
24
+ - uses: astral-sh/setup-uv@v5
25
+ with:
26
+ enable-cache: true
27
+
28
+ - name: Fix and format
29
+ run: |
30
+ uvx ruff check --fix src tests
31
+ uvx ruff format src tests
32
+
33
+ - name: Commit anything that changed
34
+ uses: stefanzweifel/git-auto-commit-action@v5
35
+ with:
36
+ commit_message: "Fix code style with ruff"
@@ -0,0 +1,32 @@
1
+ name: lint
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ ruff:
10
+ runs-on: ubuntu-latest
11
+ name: ruff
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: astral-sh/setup-uv@v5
15
+ with:
16
+ enable-cache: true
17
+ - run: uv sync --all-extras
18
+ - name: Check formatting
19
+ run: uv run ruff format --check src tests
20
+ - name: Lint
21
+ run: uv run ruff check src tests
22
+
23
+ mypy:
24
+ runs-on: ubuntu-latest
25
+ name: mypy
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: astral-sh/setup-uv@v5
29
+ with:
30
+ enable-cache: true
31
+ - run: uv sync --all-extras
32
+ - run: uv run mypy
@@ -0,0 +1,45 @@
1
+ # Publish to PyPI when a GitHub release is published.
2
+ #
3
+ # Uses PyPI Trusted Publishing (OIDC), so there is no token to store or rotate.
4
+ # One-time setup on PyPI: Project settings, Publishing, add a trusted publisher
5
+ # Owner: freekmurze
6
+ # Repo: ableton-ai
7
+ # Workflow: publish.yml
8
+ # Environment: (leave blank)
9
+ name: publish
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ jobs:
16
+ publish:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ id-token: write # required for Trusted Publishing; no password needed
20
+
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - uses: astral-sh/setup-uv@v5
25
+ with:
26
+ enable-cache: true
27
+
28
+ - name: Check the tag matches the package version
29
+ run: |
30
+ TAG="${GITHUB_REF_NAME#v}"
31
+ VERSION=$(uv version --short)
32
+ if [ "$TAG" != "$VERSION" ]; then
33
+ echo "Release tag ($TAG) does not match pyproject version ($VERSION)." >&2
34
+ echo "Bump the version in pyproject.toml and retag." >&2
35
+ exit 1
36
+ fi
37
+
38
+ - name: Build
39
+ run: uv build
40
+
41
+ - name: Run tests before publishing
42
+ run: uv run pytest -q -m "not integration"
43
+
44
+ - name: Publish to PyPI
45
+ run: uv publish --trusted-publishing always
@@ -0,0 +1,34 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest]
15
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
16
+
17
+ name: ${{ matrix.os }} / python ${{ matrix.python-version }}
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v5
24
+ with:
25
+ enable-cache: true
26
+
27
+ - name: Set up Python
28
+ run: uv python install ${{ matrix.python-version }}
29
+
30
+ - name: Install dependencies
31
+ run: uv sync --all-extras
32
+
33
+ - name: Run tests
34
+ run: uv run pytest --cov --cov-report=term-missing -m "not integration"
@@ -0,0 +1,19 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+ .DS_Store
12
+
13
+ # Coverage
14
+ .coverage
15
+ .coverage.*
16
+ htmlcov/
17
+
18
+ # bundled at build time via force-include; source-tree copy for local dev only
19
+ src/ableton_ai/_remote_script/
@@ -0,0 +1,28 @@
1
+ # Install once with: uv run pre-commit install
2
+ # Run against everything with: uv run pre-commit run --all-files
3
+ repos:
4
+ - repo: https://github.com/astral-sh/ruff-pre-commit
5
+ rev: v0.14.2
6
+ hooks:
7
+ # Autofix first, then format. Order matters: fixes can change formatting.
8
+ - id: ruff
9
+ args: [--fix, --exit-non-zero-on-fix]
10
+ - id: ruff-format
11
+
12
+ - repo: https://github.com/pre-commit/pre-commit-hooks
13
+ rev: v5.0.0
14
+ hooks:
15
+ - id: trailing-whitespace
16
+ - id: end-of-file-fixer
17
+ - id: check-yaml
18
+ - id: check-toml
19
+ - id: check-added-large-files
20
+ - id: check-merge-conflict
21
+ - id: debug-statements
22
+
23
+ - repo: https://github.com/pre-commit/mirrors-mypy
24
+ rev: v1.18.2
25
+ hooks:
26
+ - id: mypy
27
+ files: ^src/
28
+ additional_dependencies: [types-requests]
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ All notable changes to `ableton-ai` are documented here. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
5
+ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## 1.0.0
8
+
9
+ First release.
10
+
11
+ Control Ableton Live from an AI assistant over MCP. Around 130 tools covering
12
+ most of the Live Object Model: tracks, devices and their parameters, clips,
13
+ MIDI notes, automation, the browser, transport, and the mixer.
14
+
15
+ Highlights:
16
+
17
+ - Per-note probability and velocity deviation via `add_notes_with_probability`.
18
+ - Reach devices nested inside racks with `get_chain_device_parameters` and
19
+ `set_chain_device_parameter`.
20
+ - `set_song_scale`, plus a `get_scale_notes` that follows the song's scale.
21
+ - Clip automation that targets a specific device and returns the real curve when
22
+ read back.
23
+ - One-command remote-script install: `uvx --from ableton-ai install-remote-script`.
24
+ - A Claude Code skill under `skills/ableton`.
@@ -0,0 +1,43 @@
1
+ # CONTRIBUTING
2
+
3
+ Contributions are welcome, and are accepted via pull requests.
4
+ Please review these guidelines before submitting any pull requests.
5
+
6
+ ## Process
7
+
8
+ 1. Fork the project
9
+ 1. Create a new branch
10
+ 1. Code, test, commit and push
11
+ 1. Open a pull request detailing your changes
12
+
13
+ ## Guidelines
14
+
15
+ * Please ensure the coding style running `uv run ruff format src tests`.
16
+ * Send a coherent commit history, making sure each individual commit in your pull request is meaningful.
17
+ * You may need to [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) to avoid merge conflicts.
18
+ * Please remember that we follow [SemVer](http://semver.org/).
19
+
20
+ ## Setup
21
+
22
+ Clone your fork, then install the dev dependencies:
23
+ ```bash
24
+ uv sync --all-extras
25
+ ```
26
+ ## Lint
27
+
28
+ Lint your code:
29
+ ```bash
30
+ uv run ruff check src tests
31
+ ```
32
+
33
+ Check types:
34
+ ```bash
35
+ uv run mypy
36
+ ```
37
+
38
+ ## Tests
39
+
40
+ Run all tests:
41
+ ```bash
42
+ uv run pytest
43
+ ```
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Siddharth Ahuja
4
+ Copyright (c) 2026 Jason Poindexter
5
+ Copyright (c) 2026 Freek Van der Herten
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: ableton-ai
3
+ Version: 1.0.0
4
+ Summary: Control Ableton Live from an AI assistant via MCP: tracks, devices, clips, automation, and generative MIDI with per-note probability.
5
+ Project-URL: Homepage, https://github.com/freekmurze/ableton-ai
6
+ Project-URL: Documentation, https://github.com/freekmurze/ableton-ai#readme
7
+ Project-URL: Bug Tracker, https://github.com/freekmurze/ableton-ai/issues
8
+ Project-URL: Changelog, https://github.com/freekmurze/ableton-ai/blob/main/CHANGELOG.md
9
+ Author-email: Siddharth Ahuja <ahujasid@gmail.com>, Jason Poindexter <jason@theft.studio>, Freek Van der Herten <freek@spatie.be>
10
+ Maintainer-email: Freek Van der Herten <freek@spatie.be>
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Keywords: ableton,ai,claude,daw,live,mcp,midi,music,production
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Multimedia :: Sound/Audio
22
+ Classifier: Topic :: Multimedia :: Sound/Audio :: MIDI
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.10
25
+ Requires-Dist: mcp[cli]>=1.3.0
26
+ Provides-Extra: all
27
+ Requires-Dist: fastapi>=0.100.0; extra == 'all'
28
+ Requires-Dist: pydantic>=2.0.0; extra == 'all'
29
+ Requires-Dist: requests>=2.28.0; extra == 'all'
30
+ Requires-Dist: uvicorn>=0.22.0; extra == 'all'
31
+ Provides-Extra: rest
32
+ Requires-Dist: fastapi>=0.100.0; extra == 'rest'
33
+ Requires-Dist: pydantic>=2.0.0; extra == 'rest'
34
+ Requires-Dist: requests>=2.28.0; extra == 'rest'
35
+ Requires-Dist: uvicorn>=0.22.0; extra == 'rest'
36
+ Description-Content-Type: text/markdown
37
+
38
+ # Ableton AI
39
+
40
+ Control Ableton Live from an AI assistant like Claude. You describe what you want in plain language, and it builds it in your Live set: tracks, instruments, effects, MIDI clips, automation, and mixing. Around 130 commands covering most of the Live Object Model.
41
+
42
+ You describe, it builds, you listen and judge. The assistant has no ears, so it handles the mechanical work while you keep the taste.
43
+
44
+ ## What you can do with it
45
+
46
+ Ask for a sound and get it built:
47
+
48
+ ```text
49
+ Build a dark ambient pad on a new track. Slow attack, long release,
50
+ a filter behind it with a slow LFO on the cutoff. Play a minor chord.
51
+ ```
52
+
53
+ Ask for the tedious things you'd never do by hand:
54
+
55
+ ```text
56
+ Write six clips at 3, 5, 7, 11, 13 and 17 bar lengths. They're coprime,
57
+ so the loop won't repeat for over a million bars.
58
+ ```
59
+
60
+ ```text
61
+ Draw a twelve minute filter sweep with 200 automation points, then put
62
+ per-note probability on the hats so they flicker instead of repeating.
63
+ ```
64
+
65
+ Ask it to fix what you just heard:
66
+
67
+ ```text
68
+ The bass is too quiet and the reverb is too wet. Pull them back.
69
+ ```
70
+
71
+ ## How it works
72
+
73
+ The assistant talks to Ableton through the [Model Context Protocol](https://modelcontextprotocol.io) (MCP), an open standard for giving AI tools access to external systems. This project is an MCP server that exposes Ableton's Live Object Model as a set of tools the assistant can call.
74
+
75
+ There are two pieces:
76
+
77
+ The MCP server runs on your machine as its own process. Your AI client (Claude Code, Claude Desktop, Cursor) launches it and calls its tools.
78
+
79
+ A remote script runs inside Ableton itself. Ableton's Control Surface system lets you run Python inside Live, and that script opens a local socket the MCP server talks to. This is the only supported way into Live's API, so it has to be Python and it has to be enabled in Ableton's settings.
80
+
81
+ When you ask for something, the assistant calls a tool, the server sends a command over the socket, the remote script runs it against Live's API, and the result comes back. You see it happen in Ableton in real time.
82
+
83
+ ## Installation
84
+
85
+ You need Ableton Live 11 or newer, and [uv](https://docs.astral.sh/uv/).
86
+
87
+ First, install the remote script into Live. This is the part that runs inside Ableton:
88
+
89
+ ```bash
90
+ uvx --from ableton-ai install-remote-script
91
+ ```
92
+
93
+ Then connect your AI client.
94
+
95
+ For Claude Code:
96
+
97
+ ```bash
98
+ claude mcp add ableton -s user -- uvx ableton-ai
99
+ ```
100
+
101
+ For Claude Desktop, add this to `claude_desktop_config.json` (find it under Settings, Developer, Edit Config):
102
+
103
+ ```json
104
+ {
105
+ "mcpServers": {
106
+ "ableton": {
107
+ "command": "uvx",
108
+ "args": ["ableton-ai"]
109
+ }
110
+ }
111
+ }
112
+ ```
113
+
114
+ Restart your AI client after either one, so it picks up the new server.
115
+
116
+ Finally, turn the remote script on in Ableton. Open Settings, then Link, Tempo & MIDI. Under Control Surface, pick AbletonMCP. Leave Input and Output on None.
117
+
118
+ Ableton's status bar should flash `AbletonMCP: Listening for commands on port 9877`. If it doesn't, the remote script isn't installed, so rerun the first step and restart Live.
119
+
120
+ ## Getting started
121
+
122
+ Open a Live set you don't mind messing up, then hand your assistant this:
123
+
124
+ ```text
125
+ You're controlling my Ableton Live set. You can't hear anything you make,
126
+ so don't tell me it sounds good. Build what I ask, read the settings back
127
+ to check they landed, and let me be the judge.
128
+
129
+ Some things in Live are dropdowns you can't set through the API: the LFO
130
+ Map button, a Compressor's sidechain source, Drift's mod matrix routing.
131
+ If you need one of those, tell me and I'll click it.
132
+
133
+ To start: make a MIDI track, load Drift, and build an ambient pad with a
134
+ slow attack and long release. Add a filter behind it with a slow LFO on
135
+ the cutoff. Play a minor chord and loop it.
136
+ ```
137
+
138
+ That first paragraph is worth keeping around. It saves you re-explaining the same things every session. Better still, install the skill below, which teaches your assistant all of this and more.
139
+
140
+ ## The skill
141
+
142
+ If you use Claude Code, there's a skill in `skills/ableton` that teaches the assistant how to use these tools well: the parameter names each command expects, how to verify a change actually landed, how to reach inside drum racks, and how to build generative patches with coprime loops and note probability.
143
+
144
+ Install it:
145
+
146
+ ```bash
147
+ mkdir -p ~/.claude/skills
148
+ cp -R skills/ableton ~/.claude/skills/
149
+ ```
150
+
151
+ Restart Claude Code. It picks the skill up whenever you ask for something musical.
152
+
153
+ ## Editing the remote script
154
+
155
+ If you change the remote script, Ableton needs a restart to load it, because Live caches the compiled bytecode. Save your set, copy the updated file into place, and restart Live. Toggling the Control Surface off and on is not reliable.
156
+
157
+ ## Safety
158
+
159
+ The remote script opens an unauthenticated socket on `localhost:9877`. It isn't reachable from the network, but any process running as you can drive Ableton through it.
160
+
161
+ The more practical point: the assistant has 130 commands that change your project, and it can't hear what it's doing. It will occasionally clear something you cared about. Work on copies, save often, and lean on Cmd+Z, which covers most operations.
162
+
163
+ ## Testing
164
+
165
+ ```bash
166
+ uv sync --all-extras
167
+ uv run pytest
168
+ uv run ruff check src tests
169
+ uv run mypy
170
+ ```
171
+
172
+ ## Credits
173
+
174
+ Built on the original AbletonMCP by [Siddharth Ahuja](https://github.com/ahujasid) and later work by [Jason Poindexter](https://github.com/jpoindexter), with thanks to [calclavia](https://github.com/calclavia) and [Ronbalt](https://github.com/Ronbalt).
175
+
176
+ ## License
177
+
178
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,141 @@
1
+ # Ableton AI
2
+
3
+ Control Ableton Live from an AI assistant like Claude. You describe what you want in plain language, and it builds it in your Live set: tracks, instruments, effects, MIDI clips, automation, and mixing. Around 130 commands covering most of the Live Object Model.
4
+
5
+ You describe, it builds, you listen and judge. The assistant has no ears, so it handles the mechanical work while you keep the taste.
6
+
7
+ ## What you can do with it
8
+
9
+ Ask for a sound and get it built:
10
+
11
+ ```text
12
+ Build a dark ambient pad on a new track. Slow attack, long release,
13
+ a filter behind it with a slow LFO on the cutoff. Play a minor chord.
14
+ ```
15
+
16
+ Ask for the tedious things you'd never do by hand:
17
+
18
+ ```text
19
+ Write six clips at 3, 5, 7, 11, 13 and 17 bar lengths. They're coprime,
20
+ so the loop won't repeat for over a million bars.
21
+ ```
22
+
23
+ ```text
24
+ Draw a twelve minute filter sweep with 200 automation points, then put
25
+ per-note probability on the hats so they flicker instead of repeating.
26
+ ```
27
+
28
+ Ask it to fix what you just heard:
29
+
30
+ ```text
31
+ The bass is too quiet and the reverb is too wet. Pull them back.
32
+ ```
33
+
34
+ ## How it works
35
+
36
+ The assistant talks to Ableton through the [Model Context Protocol](https://modelcontextprotocol.io) (MCP), an open standard for giving AI tools access to external systems. This project is an MCP server that exposes Ableton's Live Object Model as a set of tools the assistant can call.
37
+
38
+ There are two pieces:
39
+
40
+ The MCP server runs on your machine as its own process. Your AI client (Claude Code, Claude Desktop, Cursor) launches it and calls its tools.
41
+
42
+ A remote script runs inside Ableton itself. Ableton's Control Surface system lets you run Python inside Live, and that script opens a local socket the MCP server talks to. This is the only supported way into Live's API, so it has to be Python and it has to be enabled in Ableton's settings.
43
+
44
+ When you ask for something, the assistant calls a tool, the server sends a command over the socket, the remote script runs it against Live's API, and the result comes back. You see it happen in Ableton in real time.
45
+
46
+ ## Installation
47
+
48
+ You need Ableton Live 11 or newer, and [uv](https://docs.astral.sh/uv/).
49
+
50
+ First, install the remote script into Live. This is the part that runs inside Ableton:
51
+
52
+ ```bash
53
+ uvx --from ableton-ai install-remote-script
54
+ ```
55
+
56
+ Then connect your AI client.
57
+
58
+ For Claude Code:
59
+
60
+ ```bash
61
+ claude mcp add ableton -s user -- uvx ableton-ai
62
+ ```
63
+
64
+ For Claude Desktop, add this to `claude_desktop_config.json` (find it under Settings, Developer, Edit Config):
65
+
66
+ ```json
67
+ {
68
+ "mcpServers": {
69
+ "ableton": {
70
+ "command": "uvx",
71
+ "args": ["ableton-ai"]
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ Restart your AI client after either one, so it picks up the new server.
78
+
79
+ Finally, turn the remote script on in Ableton. Open Settings, then Link, Tempo & MIDI. Under Control Surface, pick AbletonMCP. Leave Input and Output on None.
80
+
81
+ Ableton's status bar should flash `AbletonMCP: Listening for commands on port 9877`. If it doesn't, the remote script isn't installed, so rerun the first step and restart Live.
82
+
83
+ ## Getting started
84
+
85
+ Open a Live set you don't mind messing up, then hand your assistant this:
86
+
87
+ ```text
88
+ You're controlling my Ableton Live set. You can't hear anything you make,
89
+ so don't tell me it sounds good. Build what I ask, read the settings back
90
+ to check they landed, and let me be the judge.
91
+
92
+ Some things in Live are dropdowns you can't set through the API: the LFO
93
+ Map button, a Compressor's sidechain source, Drift's mod matrix routing.
94
+ If you need one of those, tell me and I'll click it.
95
+
96
+ To start: make a MIDI track, load Drift, and build an ambient pad with a
97
+ slow attack and long release. Add a filter behind it with a slow LFO on
98
+ the cutoff. Play a minor chord and loop it.
99
+ ```
100
+
101
+ That first paragraph is worth keeping around. It saves you re-explaining the same things every session. Better still, install the skill below, which teaches your assistant all of this and more.
102
+
103
+ ## The skill
104
+
105
+ If you use Claude Code, there's a skill in `skills/ableton` that teaches the assistant how to use these tools well: the parameter names each command expects, how to verify a change actually landed, how to reach inside drum racks, and how to build generative patches with coprime loops and note probability.
106
+
107
+ Install it:
108
+
109
+ ```bash
110
+ mkdir -p ~/.claude/skills
111
+ cp -R skills/ableton ~/.claude/skills/
112
+ ```
113
+
114
+ Restart Claude Code. It picks the skill up whenever you ask for something musical.
115
+
116
+ ## Editing the remote script
117
+
118
+ If you change the remote script, Ableton needs a restart to load it, because Live caches the compiled bytecode. Save your set, copy the updated file into place, and restart Live. Toggling the Control Surface off and on is not reliable.
119
+
120
+ ## Safety
121
+
122
+ The remote script opens an unauthenticated socket on `localhost:9877`. It isn't reachable from the network, but any process running as you can drive Ableton through it.
123
+
124
+ The more practical point: the assistant has 130 commands that change your project, and it can't hear what it's doing. It will occasionally clear something you cared about. Work on copies, save often, and lean on Cmd+Z, which covers most operations.
125
+
126
+ ## Testing
127
+
128
+ ```bash
129
+ uv sync --all-extras
130
+ uv run pytest
131
+ uv run ruff check src tests
132
+ uv run mypy
133
+ ```
134
+
135
+ ## Credits
136
+
137
+ Built on the original AbletonMCP by [Siddharth Ahuja](https://github.com/ahujasid) and later work by [Jason Poindexter](https://github.com/jpoindexter), with thanks to [calclavia](https://github.com/calclavia) and [Ronbalt](https://github.com/Ronbalt).
138
+
139
+ ## License
140
+
141
+ MIT. See [LICENSE](LICENSE).