MaxMSP
MCP (Model Context Protocol) Server for Max (Max/MSP/Jitter)
claude mcp add --transport stdio tiianhk-maxmsp-mcp-server uvx tiianhk-maxmsp-mcp-server
How to use
This MCP server enables LLMs to directly understand and generate Max patches by using the Model Context Protocol. It provides capabilities to explain components within a Max patch, as well as generate new Max objects and connections guided by LLM prompts. With the server running, you can connect an MCP client (which hosts your chosen LLM) and issue tasks such as: analyzing a given Max patch to explain objects and patch logic, or asking the LLM to compose a new FM synthesizer or other patch elements from scratch. The LLM has access to documentation for each Max object, the objects present in the active patch, and subpatch windows, which helps it reason about object behavior, parameter ranges, and wiring. You can then interact with the results to refine, debug, or extend patches within Max.
To use, start the MCP server according to the installation guide, connect your MCP client (Claude, Cursor, or any supported client), and issue MCP requests such as explainPatch or generatePatch. The server will respond with structured guidance and patch-generation steps that you can implement directly in Max.
How to install
Prerequisites:
- Python 3.8 or newer
- uv package manager (uv)
- Max 9 or newer
Installation steps:
-
Install uv (the package manager): On macOS and Linux: curl -LsSf https://astral.sh/uv/install.sh | sh On Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Clone the MCP server repository and enter its directory: git clone https://github.com/tiianhk/MaxMSP-MCP-Server.git cd MaxMSP-MCP-Server
-
Create and activate a Python virtual environment, then install dependencies: uv venv source .venv/bin/activate uv pip install -r requirements.txt
-
Connect the MCP server to an MCP client (LLM provider):
Example for Claude
python install.py --client claude
Or for Cursor
python install.py --client cursor
-
(Optional) If you plan to use other clients, follow the guide in install.py to add your client configuration and then run: python install.py --client {your_client_name}
-
To install as a Max patch workflow, follow the repository's instructions to load the patch and verify the npm-based scripting integration in the Max patch demo (MaxMSP_Agent/demo.maxpat).
Additional notes
Tips and notes:
- This server relies on uv to manage Python environments; ensure uv is properly installed before proceeding.
- The MCP client acts as the bridge to your LLM; you can switch clients by adjusting the install.py configuration or adding new client entries.
- If you encounter network or dependency issues, activating the virtual environment before running Python commands helps isolate the setup.
- For advanced use, you can wire multiple MCP servers or clients, enabling distributed LLM capabilities across patches and subpatches.
- The Max integration assumes npm is available inside the Max patch environment when validating the Dave scripts in the demo. Ensure npm is installed and accessible if you intend to run the provided demo.MaxPat workflow.