MCP Audacity

MCP Audacity

MCP server that connects Codex to a local Audacity instance, enabling natural language control of audio editing, generation, analysis, and project management. It exposes validated high-level tools and an allow-listed command layer for safe automation.

Category
访问服务器

README

MCP Audacity

MCP Audacity is a Codex-ready Audacity control server created by merging, modernizing, and extending two community projects:

It connects Codex to a locally running Audacity instance through Audacity's mod-script-pipe module. This is an independent community project; it is not an official Audacity or OpenAI product.

What is inside

The server exposes tools for:

  • project, track, selection, clip, and label management;
  • recording and playback transport;
  • tone, noise, silence, rhythm, and chirp generation;
  • fades, filters, dynamics, loudness, repair, and mastering workflows;
  • spectral, loudness, peak, sample-data, and diagnostic analysis;
  • audio and label import/export;
  • optional local transcription;
  • health checks and a static, allow-listed low-level command layer.

The high-level tools validate inputs and return structured results. The low-level layer is deliberately allow-listed: the server does not expose an arbitrary command or free-form Nyquist execution endpoint.

See the complete tool catalog, command status, and live verification reports for details. Verification reports are dated snapshots; plugin-dependent availability can differ between Audacity installations.

Requirements

Before installing, make sure you have:

  • Audacity 3.x installed on the same computer as Codex;
  • Python 3.10 or newer;
  • Git;
  • Codex desktop, Codex CLI, or the Codex IDE extension;
  • permission to enable Audacity's mod-script-pipe module.

This repository has been developed and tested against Audacity 3.x. Audacity 4.x compatibility is not claimed.

Audacity scripting controls the open application directly and supports one active project at a time. Keep Audacity visible while testing so you can inspect changes and respond to dialogs. Do not run this server on a public server or an untrusted shared machine: any local process able to reach the scripting pipe may control Audacity. Read the Audacity scripting manual before enabling the module.

Installation

1. Clone the repository

git clone https://github.com/illia3/MCP-Audacity.git
cd MCP-Audacity

2. Create a virtual environment and install the server

Windows PowerShell:

py -m venv .venv
.\.venv\Scripts\python -m pip install --upgrade pip
.\.venv\Scripts\python -m pip install -e .

macOS or Linux:

python3 -m venv .venv
./.venv/bin/python -m pip install --upgrade pip
./.venv/bin/python -m pip install -e .

Optional local transcription support:

# Windows
.\.venv\Scripts\python -m pip install -e ".[transcription]"
# macOS or Linux
./.venv/bin/python -m pip install -e ".[transcription]"

Transcription dependencies and models require additional disk space and memory. A model may be downloaded the first time transcription is used.

3. Enable Audacity scripting

  1. Open Audacity.
  2. On Windows or Linux, open Edit > Preferences > Modules. On macOS, open Audacity > Preferences > Modules.
  3. Set mod-script-pipe to Enabled.
  4. Confirm the change and restart Audacity manually.
  5. Reopen the Modules page and confirm that the module is still enabled.

The module normally ships with Audacity on Windows and macOS but is disabled by default. Linux package availability varies; if it is missing, install a package or build of Audacity that includes mod-script-pipe.

4. Add the server to Codex

Use absolute paths when possible. Replace the example path with the location of your clone.

With Codex CLI on Windows:

codex mcp add audacity -- "C:\path\to\MCP-Audacity\.venv\Scripts\python.exe" -m audacity_mcp.main

With Codex CLI on macOS or Linux:

codex mcp add audacity -- "/absolute/path/to/MCP-Audacity/.venv/bin/python" -m audacity_mcp.main

Verify the registration:

codex mcp list

Alternatively, add a project-scoped .codex/config.toml to a trusted clone.

Windows example:

[mcp_servers.audacity]
command = "C:\\path\\to\\MCP-Audacity\\.venv\\Scripts\\python.exe"
args = ["-m", "audacity_mcp.main"]
cwd = "C:\\path\\to\\MCP-Audacity"
startup_timeout_sec = 20
tool_timeout_sec = 600
enabled = true
required = false
default_tools_approval_mode = "writes"

macOS or Linux example:

[mcp_servers.audacity]
command = "/absolute/path/to/MCP-Audacity/.venv/bin/python"
args = ["-m", "audacity_mcp.main"]
cwd = "/absolute/path/to/MCP-Audacity"
startup_timeout_sec = 20
tool_timeout_sec = 600
enabled = true
required = false
default_tools_approval_mode = "writes"

In the Codex desktop app, open Settings > MCP servers > Add server, enter the name and STDIO command, save, and restart Codex. Codex desktop, CLI, and the IDE extension share MCP configuration on the same host. See the official Codex MCP documentation for current configuration details.

5. Verify the connection

  1. Start Audacity and open or create one project.
  2. Restart Codex after adding the server.
  3. Use /mcp in Codex to confirm that audacity is active.
  4. Ask Codex: Run audacity_health and show the result.
  5. Then try the read-only request: Run project_get_info and summarize the open Audacity project.

Only begin editing after the health check succeeds. Use a disposable project for your first write test.

What to expect when using it

Codex starts this repository as a local STDIO MCP server. The server then sends validated commands to the currently running Audacity process through named pipes. Successful write operations appear immediately in Audacity, so you can watch and intervene between tool calls.

Important behavior:

  • keep one Audacity instance and one active project open;
  • save a backup before destructive or multi-step edits;
  • avoid manual timeline changes while a tool call is running;
  • modal dialogs can block scripting until they are closed;
  • effects and analyzers vary by Audacity version, build, installed plugins, and localization;
  • use explicit export paths and a new filename when you do not want to replace an existing file;
  • a multi-step workflow is composed of separate MCP calls, so inspect the project between steps when precision matters.

Suggested first prompts:

Check Audacity health and summarize the current project without changing it.
List all tracks, their types, mute/solo state, and approximate duration.
In a new disposable project, generate a short 880 Hz tone on its own track and keep the peak below -6 dBFS.
Analyze the current selection and recommend a cleanup chain, but do not apply any effects yet.

Troubleshooting

If audacity_health cannot connect:

  • confirm that Audacity is already running;
  • confirm that mod-script-pipe is enabled, then restart Audacity;
  • keep only one Audacity instance open;
  • restart Codex after changing MCP configuration;
  • confirm that Codex, Python, and Audacity are running on the same machine and user session;
  • check local security software and file permissions.

If a specific command is unavailable, its effect, analyzer, or plugin may not be included in your Audacity build. Check command status, install or enable the required plugin, restart Audacity, and run the health check again.

If a command appears stuck, bring Audacity to the foreground and close any modal dialog. Then retry the operation.

Development and verification

Install development dependencies and run the offline suite:

python -m pip install -e ".[dev]"
python -m pytest -q

With Audacity running and mod-script-pipe enabled, run the live integration suite:

python scripts/live_integration_test.py

The live suite edits the current Audacity project. Use a disposable project and review the script before running it.

Attribution and license

MCP Audacity incorporates and extends work from both upstream repositories named above. See THIRD_PARTY_NOTICES.md for attribution details.

Released under the Apache License 2.0.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选