Simple Osc Mcp Server

by noodledostuff

279 downloads
Not rated
GitHub

About

A Model Context Protocol (MCP) server that enables AI agents to create OSC (Open Sound Control) endpoints and receive OSC messages. This server provides a bridge between AI agents and OSC-enabled applications like SuperCollider, Max/MSP, TouchOSC, and other music/audio software.

Details

Author
noodledostuff
Downloads
279
Categories
Media

- Create OSC endpoints on specified UDP ports with optional address filters
- Stop and remove active OSC endpoints
- Query received OSC messages by endpoint, address pattern, time window, or limit
- Get status information for active endpoints
- Buffers up to 10,000 messages per endpoint

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Simple Osc Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Run npx osc-mcp-server to start the server in stdio mode. Use the tools create_osc_endpoint, stop_osc_endpoint, get_osc_messages, and get_endpoint_status to interact with OSC endpoints.

create_osc_endpoint

Create a new OSC endpoint to listen for incoming OSC messages

stop_osc_endpoint

Stop and remove an existing OSC endpoint

get_osc_messages

Query received OSC messages from endpoints

get_endpoint_status

Get status information for OSC endpoints

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "simple osc mcp server": {
            "osc-server": {
                "command": "npx",
                "args": [
                    "osc-mcp-server"
                ],
                "env": []
            }
        }
    }
}

McpServers

{
    "osc-server": {
        "command": "npx",
        "args": [
            "osc-mcp-server"
        ],
        "env": []
    }
}

Available Tools

The server provides four main tools for OSC interaction:

1. create_osc_endpoint

Creates a new OSC endpoint to listen for incoming messages.

Parameters:
- port (required): UDP port number (1024-65535)
- bufferSize (optional): Maximum messages to store (default: 1000, max: 10000)
- addressFilters (optional): Array of OSC address patterns to filter messages

Example:

{
"port": 8000,
"bufferSize": 500,
"addressFilters": ["/synth/", "/effects/reverb"]
}

2. stop_osc_endpoint

Stops and removes an existing OSC endpoint.

Parameters:
- endpointId (required): ID of the endpoint to stop

Example:

{
"endpointId": "endpoint_8000_1234567890"
}

3. get_osc_messages

Queries received OSC messages from endpoints.

Parameters:
- endpointId (optional): Specific endpoint ID (if omitted, queries all endpoints)
- addressPattern (optional): OSC address pattern to filter messages
- timeWindowSeconds (optional): Time window in seconds (from now backwards)
- limit (optional): Maximum number of messages to return (max: 1000)

Example:

{
"endpointId": "endpoint_8000_1234567890",
"addressPattern": "/synth/freq",
"timeWindowSeconds": 30,
"limit": 50
}

4. get_endpoint_status

Gets status information for OSC endpoints.

Parameters:
- endpointId (optional): Specific endpoint ID (if omitted, returns all endpoints)

Example:

{
"endpointId": "endpoint_8000_1234567890"
}

Command Line Usage

When running the server directly, it starts in stdio mode for MCP communication:

# Start the server
npx osc-mcp-server

The server will output startup information to stderr

and handle MCP communication via stdin/stdout

Example Workflow

Here's a typical workflow for using the OSC MCP Server:

1. Create an endpoint to listen for OSC messages:

   {
"tool": "create_osc_endpoint",
"parameters": {
"port": 8000,
"bufferSize": 1000,
"addressFilters": ["/synth/
"]
}
}

2. Send OSC messages from your application (SuperCollider, Max/MSP, etc.) to localhost:8000

3. Query received messages:

   {
"tool": "get_osc_messages",
"parameters": {
"timeWindowSeconds": 60,
"limit": 100
}
}

4. Check endpoint status:

   {
"tool": "get_endpoint_status",
"parameters": {}
}

5. Stop the endpoint when done:

   {
"tool": "stop_osc_endpoint",
"parameters": {
"endpointId": "endpoint_8000_1234567890"
}
}

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.