mcp-fadr-server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-fadr-server
An MCP (Model Context Protocol) server that integrates the Fadr API, enabling LLMs to separate audio stems, extract MIDI, and analyze chord progressions, key, and tempo from audio files via structured MCP tool calls.
Features
Stem separation — split any audio track into vocals, bass, drums, melodies, and instrumental
MIDI extraction — get MIDI files for each stem and the full chord progression
Music analysis — detect key, tempo (BPM), time signature, and chord progression
Structured outputs — every tool response is a strictly-typed JSON envelope; no free-text
Secure by default — SSRF-safe URL validation, secrets never logged, HTTPS-only
Async polling — handles Fadr's async task lifecycle transparently
Fully typed — Python 3.11+, Pydantic v2, mypy strict mode
Testable — mockable Fadr client, ≥ 80% test coverage enforced in CI
Related MCP server: mcp-daw
Architecture Overview
MCP Client (LLM host)
│ JSON-RPC / stdio
▼
Transport Layer ← MCP protocol handling, tool registration
│
▼
Tools Layer ← Input validation, response envelope wrapping
│
▼
Service Layer ← Fadr pipeline orchestration, output normalization
│
▼
Client Layer ← All HTTP calls to api.fadr.com (mockable)
│
▼
Schema Layer ← Pydantic v2 models, JSON Schema exportSee docs/architecture.md for the full layer diagram and design decisions.
Quickstart
1. Install
git clone https://github.com/ebuart/mcp-fadr-server.git
cd mcp-fadr-server
python -m venv .venv && source .venv/bin/activate
pip install -e .2. Configure
cp .env.example .env
# Set your Fadr API key:
echo "FADR_API_KEY=your_key_here" >> .env3. Run
mcp-fadrThe server listens on stdio and is designed to be launched by an MCP host.
4. Claude Desktop Integration
Claude Desktop does not inherit your shell PATH, so you must use the absolute path to the binary.
Find it with:
which mcp-fadrThen add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"fadr": {
"command": "/absolute/path/to/mcp-fadr",
"env": {
"FADR_API_KEY": "your_key_here"
}
}
}
}Restart Claude Desktop. You can now ask Claude to separate stems, extract MIDI, or analyze music.
Example Tool Calls
Separate stems
{
"tool": "separate_stems",
"params": {
"audio_url": "https://example.com/my-song.mp3",
"quality": "hqPreview"
}
}Response:
{
"success": true,
"data": {
"job_id": "64f1a2b3c4d5e6f7a8b9c0d1",
"processing_time_ms": 187340,
"stems": [
{ "name": "vocals", "url": "https://..." },
{ "name": "bass", "url": "https://..." },
{ "name": "drums", "url": "https://..." },
{ "name": "melodies", "url": "https://..." },
{ "name": "instrumental", "url": "https://..." }
]
},
"error": null
}Extract MIDI
{
"tool": "extract_midi",
"params": {
"audio_url": "https://example.com/my-song.mp3"
}
}Analyze music
{
"tool": "analyze_music",
"params": {
"audio_url": "https://example.com/my-song.mp3"
}
}Response:
{
"success": true,
"data": {
"job_id": "64f1a2b3c4d5e6f7a8b9c0d3",
"processing_time_ms": 19850,
"key": "A minor",
"tempo_bpm": 128.0,
"time_signature": "4/4",
"chord_progression": [
{ "chord": "Am", "start_beat": 1, "duration_beats": 4 },
{ "chord": "F", "start_beat": 5, "duration_beats": 4 }
]
},
"error": null
}Full schema documentation: docs/api_contract.md
Configuration
ENV Variable | Required | Default | Description |
| Yes | — | Fadr API bearer token |
| No |
| Fadr API base URL |
| No |
| HTTP request timeout (seconds) |
| No |
| Task polling interval (seconds) |
| No |
| Max task wait time (seconds) |
| No |
| Retry count on transient HTTP errors |
| No |
| Log level ( |
| No |
| Comma-separated allowed URL schemes |
| No |
| Max audio download size in MB |
See docs/security.md for security guidance on each variable.
Requirements
Python 3.11+
Fadr Plus subscription ($10/month) — required for API access
Fadr charges $0.05 per minute of audio processed
Development
pip install -e ".[dev]"
pytest --cov=server --cov-fail-under=80
ruff check .
mypy server/Full guide: docs/development.md
Troubleshooting
Server not appearing in Claude Desktop
Verify
mcp-fadris on yourPATH:which mcp-fadrCheck the
FADR_API_KEYis set in the Claude Desktop config env blockRestart Claude Desktop after config changes
Check MCP server logs: Claude Desktop writes them to
~/Library/Logs/Claude/
INVALID_URL error
Ensure the audio URL uses
https://(nothttp://)Ensure the URL is publicly accessible (no authentication required)
Check the file extension is a supported audio format:
mp3,wav,aac,flac,ogg,m4a
TASK_TIMEOUT error
Stem separation typically takes 2–4 minutes; this is normal
Increase
FADR_POLL_TIMEOUT_S(default: 300) if processing very long filesCheck Fadr's status page for service disruptions
DOWNSTREAM_ERROR with HTTP 401
Your
FADR_API_KEYis invalid or expiredEnsure your Fadr Plus subscription is active
DOWNSTREAM_ERROR with HTTP 402
You have exceeded your Fadr billing threshold
Check your usage at fadr.com
High latency
Stem separation typically takes 2–4 minutes; this is expected
The server polls every
FADR_POLL_INTERVAL_S(default: 5s); reduce to 3s for faster responsesNetwork latency between the server and Fadr adds overhead
License
MIT — see LICENSE
Docs Index
docs/api_contract.md — Tool schemas, input/output definitions
docs/architecture.md — Layer design, data flow, design decisions
docs/security.md — Key handling, URL validation, logging rules
docs/development.md — Local setup, testing, linting, CI
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
FFmpeg as a service for AI agents: typed video editing tools, async jobs, downloadable outputs.
Audio analysis and production jobs: BPM, key, fingerprint, tags, stems, cleanup, mastering.
Convert, lint and generate LLM tool schemas for OpenAI, Anthropic, Gemini and MCP
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnables LLMs to analyze music (genre, mood, tempo, key), separate audio stems, detect AI-generated music, and measure loudness using IRCAM Amplify's audio processing APIs.5-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to build songs by editing a JSON song model: searching a licence-tagged sample library, adding step-pattern and time-stretched loop tracks, setting gain/pan, describing songs, and rendering them to 44.1 kHz WAV/MP3 with release-safety warnings. Songs and renders are read from and written to a project root, so an agent can go from empty project to finished track through MCP tool calls.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform deterministic, sample-accurate music production, DJ mixing, audio editing, stem separation, and loudness mastering through non-destructive timeline operations and structured MCP tools.Mozilla Public 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and scripts to edit, convert, repair, separate, tune, transcribe, notate, mix, and master audio through stable versioned JSON commands, with provenance sidecars and replayable, reproducible results. Every capability is exposed as tooling an agent can chain without a GUI, including dry runs, schema introspection, and pass/fail quality gates.5Apache 2.0