Pure Data Server
БесплатноНе проверенEnables natural language control of Pure Data patches through Claude AI, allowing dynamic creation, modification, and DSP control via the Model Context Protocol
Описание
Enables natural language control of Pure Data patches through Claude AI, allowing dynamic creation, modification, and DSP control via the Model Context Protocol.
README
This project provides integration between Claude AI and Pure Data through the Model Context Protocol (MCP). With this integration, Claude can dynamically create, modify, and control Pure Data patches through natural language.
Overview
The system consists of three core components:
- MCP Server (
mcp_server.py): Implements the Model Context Protocol interface for Claude - OSC Daemon (
osc_daemon.py): Handles OSC communication with Pure Data - Pure Data Patch (
example_patch.pd): A dynamic patching solution that receives OSC messages
Features
- Dynamic Object Creation: Create any Pure Data object on demand through Claude
- Connection Management: Connect objects together to build complex signal flows
- Workspace Management: Clear all objects and reset state with
clear_workspace - DSP Control: Start and stop audio processing remotely
- Parameter Control: Modify parameters of objects in real-time
- Global Object Tracking: Reliable index-based connection system
- Error Handling: Robust error detection and reporting
- Debugging Tools: Comprehensive logging system
Recent Updates
Installation
Prerequisites
- Python 3.7+
- Pure Data (vanilla) 0.51+
- Required Python packages:
python-oscfastmcpjsonschema
- uv package manager
Install uv
On macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
On Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Learn more: astral-sh/uv
🛠️ Usage
Clone the repository
git clone https://github.com/nikmaniatis/Pd-MCP-Server.git
Integration with Claude Desktop
- Open:
Claude > Settings > Developer > Edit Config > claude_desktop_config.json
- Add the following block:
{
"mcpServers": {
"Pure Data MCP Server": {
"command": "uv",
"args": [
"--directory",
"PATH_TO_PD_MCP_SERVER",
"run",
"main.py"
],
"env": {
"PD_OSC_HOST": "127.0.0.1",
"PD_OSC_PORT": "5000",
"PD_FEEDBACK_PORT": "5001"
}
}
}
}
Note: If the
uvcommand is not found, runwhich uv(Unix) orGet-Command uv(PowerShell) and use the full path in the"command"field.
Quick Example
Once the MCP server is connected and the Pd patch is listening, you can ask Claude to build patches using natural language:
"Create an osc~ at 440 Hz, connect it to a dac~, and start DSP."
Claude will call the MCP tools to produce something like:
create_object("osc~", ["440"], {"x": 100, "y": 50}) → index 0
create_object("*~", ["0.25"], {"x": 100, "y": 110}) → index 1
create_object("dac~", [], {"x": 100, "y": 170}) → index 2
connect_objects({"id": "osc~_100_50", "port": 0}, {"id": "*~_100_110", "port": 0})
connect_objects({"id": "*~_100_110", "port": 0}, {"id": "dac~_100_170", "port": 0})
connect_objects({"id": "*~_100_110", "port": 0}, {"id": "dac~_100_170", "port": 1})
start_dsp()
This creates the following patch in the workspace subpatch:
osc~ 440
|
*~ 0.25 (volume)
/ \
dac~ L+R
You can then ask Claude to modify the patch, add effects, change frequencies, or build more complex signal chains — all through conversation.
Architecture
Message Flow
- Claude executes MCP tools based on user requests
- MCP Server processes the tool calls
- OSC messages are formatted and sent to Pure Data
- Pure Data executes the commands via the dynamic patch
- Feedback (if any) is returned via OSC callbacks
Troubleshooting
Common Issues
- Object Creation Fails: Ensure Pure Data is running and the patch is open
- Connection Issues: Verify that object IDs match exactly what was returned from
create_object - Port Conflicts: Check if port 5000 is already in use
- Message Format Errors: Ensure message formats match the expected format in the Pure Data patch
- Lost Objects: If object tracking gets confused, try restarting both the MCP server and Pure Data
Known Limitations
- No delete or disconnect support: The Pd patch (
example_patch.pd) only handles/pd/create,/pd/connect,/pd/dsp, and/pd/clear. Objects and connections cannot be individually removed — useclear_workspaceto reset the entire workspace instead. - Signal objects with zero arguments: When signal objects like
+~or*~are created with a0argument via dynamic patching (e.g.,obj 100 100 +~ 0), Pd 0.55+ treats the second inlet as a float inlet instead of a signal inlet, breaking signal connections. The MCP server automatically strips trailing zero arguments from signal objects to avoid this issue.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- Pure Data - The open source visual programming language
- Model Context Protocol - The protocol enabling AI tools
- Python-OSC - Python implementation of OSC
Установка Pure Data Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/nikmaniatis/Pd-MCP-ServerFAQ
Pure Data Server MCP бесплатный?
Да, Pure Data Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Pure Data Server?
Нет, Pure Data Server работает без API-ключей и переменных окружения.
Pure Data Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Pure Data Server в Claude Desktop, Claude Code или Cursor?
Открой Pure Data Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Pure Data Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
