sox-mcp

sox-mcp

Provides audio inspection, conversion, processing, and generation capabilities via SoX, enabling AI agents to 'hear' and manipulate audio files through structured JSON interfaces.

Category
Visit Server

README

SoX MCP Server

A Model Context Protocol (MCP) server that provides powerful audio inspection and processing capabilities to LLM agents. This server wraps the SoX (Sound eXchange) command-line utilities, allowing AI agents to "hear" and manipulate audio files through structured JSON interfaces.

🚀 Features

Agents can use this server to perform a wide range of audio tasks:

  • Inspection: Get detailed metadata (duration, sample rate, channels, bitrate, format, encoding) and statistical analysis (RMS, peak level, etc.) from audio files.
  • Conversion: Convert audio between formats (e.g. WAV to MP3).
  • Processing:
    • Resample audio to different sample rates.
    • Adjust volume, normalize peaks, or apply gain.
    • Trim audio or remove silence (VAD).
    • Remix or swap audio channels.
    • Concatenate or mix multiple audio files.
    • Apply a vast array of SoX effects (reverb, equalizer, delay, etc.).
  • Generation: Generate pure sine tones, white noise, or silence for testing.
  • Discovery: List audio files within a directory with optional extension filtering.

📋 Prerequisites

  1. Python 3.10+
  2. SoX Utilities: You must have the sox and soxi executables installed on your system and available in your PATH.
    • Windows: Download from sox.sourceforge.net or install via choco install sox.
    • macOS: brew install sox
    • Linux: sudo apt-get install sox libsox-fmt-all

🛠️ Installation

1. Clone the repository

git clone <repository-url>
cd sox-mcp-server

2. Set up a Virtual Environment

python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

💻 Development

Running the Server

The server uses the MCP standard I/O transport. To run it manually for debugging:

python sox_mcp_server.py

Testing

We provide a smoke test script to verify the server and its connection to the SoX binaries:

# Ensure you are in your virtual environment
python test_smoke.py

Environment Variables

If sox or soxi are not in your system PATH, you can specify their location using the SOX_PATH environment variable.


🤖 Integration

Claude Desktop

To use this server with the Claude Desktop app, add it to your configuration file.

Config Location:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Configuration Example:

{
  "mcpServers": {
    "sox-mcp": {
      "command": "C:\\path\\to\\your\\project\\.venv\\Scripts\\python.exe",
      "args": [
        "C:\\path\\to\\your\\project\\sox_mcp_server.py"
      ],
      "env": {
        "SOX_PATH": "C:\\Program Files\\sox\\sox.exe"
      }
    }
  }
}

Note: Use absolute paths for the python executable and the server script. If sox is not in your system PATH, use the SOX_PATH environment variable as shown above.

LM Studio

LM Studio supports MCP servers. To add this server:

  1. Open LM Studio.
  2. Navigate to the MCP section in the settings/sidebar.
  3. Click Add Server (or equivalent depending on your version).
  4. Select Command/Stdio as the connection type.
  5. Enter the following:
    • Command: The path to your .venv\Scripts\python.exe.
    • Arguments: The absolute path to sox_mcp_server.py.
  6. Click Save/Connect.

🛠️ Tool List

Tool Description
audio_info Get complete metadata for one or more files.
list_files List files in a directory with optional extension filtering.
convert_audio Convert audio formats and change bit depth.
resample Change the sample rate of an audio file.
remix_channels Merge, split, or swap audio channels.
trim_audio Trim time ranges or auto-trim silence.
adjust_volume Normalize or adjust gain (dB).
concatenate_audio Append, merge, or mix multiple files.
apply_effect Apply any SoX effect (reverb, EQ, etc.).
audio_stats Compute RMS, peak, and other playback statistics.
generate_tone Generate test tones or noise files.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured