audio-mcp
# audio-mcp
A mock-first [Model Context Protocol](https://modelcontextprotocol.io/) server for
audio generation. It creates deterministic placeholder WAV files locally, making
it possible to develop and test an audio-tool workflow without credentials,
network calls, or generation fees.
## Tools
- `generate_music(prompt, duration_seconds=2.0)`
- `generate_sound_effect(prompt, duration_seconds=1.0)`
- `get_generation_status(generation_id)`
Generation calls complete synchronously and return a generation ID plus a local
asset containing its path, file URI, MIME type, format, and duration. Durations
must be between 0.1 and 30 seconds.
## Development
Python 3.10 or newer is required.
```bash
python -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
pytest
```
The integration test launches the STDIO server, initializes an MCP client, lists
the tools, calls every tool, and checks the generated WAV asset.
## Run the server
The default transport is STDIO:
```bash
python -m audio_mcp.server
```
Generated files are written to `.audio-mcp/`. Override that location with
`AUDIO_MCP_OUTPUT_DIR`.
To register a development checkout with Codex CLI:
```bash
codex mcp add audio-dev -- python -m audio_mcp.server
codex mcp list
```
The server intentionally has no paid provider integration. A production provider
can later implement the same asset response contract once the MCP workflow has
been validated.
TDQS
Scored across 3 tools
Each tool has a distinct purpose: generating music, generating sound effects, and checking generation status. The two generation tools are clearly separated by output type, and the status tool is orthogonal to the generation actions.
All tool names follow a consistent verb_noun pattern using snake_case: generate_music, generate_sound_effect, and get_generation_status. The naming is uniform and predictable.
Three tools is on the lean side but appropriate for a focused mock audio generation service. The set covers the essential operations without superfluous additions.
The tools cover the core workflow of starting a generation and checking its status. Minor gaps like canceling or listing generations exist but are not critical for a mock service.