
gluon/max-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Build and drive Max/MSP patches from natural language — MCP server + in-Max chat. Stock objects, no externals. Early experiment (v0.4).
概要
It works and ships with a test suite, but it has had very little real-world use: expect rough edges, and expect things to change. It has been exercised mostly through the in-Max chat; the external MCP server runs the same engine and passes the tests but has seen little live use. Bug reports and feedback are very welcome. Build and drive Max/MSP patches in natural language, from an MCP client (Claude Desktop, Claude Code, the MCP Inspector, ...) . The agent creates objects, wires them, sets message content, toggles audio, to see what is actually there before it edits, and so it stops guessing object signatures. Pure Max mechanisms — no third-party externals, no mxj, no relay daemon: - the patch uses [thispatcher] scripting (script newdefault, script connect, script disconnect, script delete, script send). - the patch uses a [v8] JavaScript object that walks the patcher via the official Max JS API (boxtext, patchcords) and returns it as JSON.
README
以下は原文 README の抜粋です。原文を見る。
maxmsp-mcp
Early experiment — v0.4, a first public test, not a finished product. It works and ships with a test suite, but it has had very little real-world use: expect rough edges, and expect things to change. It has been exercised mostly through the in-Max chat; the external MCP server runs the same engine and passes the tests but has seen little live use. Bug reports and feedback are very welcome.
Build and drive Max/MSP patches in natural language, from an MCP client (Claude Desktop, Claude Code, the MCP Inspector, …) or from a chat window that lives inside Max itself. The agent creates objects, wires them, sets message content, toggles audio, reads the live patch back to see what is actually there before it edits, and grounds itself on the official object reference so it stops guessing object signatures.
Pure Max mechanisms — no third-party externals, no mxj, no relay daemon:
- Writing the patch uses
[thispatcher]scripting (script newdefault,script connect,script disconnect,script delete,script send). - Reading the patch uses a
[v8]JavaScript object that walks the patcher via the official Max JS API (boxtext,patchcords) and returns it as JSON. - Transport to the external server is OSC over UDP between the Python server
and a stock
[udpreceive]/[udpsend]pair in the host patch. The in-Max chat drives the same plumbing directly from[node.script].
Two ways to use it
| Facade | What it is | Runs the LLM via |
|---|---|---|
| External MCP server | maxmsp_mcp.server, spoken to by Claude Desktop / Claude Code / the Inspector over stdio |
your Claude plan / MCP client |
| In-Max chat | a chat window inside the patch ([node.script chat.js] + [jweb]), no external client |
the Anthropic API (or a local model) |
Both facades share the same command vocabulary, the same host patch, and the same patching guide. Build with one, inspect or extend with the other.
Design notes
- Stable addressing. Every object the agent creates gets a scripting name.
You wire, set and delete by name, so the mapping never drifts when the user
edits the patch by hand. In the in-Max chat the model assigns its own readable
labels (
carrier,pack_main, …) and wires by those. - Single-object delete.
script deleteremoves exactly one object. - Closed loop. The agent dumps the live patch to confirm its own work and to discover objects the user added by hand, instead of building blind.
- Machinery stays hidden. Plumbing objects carry
mcp_*scripting names and are filtered out of every dump, so the agent only ever sees the musical patch. - Grounded on the docs. A parsed reference database lets the agent look up an object’s real inlets, outlets, arguments and attributes instead of inventing them.
Architecture
インストール
npx @modelcontextprotocol/inspector \設定
{
"mcpServers": {
"maxmsp": {
"command": "/absolute/path/to/uv",
"args": ["--directory", "/absolute/path/to/max-mcp-server",
"run", "python", "-m", "maxmsp_mcp.server"],
"env": { "MAX_HOST": "127.0.0.1", "MAX_PORT": "7400", "MAX_RETURN_PORT": "7401" }
}
}
}