Skip to main content
Glama
nikmaniatis

Pure Data MCP Server

by nikmaniatis

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PD_OSC_HOSTNoHost for OSC communication with Pure Data127.0.0.1
PD_OSC_PORTNoPort for OSC communication with Pure Data5000
PD_FEEDBACK_PORTNoPort for feedback from Pure Data5001

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
create_objectA

Create a new Pd object.

This tool creates a new object in the Pure Data patch at the specified position.
The object can be any valid Pd object type (e.g., osc~, dac~) with optional arguments.

The implementation handles:
1. Creating the object in Pure Data via OSC
2. Assigning a unique numeric index to the object for connection tracking
3. Returning an object_id that can be used in subsequent API calls

The object_id follows the format "{object_type}_{x}_{y}" to provide
a predictable way to reference objects.

Args:
    object_type: Type of Pd object (e.g., osc~, dac~)
    args: Arguments for the object (e.g., ["440"] for an oscillator)
    position: Position on the canvas (x, y coordinates)
    ctx: MCP context
    
Returns:
    Response with object ID and status
    
Example:
    create_object("osc~", ["440"], {"x": 100, "y": 100}, ctx)
delete_objectA

Delete a Pd object.

This tool removes an existing object from the Pure Data patch.
It also removes the object's entry from the index tracking system
to maintain consistency.

Args:
    object_id: ID of the object to delete
    ctx: MCP context
    
Returns:
    Response with status
    
Example:
    delete_object("osc~_100_100", ctx)
connect_objectsA

Create a connection between two Pd objects.

This tool connects two objects in the Pure Data patch by creating a
patch cord between the specified outlet and inlet.

The connection system uses numeric indices rather than string IDs,
as required by the Pure Data patch. The global object_indices
dictionary maps from the user-friendly string IDs to these numeric indices.

Args:
    source: Source object with id and port
           e.g., {"id": "osc~_100_100", "port": 0}
    destination: Destination object with id and port
                e.g., {"id": "dac~_200_100", "port": 0}
    ctx: MCP context
    
Returns:
    Response with status
    
Example:
    connect_objects({"id": "osc~_100_100", "port": 0}, {"id": "dac~_200_100", "port": 0}, ctx)
disconnect_objectsB

Remove an existing connection between two Pd objects.

This tool disconnects two objects in the Pure Data patch.
It handles the translation from string IDs to numeric indices
required by the Pure Data patch.

Args:
    source_id: ID of the source object
    destination_id: ID of the destination object
    ctx: MCP context
    
Returns:
    Response with status
set_paramA

Modify a parameter of an existing Pd object.

Args:
    object_id: ID of the object
    parameter: Parameter name to modify
    value: New value for the parameter
    ctx: MCP context
    
Returns:
    Response with status
get_paramB

Retrieve the current value of an object's parameter.

Args:
    object_id: ID of the object
    parameter: Parameter name to retrieve
    ctx: MCP context
    
Returns:
    Response with status and value
clear_workspaceA

Clear all objects from the Pd workspace subpatch and reset index tracking.

This sends /pd/clear to Pure Data, which clears the workspace subpatch,
and resets the server-side object index counter so new objects start from 0.

Args:
    ctx: MCP context

Returns:
    Response with status and number of objects cleared
start_dspB

Enable DSP processing in Pure Data.

This turns on audio processing in Pure Data so that
sound can be generated or processed.

Args:
    ctx: MCP context
    
Returns:
    Response with status
stop_dspA

Disable DSP processing in Pure Data.

This turns off audio processing in Pure Data to
conserve CPU when audio is not needed.

Args:
    ctx: MCP context
    
Returns:
    Response with status
save_patchB

Save the current Pd patch.

This tool saves the current state of the Pure Data patch
to a file at the specified path.

Args:
    file_path: Path to save the patch file
    ctx: MCP context
    
Returns:
    Response with status
load_patchC

Load a Pd patch from a file.

This tool loads a Pure Data patch from the specified file path.
It will replace the current patch state.

Args:
    file_path: Path to the patch file to load
    ctx: MCP context
    
Returns:
    Response with status

Prompts

Interactive templates invoked by user choice

NameDescription
create_oscillator_patchPrompt to create a simple oscillator patch. This prompt guides the user through creating a basic oscillator patch in Pure Data using the available tools. Returns: Prompt text

Resources

Contextual data attached and managed by the client

NameDescription
pd://objects
pd://port-info

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikmaniatis/Pd-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server