PureData-MCP
Control and live-patch Pure Data from AI agents via the Model Context Protocol.
README
<p align="right"> English | <a href="README.ko.md">한국어</a> | <a href="README.ja.md">日本語</a> </p>
PureData-MCP
<p align="center"> <img src="icon.png" width="160" alt="PureData-MCP icon"> </p>
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-mcp
Most users do not run that command directly. Instead, add it to an MCP client such as Codex, Claude Code, Cursor, or VS Code.
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_status - Patch lifecycle:
pd_open_patch,pd_start_live_session,pd_create_live_patch,pd_attach_live_session,pd_save_patch - Audio/control:
pd_set_params,pd_send_control,pd_list_audio_devices - Patch preview:
pd_preview_patch - Live 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 build
Run the current electronic rhythm demo:
npm run demo:electro
On Windows PowerShell, prefer:
cmd /c npm run demo:electro
The demo patch lives at patches/electro-rhythm-loop.pd.
Development
npm run test:unit
npm run typecheck
npm run build
Opt-in Pd integration tests:
PD_INTEGRATION=1 PD_EXE="/path/to/pd" npm run test:pd
On Windows:
$env:PD_EXE="C:\Program Files\Pd\bin\pd.com"
$env:PD_INTEGRATION="1"
cmd /c npm run test:pd
Troubleshooting
- 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。