Audacity MCP Server
Controls Audacity audio software via mod-script-pipe, enabling AI-driven audio generation, effects processing, file import/export, and project management with full parameterized tool calls.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Audacity MCP ServerGenerate a 440 Hz sine tone for 10 seconds and export it as WAV."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Audacity MCP Server
MCP (Model Context Protocol) server for controlling Audacity through mod-script-pipe. Designed for hands-off LLM-driven audio pipelines — Claude Code (or any MCP client) can generate, process, and export audio entirely through tool calls with no manual Audacity interaction required.
Features
Connects to Audacity via
mod-script-pipeThread-safe — all pipe I/O is serialized through a lock and run off the event loop via
asyncio.to_thread, so rapid sequential tool calls never interleaveGenerator tools work on empty projects — if no tracks exist the server writes a silent WAV to
/tmp, imports it, and uses it as the generation target (Audacity'sDurationscripting parameter is silently ignored; a selection is required)Full parameterized tools for
Export2,Import2,Select,GetInfo,SetTrackStatus,SetTrackAudio,OpenProject2,SaveProject2Compound
generate_and_exporttool that handles an entire generate → select → export → cleanup cycle in one callAuto-detects pipe path suffix in
/tmp(e.g..501)Uses
stdiotransport (compatible with Claude Code, Claude Desktop, Codex)
Related MCP server: reaper-reapy-mcp
Requirements
Audacity 3.x+
Python 3.10+
mod-script-pipeenabled in Audacity (see below)
Install
git clone https://github.com/DaRealDaHoodie/mcp-audacity.git
cd mcp-audacity
./scripts/setup.shManual setup:
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install "mcp[cli]>=1.6.0" "httpx>=0.28.1"Enable mod-script-pipe in Audacity
Open Audacity.
Go to Modules preferences:
macOS:
Audacity → Settings → ModulesWindows/Linux:
Edit → Preferences → Modules
Set
mod-script-pipefromNeworDisabledtoEnabled.Restart Audacity.
Verify the pipes exist:
ls -l /tmp/audacity_script_pipe.to.* /tmp/audacity_script_pipe.from.*If both files appear, Audacity is ready.
Quick smoke test
# Audacity must already be running with mod-script-pipe enabled
./scripts/smoke_test.shRun the server
./scripts/run.shExpected startup log:
Audacity MCP server starting up
Opened Audacity mod-script-pipe
Connected to Audacity mod-script-pipeConnect from Claude Code
Add to your MCP config (e.g. ~/.claude/claude_desktop_config.json or via claude mcp add):
{
"mcpServers": {
"audacity": {
"command": "/absolute/path/to/mcp-audacity/.venv/bin/python",
"args": ["/absolute/path/to/mcp-audacity/audacity_mcp_server.py"]
}
}
}Connect from Codex
codex mcp add AudacityMCP -- /absolute/path/to/mcp-audacity/.venv/bin/python /absolute/path/to/mcp-audacity/audacity_mcp_server.pyTool reference
Generator tools
All generators work on empty projects. If no tracks exist, the server automatically creates a silent track of the correct duration in /tmp, imports it, and runs the generator against it (the generator replaces the silence). If tracks already exist, the generator applies to the current selection as usual.
Why the workaround? Audacity's scripting API silently ignores the
Durationparameter — generators always require an existing track with a selection. The server handles this transparently so you never have to think about it.
Tool | Key parameters | Notes |
|
| |
|
| |
|
| Frequency sweep |
|
| |
|
| Phone keypad tones |
|
| Click track |
|
| |
|
| Full Nyquist/Lisp DSP expression run against the selection, e.g. |
Effect tools
All effects below are fully parameterized and apply without opening any dialog.
Tool | Key parameters | Notes |
|
|
|
|
|
|
|
| Peak normalization — different from LUFS loudness |
|
| Uses Audacity's LegacyCompressor internally |
|
| Hard ceiling; use after compression |
|
| All values 0–100 except gains (dB) |
|
| Simple echo/repeat effect |
|
| Repeats selection; total plays = count + 1 |
|
| Percentage shift e.g. 50.0 ≈ one octave up |
|
| Changes speed and pitch together |
|
| Changes tempo without affecting pitch |
|
| action: |
|
| Extreme time-stretch; |
|
| EQ adjustment, ±30 dB range |
|
| Removes clicks and pops |
| (no parameters) | Applies using last captured profile — see note below |
|
| Gate or analyze mode |
|
| Cuts below frequency |
|
| Cuts above frequency |
|
| Removes a specific frequency; higher Q = narrower notch |
|
| More control than plain FadeIn/FadeOut |
|
| Amplitude modulation; lfo in Hz |
| (no parameters) | Mix stereo track down to mono |
Remaining effects with no meaningful automation parameters (FadeIn, FadeOut, Reverse, Invert, Repair, etc.) are available as no-parameter tools — they apply with Audacity's defaults.
cmd_NoiseReduction — manual profile required
Audacity's scripting API exposes no parameters for NoiseReduction. The two-pass profile capture cannot be automated. Workflow:
In Audacity, select a region containing only background noise
Effects → Noise Reduction → Get Noise ProfileSelect the audio you want to clean
Call
cmd_NoiseReduction— it applies the last captured profile
For fully automated noise cleanup, use cmd_NoiseGate instead (fully parameterized, no manual step).
Macro tool
Tool | Key parameters | Notes |
|
| Runs a saved Audacity macro by exact name. Use Macro Manager in Audacity to create macros that chain any sequence of effects. |
Macros are the most powerful tool for complex repeatable pipelines — build a chain once in Audacity, then fire it from Claude with a single cmd_ApplyMacro call.
File tools
Tool | Key parameters | Notes |
|
| Import audio as new track |
|
| Format inferred from extension: |
|
| Open |
|
| Save |
Selection and track tools
Tool | Key parameters | Notes |
|
| Combined time + track selection |
|
| Time-only selection; relative_to: ProjectStart/ProjectEnd/SelectionStart/etc. |
|
| Track-only selection |
|
| Inspect project state. Use |
|
| Rename or select/deselect a track |
|
| Set mix properties |
|
| Edit an existing label's text or time range |
|
| Move or recolor a clip |
|
| Add, move, or remove a volume envelope point |
|
| Detect beats and add labels |
|
| Auto-label by sound/silence detection |
| (no parameters) | Convert stereo to mono |
Preference tools
Tool | Key parameters | Notes |
|
| Read any Audacity preference, e.g. |
|
| Write any Audacity preference. |
Common preference keys for pipelines:
Key | What it controls |
| Default sample rate for new projects (e.g. |
| Bit depth: |
| Playback device name |
Compound workflow tool
cmd_generate_and_export
Handles an entire generate-and-export cycle in one call. Useful for batch pipelines where you want to produce many audio files without orchestrating individual steps.
generator: Noise | Tone | Chirp | Pluck
duration: seconds (float)
output_path: absolute path including filename and extension
format is inferred from extension: .wav .ogg .flac .aiff
amplitude: 0.0–1.0
frequency: Hz (for Tone/Chirp/Pluck)
noise_type: White | Pink | Brownian (Noise only)
waveform: Sine | Square | Sawtooth (Tone/Chirp only)
num_channels: 1 (mono) or 2 (stereo)Internally it runs: generate → SelectAll → Export2 → TrackClose. Because exactly one track is created per call, a single TrackClose: leaves the project empty and ready for the next iteration without opening a new Audacity window on each call.
Example prompt to Claude:
"Generate 5 WAV files: white noise 2s, 440Hz sine 1s, 880Hz sawtooth 1s, pink noise 3s, and a plucked A4 1s. Save them to ~/sounds/ as noise_white.wav, tone_440.wav, tone_880_saw.wav, noise_pink.wav, pluck_a4.wav."
Pipeline architecture
How it works
Claude Code
│
▼ MCP tool calls (stdio)
audacity_mcp_server.py
│
▼ named pipe (mod-script-pipe)
Audacity 3.x
│
▼ file output
/your/output/directory/Important constraints
One pipe, one process. Audacity's mod-script-pipe creates a single pair of FIFOs. The MCP server opens them and holds them for its lifetime. No other process should open the same pipes while the server is running — if a standalone script also tries to read pipe_from, responses will be split between the two readers and both will get corrupted output. All Audacity interaction should go through this server.
Commands are sequential. The threading lock means every tool call waits for BatchCommand finished before the next command is sent. This is safe for rapid sequential calls but means there is no parallelism on the Audacity side by design.
Audacity must be running. The server does not launch Audacity. Start Audacity with mod-script-pipe enabled before starting the server.
When to use Audacity vs Python + ffmpeg
For pure audio synthesis and format conversion, Python's wave module + ffmpeg is simpler and has no pipe constraints. Use this server when you need Audacity specifically:
Need | Use |
Synthesize tones, noise, sweeps | Either — Audacity via this server or Python + ffmpeg |
Batch OGG/MP3 export + loudness normalization | ffmpeg ( |
Noise reduction, click/crackle removal | Audacity — stronger algorithms |
Nyquist scripting | Audacity only |
Load an existing | Audacity only |
LLM-driven batch generation of many files |
|
Troubleshooting
Symptom | Fix |
| Confirm Audacity is running with mod-script-pipe enabled; check |
| Use absolute paths in MCP config |
| This should not occur with the MCP tools — they auto-bootstrap a silent track on empty projects. If you see this, confirm you are calling |
| The macro name must match exactly as shown in Audacity's Macro Manager (case-sensitive). Verify the macro exists before calling |
Nyquist command errors | Expressions must be valid Nyquist/Lisp. The |
Commands time out or return empty | Another process is reading |
Tools behave inconsistently across calls | Ensure you are on the latest version; it serializes all commands through a lock and reads until |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/PiMPStudios/mcp-audacity'
If you have feedback or need assistance with the MCP directory API, please join our Discord server