PureData-MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PureData-MCP Create a sine wave oscillator connected to dac~"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PureData-MCP
Control and live-patch Pure Data from AI agents via the Model Context Protocol.
PureData-MCP lets an MCP client start Pd, open visible GUI patches, generate Vanilla .pd patches, and edit objects and connections while a patch is running. The goal is simple: ask for sound in natural language, watch Pd become the instrument.
Pure Data, also known as Pd or Pd Vanilla, is the open-source visual programming language for multimedia created by Miller Puckette and maintained by the Pd community. This project is independent and is not affiliated with or endorsed by the Pure Data project. Many thanks to the Pure Data creators and community for making this kind of work possible.
Quick Start
Install Pure Data and Node.js 20 or newer, then run the MCP server with npm:
npx -y @damagethundercat/puredata-mcpMost users do not run that command directly. Instead, add it to an MCP client such as Codex, Claude Code, Cursor, or VS Code.
Related MCP server: synthlab-mcp
Connect To Codex
Add this to your Codex MCP config:
[mcp_servers.puredata]
command = "npx"
args = ["-y", "@damagethundercat/puredata-mcp"]On Windows, use cmd /c so the MCP client avoids PowerShell npm policy issues:
[mcp_servers.puredata]
command = "cmd"
args = ["/c", "npx", "-y", "@damagethundercat/puredata-mcp"]Restart Codex after changing the config.
Other MCP Clients
For clients that use JSON MCP config, add:
{
"mcpServers": {
"puredata": {
"command": "npx",
"args": ["-y", "@damagethundercat/puredata-mcp"]
}
}
}On Windows:
{
"mcpServers": {
"puredata": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@damagethundercat/puredata-mcp"]
}
}
}Try It
After connecting the server, ask your agent:
Create a visible Pure Data patch with an osc~ -> *~ -> dac~ signal chain.Make a 120 BPM electronic loop with kick, hi-hat, bass, a mixer, and dac~ in one Pure Data GUI window.Add a delay effect to the current patch and keep the output quiet.Move the bass section to the left, remove the old hi-hat object, and reconnect the mixer.What It Can Do
Start and stop local Pure Data.
Open Pd headless or with the visible Pd GUI.
Generate small Vanilla
.pdpatches.Control frequency, amplitude, gate, and DSP over TCP FUDI.
Open existing
.pdfiles and manage bridge patches that can be live-edited from an already visible Pd GUI.Add, connect, move, update, remove, replace, clear, and inspect agent-owned live patch graphs.
List audio devices and inspect session status/logs.
Tools
PureData-MCP exposes a small set of MCP tools:
Lifecycle:
pd_start_demo,pd_stop,pd_statusPatch lifecycle:
pd_open_patch,pd_start_live_session,pd_create_live_patch,pd_attach_live_session,pd_save_patchAudio/control:
pd_set_params,pd_send_control,pd_list_audio_devicesPatch preview:
pd_preview_patchLive GUI editing:
pd_live_add_object,pd_live_connect,pd_live_move_object,pd_live_update_object,pd_live_remove_object,pd_live_disconnect,pd_live_replace_graph,pd_live_clear,pd_live_graph
The live editing tools let an agent build and modify a visible Pure Data patch while it is running.
For full musical patches, generate a complete safe graph first and apply it with pd_live_replace_graph in one call. Use the object-by-object tools for small follow-up edits, and use pd_send_control for designed live parameters such as cutoff, amp, mix, or mode.
Resources
pd://session/statuspd://patch/currentpd://logs/recentpd://schema/parameterspd://live/graph
Local Demos
Clone the repository if you want to run the included demos directly:
git clone https://github.com/damagethundercat/PureData-MCP.git
cd PureData-MCP
npm install
npm run buildRun the current electronic rhythm demo:
npm run demo:electroOn Windows PowerShell, prefer:
cmd /c npm run demo:electroThe demo patch lives at patches/electro-rhythm-loop.pd.
Development
npm run test:unit
npm run typecheck
npm run buildOpt-in Pd integration tests:
PD_INTEGRATION=1 PD_EXE="/path/to/pd" npm run test:pdOn Windows:
$env:PD_EXE="C:\Program Files\Pd\bin\pd.com"
$env:PD_INTEGRATION="1"
cmd /c npm run test:pdTroubleshooting
If Pd is not found, set
PD_EXEfor headless sessions orPD_GUI_EXEfor visible GUI sessions.If audio is silent or routed to the wrong device, ask the agent to run
pd_list_audio_devices, then start again with the rightaudioOutDevice.If PowerShell blocks npm scripts on Windows, run npm through
cmd /c npm ....
License
MIT
Available Tools
21 toolspd_attach_live_sessionAttach To Pure Data Live SessionB
Attach to an already-open MCP live-edit Pd patch by control/edit ports, optionally loading its patchPath for preview and save.
Inputs: editPort (required), controlPort (required), patchPath.
pd_create_live_patchCreate Pure Data Live PatchA
Write a live-edit bridge .pd file with known control/edit ports so the user can open it manually and Codex can attach later.
Inputs: targetPath (required), dsp, editPort, overwrite, +1 more.
pd_list_audio_devicesList Pd Audio DevicesA
Best-effort query of Pd audio devices using the configured Pd binary.
Inputs: no named parameters.
pd_live_add_objectAdd Live Pure Data ObjectA
Add one safe-palette object to the visible MCP live canvas. Use only for tiny follow-up edits; for complete musical patches, generate a full graph and call pd_live_replace_graph once.
Inputs: x (required), y (required), type (required), args.
pd_live_clearClear Live Pure Data CanvasA
Clear the agent-managed MCP live canvas and reset its object ids.
Inputs: no named parameters.
pd_live_connectConnect Live Pure Data ObjectsA
Connect two agent-created live objects by stable ids. Use only for small follow-up edits; prefer pd_live_replace_graph for full patch updates. Direct signal-to-dac~ connections are blocked.
Inputs: sourceId (required), targetId (required), inlet, outlet.
pd_live_disconnectDisconnect Live Pure Data ObjectsA
Remove an agent-created live connection by stable id, then rebuild the visible MCP live canvas.
Inputs: id (required).
pd_live_graphInspect Live Pure Data GraphB
Return the agent-managed live patch object and connection graph.
Inputs: no named parameters.
pd_live_move_objectMove Live Pure Data ObjectC
Move an agent-created live object by rebuilding the visible MCP live canvas at the new coordinates.
Inputs: x (required), y (required), id (required).
pd_live_remove_objectRemove Live Pure Data ObjectB
Remove an agent-created live object and its incident connections, then rebuild the visible MCP live canvas.
Inputs: id (required).
pd_live_replace_graphReplace Live Pure Data GraphB
Preferred live composition path: replace the entire agent-managed live graph with a safe precomposed graph, then render it into the visible Pd GUI canvas.
Inputs: nodes (required), connections.
pd_live_update_objectUpdate Live Pure Data ObjectB
Update an agent-created live object's type, arguments, or coordinates, then rebuild the visible MCP live canvas.
Inputs: no named parameters.
pd_open_patchOpen Existing Pure Data PatchA
Launch an existing absolute .pd patch path as the MCP-managed Pd process for status, preview, save, and stop.
Inputs: patchPath (required), gui, audioOutDevice.
pd_preview_patchPreview Current Pd PatchA
Return the current generated Vanilla .pd patch text.
Inputs: no named parameters.
pd_save_patchSave Current Pure Data PatchB
Write the current generated Pd patch, including the live canvas, to the active patch file or an absolute targetPath.
Inputs: overwrite, targetPath.
pd_send_controlSend Pure Data Control MessageB
Send a safe raw control message to the running live patch control bus for parameter tweaks without rebuilding the canvas.
Inputs: selector (required), args.
pd_set_paramsSet Pure Data ParametersC
Update bounded live parameters on the running Pd demo patch.
Inputs: no named parameters.
pd_start_demoStart Pure Data DemoB
Generate a Vanilla Pure Data demo patch, launch Pd headless by default or with gui=true, optionally from an absolute targetPath, start DSP, and prepare FUDI control.
Inputs: gui, patch, amplitude, frequency, +3 more.
pd_start_live_sessionStart Pure Data Live SessionC
Create and launch a visible live-edit Pd patch with an empty agent-managed canvas ready for pd_live_replace_graph.
Inputs: dsp, gui, overwrite, targetPath, +1 more.
pd_statusPure Data StatusA
Return Pd lifecycle state, patch path, parameters, and recent errors.
Inputs: no named parameters.
pd_stopStop Pure DataB
Silence and stop the currently running Pd process.
Inputs: force.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools target distinct actions (create, attach, stop, status), but pd_set_params and pd_send_control overlap in sending control messages, and the three start-related tools (pd_start_demo, pd_start_live_session, pd_open_patch) could be confused. Descriptions help disambiguate, but a few boundaries remain fuzzy.
The naming pattern is largely pd_verb_noun, with a consistent pd_live_ prefix for canvas editing operations. However, a few tools like pd_status and pd_live_graph use nouns instead of verbs, breaking the otherwise predictable convention.
With 21 tools, this sits in the heavy range (16-25) for a well-scoped MCP server. The breadth of Pure Data lifecycle and live-editing operations justifies many tools, but some could be consolidated (e.g., pd_start_demo and pd_start_live_session overlap).
The tool surface covers the full patch lifecycle (create, open, launch, preview, save, stop) plus detailed live canvas editing and parameter control. Minor gaps include no explicit DSP toggle and limited audio device configuration, but core workflows are well supported.
Maintenance
Related MCP Connectors
Connect AI agents to Replynodes over the Model Context Protocol.
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Related MCP Servers
- AlicenseBqualityAmaintenanceA Model Context Protocol server that enables AI agents to control and operate TouchDesigner projects through creation, modification, and querying of nodes and project structures.141,411 npm627MIT
- AlicenseAqualityDmaintenanceEnables AI-powered music composition and synthesis by generating Pure Data patches, VCV Rack modules, and MIDI controller mappings through natural language.1012 npm5MIT
- FlicenseAqualityDmaintenanceEnables natural language control of Pure Data patches through Claude AI, allowing dynamic creation, modification, and DSP control via the Model Context Protocol.1124-
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to directly understand and generate Max patches via the Model Context Protocol.286MIT