Carla MCP Server
Enables complete control over the Carla audio plugin host through natural language, providing 45 tools across session management, plugin control, audio routing, parameter automation, and real-time analysis for professional audio production workflows.
README
Carla MCP Server
A comprehensive Model Context Protocol (MCP) server for complete control over the Carla audio plugin host. This server enables natural language control of professional audio production workflows through Large Language Models.
🎯 Project Overview
The Carla MCP Server provides 45 tools across 7 functional categories for complete audio production control. Built with Python 3.12+, it offers a production-ready interface between AI assistants and professional audio software.
Key Features:
- 🤖 AI-Native: Designed for natural language control through LLMs
- 🎛️ Complete Control: 45 tools covering every aspect of audio production
- ⚡ Real-Time: Low-latency monitoring and analysis capabilities
- 🔧 Professional: Production-ready with comprehensive error handling and type safety
- 📈 Scalable: Modular architecture supporting complex workflows
🌟 What You Can Do
Ask an AI assistant to help with professional audio tasks:
- "Load my mixing project and set up a drum bus with compression"
- "Create a filter sweep effect on the lead synth, sync it to tempo"
- "Analyze my mix and suggest improvements for better frequency balance"
- "Set up parallel compression for vocals with different verse/chorus settings"
- "Prepare this session for live performance with low latency"
🎛️ Complete Feature Set
🗂️ Session Management (8 tools)
- Load/save projects with auto-connection
- Create A/B snapshots for comparison
- Hot-swap between sessions with crossfading
- Export/import multiple formats
- Session cleanup and optimization
🔌 Plugin Control (8 tools)
- Load VST2/3, LV2, LADSPA, DSSI, AU, SF2/SFZ plugins
- Scan directories for available plugins
- Clone and replace plugins with parameter mapping
- Batch processing with plugin chains
- Real-time plugin state control
🔗 Audio Routing (7 tools)
- Complex audio/MIDI routing matrix
- Bus creation and management with grouping
- Sidechain configuration for compression
- Real-time routing matrix inspection
🎚️ Parameter Automation (8 tools)
- Advanced automation with multiple curve types
- MIDI CC mapping with custom ranges
- Macro controls for multiple parameters
- Direct parameter get/set operations
- Real-time parameter control and monitoring
📊 Real-Time Analysis (5 tools)
- Spectrum analysis with customizable FFT
- Audio level metering (Peak, RMS, LUFS)
- Latency measurement and optimization
- Feedback loop detection and prevention
- Parameter capture over time
🔊 JACK Integration (6 tools)
- JACK port management and connections
- System audio routing
- Port monitoring and status
- Auto-connection for plugins
- Connection stability verification
🖥️ Hardware Control (3 tools)
- Audio interface configuration
- Device discovery and management
- Control surface mapping
- Monitor calibration support
🚀 Installation
Prerequisites
-
Carla Audio Plugin Host
# Ubuntu/Debian sudo apt install carla carla-dev # Or build from source for latest features git clone https://github.com/falkTX/Carla.git cd Carla make sudo make install -
Python Environment
# Requires Python 3.12+ python3 --version # Should be 3.12 or higher -
Audio System
# JACK Audio Connection Kit (recommended) sudo apt install jackd2 jack-tools # For Windows VST support on Linux sudo apt install wine wine32 wine64
Setup
-
Clone and Install
git clone https://github.com/your-org/carla-mcp-server.git cd carla-mcp-server # Install dependencies pip install -r requirements.txt # Or install with development tools pip install -e ".[dev]" -
Configure Environment
# Set Carla path (adjust to your installation) export CARLA_PATH=/usr/share/carla export PYTHONPATH=$CARLA_PATH/source/frontend:$PYTHONPATH export LD_LIBRARY_PATH=/usr/lib/carla:$LD_LIBRARY_PATH -
Test Installation
# Run test suite pytest tests/ # Test Carla integration python -c "import carla_backend; print('Carla integration working!')"
🎮 Usage
Quick Start
# Start the MCP server
python server.py
# Or with debugging
python server.py --debug --log-level INFO
MCP Client Integration
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"carla-mcp": {
"type": "stdio",
"command": "python",
"args": ["/path/to/carla-mcp-server/server.py"],
"env": {
"CARLA_PATH": "/usr/share/carla",
"PYTHONPATH": "/usr/share/carla/source/frontend"
}
}
}
}
Natural Language Examples
Once connected to an LLM, you can use natural language for complex audio tasks:
Basic Mixing Session
User: "Load my rock song project and add an EQ to remove vocal rumble and
improve my vocal clarity."
AI: Perfect! I've loaded your project, and optimized your microphone EQ
for professional vocal quality:
🎯 Vocal Optimization Applied:
✅ Rumble Removal:
- 50Hz: -12dB (removes sub-bass rumble)
- 100Hz: -8dB (reduces low-frequency noise)
- 156Hz: -6dB (cleans up muddy low-mids)
✅ Clarity Enhancement:
- 2500Hz: +4dB (vocal presence)
- 3500Hz: +6dB (speech intelligibility)
- 5000Hz: +3dB (clarity and definition)
✅ Sibilance Reduction:
- 10000Hz: -4dB (tames harsh 's' and 't' sounds)
Your microphone signal is now routed through the optimized EQ, providing cleaner, more
professional vocal sound with reduced rumble, enhanced clarity, and controlled sibilance. The settings follow standard pop/rock vocal processing techniques.
Creative Sound Design
User: "Create an evolving filter sweep on the synth pad that builds tension"
AI: I'll create a dynamic filter automation that builds tension:
1. Finding your synth pad plugin
2. Setting up exponential filter frequency automation
3. Adding resonance automation for more character
4. Syncing the sweep to your project tempo
Created a 16-bar filter sweep that starts subtle and builds to an
intense peak, perfect for creating tension in your arrangement.
Problem Solving
User: "Something sounds muddy in my mix and there's a slight feedback"
AI: Let me analyze and fix those issues:
1. Running spectrum analysis to identify muddy frequencies
2. Scanning for feedback loops in your routing
3. Applying corrective EQ to clear up the muddiness
4. Fixing the feedback path I found
Analysis complete! Found buildup around 200-300Hz (applied corrective EQ)
and fixed a feedback loop between your reverb send and input.
Your mix should sound much cleaner now.
Analyze A Mix's Song Structure
User: "Analyze my VU meter's levels for the duration of my song and using
the historic measurement data, identify where in the timecode each verse,
chorus, and solo section begins."
AI: Let me begin analyzing your VU meter plugin for 05:32 minutes (the exact
length of your mix, plus two seconds to accommodate for a slight delay in playback.)
...
Completed my analysis of your VU meter levels! Here is a breakdown of your song's
musical structure based on the historical measurements data I procssed:
1. 00:02 - Intro
2. 00:28 - First verse
3. 01:20 - First chorus
4. 01:50 - Second verse
5. 2:45 - Second chorus
6. 3:32 - Solo
7. 4:02 - Breakdown
8. 4:20 - Last chorus
9. 5:12 - Outro
🛠️ Development
Project Structure
carla-mcp-server/
├── server.py # Main MCP server
├── carla_controller.py # Carla backend wrapper
├── tool_registry.py # Tool registration system
├── types.py # Type definitions
├── base_tools.py # Base tool framework
├── tools/ # MCP tool implementations
│ ├── session_tools.py # Session management
│ ├── plugin_tools.py # Plugin control
│ ├── routing_tools.py # Audio routing
│ ├── parameter_tools.py # Parameter automation
│ ├── analysis_tools.py # Real-time analysis
│ ├── jack_tools.py # JACK integration
│ └── hardware_tools.py # Hardware control
├── monitors/ # Real-time monitoring
│ ├── audio_monitor.py # Audio level monitoring
│ ├── cpu_monitor.py # Performance monitoring
│ └── event_monitor.py # Event streaming
├── tests/ # Comprehensive test suite
└── config/ # Configuration files
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=carla_mcp_server --cov-report=html
# Run specific test category
pytest tests/test_server.py::TestSessionManagement
# Run integration tests (requires Carla)
pytest tests/test_complete_suite.py
Code Quality
# Format code
black carla_mcp_server/
# Sort imports
isort carla_mcp_server/
# Type checking
mypy carla_mcp_server/
# Linting
flake8 carla_mcp_server/
# Run all quality checks
pre-commit run --all-files
Adding New Tools
-
Create Tool Method in appropriate
tools/module:async def my_new_tool(self, param1: str, param2: int = 10) -> dict: """Tool description for documentation.""" try: # Implementation return {"success": True, "result": data} except Exception as e: return {"success": False, "error": str(e)} -
Register Tool in
tool_registry.py:ToolDefinition( name="my_new_tool", description="Description for MCP clients", handler="tool_class_name", input_schema={/* JSON schema */} ) -
Add Tests in
tests/:async def test_my_new_tool(): # Test implementation
🧩 Complete Tool Reference
Session Management
load_session- Load Carla project filessave_session- Save current session statecreate_snapshot- Create A/B comparison snapshotsswitch_session- Hot-swap between sessionslist_sessions- Show available sessionsdelete_session- Remove sessionsexport_session- Export to audio formatsimport_session- Import from external formats
Plugin Control
load_plugin- Load any plugin formatscan_plugins- Discover available pluginscontrol_plugin- Activate/bypass/solo/removebatch_process- Apply plugin chains to audiolist_plugins- Show loaded pluginsget_plugin_info- Detailed plugin informationclone_plugin- Duplicate plugins with settingsreplace_plugin- Swap plugins with parameter mapping
Audio Routing
connect_audio- Create audio connectionscreate_bus- Build audio buses for groupingsetup_sidechain- Configure sidechain routingget_routing_matrix- View complete routingdisconnect_audio- Remove connectionscreate_send- Set up send/return effectsset_connection_gain- Adjust connection levels
Parameter Automation
automate_parameter- Create automation curvesmap_midi_cc- MIDI controller mappingcreate_macro- Multi-parameter macrosrecord_automation- Capture parameter changesset_parameter- Set plugin parameter values directlyget_parameter- Get plugin parameter values and inforandomize_parameters- Creative randomizationmorph_parameters- Smooth parameter transitions
Real-Time Analysis
analyze_spectrum- FFT spectrum analysismeasure_levels- Peak/RMS/LUFS meteringcapture_plugin_parameters- Parameter monitoringdetect_feedback- Feedback loop detectionanalyze_latency- System latency measurement
JACK Integration
list_jack_ports- Show available JACK portsconnect_jack_ports- Connect JACK portsdisconnect_jack_ports- Disconnect JACK portsget_jack_connections- View port connectionsconnect_system_to_plugin- Route system audio to pluginsconnect_plugin_to_system- Route plugins to system output
Hardware Control
configure_audio_interface- Set up audio hardwarelist_audio_devices- Discover audio devicesmap_control_surface- Configure MIDI controllers
📖 Documentation
- API.md - Complete tool reference with examples
- ARCHITECTURE.md - Technical architecture documentation
- CONTRIBUTING.md - Development guidelines
🔧 Configuration
Server Configuration (config/config.yaml)
server:
host: localhost
port: 8765
log_level: INFO
carla:
path: /usr/share/carla
wine_prefix: ~/.wine
auto_start_engine: true
audio:
driver: JACK
sample_rate: 48000
buffer_size: 512
auto_connect: true
plugins:
scan_paths:
- /usr/lib/lv2
- /usr/lib/vst
- ~/.wine/drive_c/Program Files/Common Files/VST3
cache_enabled: true
monitoring:
audio_enabled: true
cpu_enabled: true
update_interval_ms: 100
Environment Variables
# Essential paths
export CARLA_PATH=/usr/share/carla
export PYTHONPATH=$CARLA_PATH/source/frontend:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/lib/carla:$LD_LIBRARY_PATH
# Optional configuration
export CARLA_MCP_LOG_LEVEL=INFO
export CARLA_MCP_HOST=localhost
export CARLA_MCP_PORT=8765
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Quick Contribution Steps:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
📄 License
This project is licensed under the GPL-2.0-or-later License - see the LICENSE file for details.
🙏 Credits
- Built on top of Carla by falkTX
- Uses the Model Context Protocol by Anthropic
- Inspired by the audio production community
📞 Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: See
docs/directory - Community: Join the Carla Discord community
Ready to revolutionize your audio production workflow with AI assistance? Get started today! 🎵✨
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。