MCP2OSC
Verified Safeby yyf
Overview
Facilitates parametric control of multimedia devices and creative applications (like MaxMSP) using natural language prompts via a Large Language Model (LLM) such as Claude.
Installation
npm run mcpEnvironment Variables
- OSC_HOST
- OSC_SEND_PORT
- OSC_RECEIVE_PORT
- WEBSOCKET_PORT
- MAX_OSC_MESSAGES
- OSC_LOG_ROTATION
- WEB_PORT
- DEFAULT_OSC_HOST
- STANDALONE
- DASHBOARD_PORT
- MCP_MODE
Security Notes
The system presents several security considerations: 1. **ReDoS Vulnerability:** The `handleGetReceivedMessages` function in `mcp-server.js` constructs a regular expression from user-provided `addressPattern` (`new RegExp(addressPattern.replace(/\*/g, '.*'))`). If an LLM or a malicious user (if the endpoint were exposed) provides a crafted regex pattern, it could lead to a Regular Expression Denial of Service (ReDoS) attack, causing the server to hang or crash. 2. **API Exposure Risks:** The `enhanced-dashboard-server.js` exposes several API endpoints (e.g., `/api/patterns/upload`, `/api/test-osc`). * `/api/patterns/upload` allows posting new OSC patterns. While validation is performed, a large or complex JSON payload could potentially lead to resource exhaustion or malformed data being stored if not handled robustly, impacting subsequent parsing. * `/api/test-osc` allows sending arbitrary OSC messages to a specified address and arguments. If the dashboard is accessible from an untrusted network, this could be exploited to send arbitrary UDP packets, potentially causing a denial of service or other malicious activity on internal networks. 3. **JSON Parsing from Network Input:** Both `websocket-osc-controller.js` and `enhanced-dashboard-server.js` parse JSON from incoming network messages (`JSON.parse(data.toString())` in WebSockets, `req.body` in Express). Malformed JSON could potentially crash the server or consume excessive resources if not adequately protected by robust error handling and input validation (which is present to some extent for patterns but could be extended). 4. **UDP Communication:** OSC relies on UDP, which is connectionless and stateless. This makes it susceptible to spoofing and message injection if the network is not trusted, though this is inherent to UDP and not specific to the application's implementation. 5. **File System Operations:** The system extensively uses `fs` operations for logging and pattern storage. While atomic writes are implemented in `mcp-server.js`, concurrent writes or extremely large log/pattern files could introduce performance bottlenecks or, in extreme cases, file corruption if error handling or resource limits are not fully robust. The `shared-storage.js` uses synchronous file operations which can block the event loop.
Similar Servers
7134-easy-mcp-server
This project provides an easy-to-setup server solution designed to bridge or interact with Minecraft servers, simplifying their management or extending their functionalities.
codemesh
Orchestrates multiple MCP servers by executing TypeScript code, enabling AI agents to build complex, self-improving workflows.
strawberry-mcp
Provides an MCP tool for LLMs to count letter occurrences in words.
icecast-mcp
This is an MCP (Minecraft Control Panel) server designed to manage and monitor Minecraft game server instances.