add_fx
Add an FX plugin, including VSTi instruments and VST/AU effects, to a specified track by providing the track index and the exact plugin name as shown in REAPER's FX browser.
Instructions
Add an FX plugin to a track. Works for both instruments (VSTi) and effects (VST/AU). Use the exact plugin name as shown in REAPER's FX browser. Built-in Cockos plugins: ReaEQ, ReaComp, ReaDelay, ReaVerb, ReaLimit, ReaSynth, ReaSamplOmatic5000, ReaTune, ReaGate, ReaFIR, ReaXcomp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| fx_name | Yes |
Implementation Reference
- src/reaper_mcp/fx_tools.py:14-37 (handler)The add_fx handler function: adds an FX plugin to a track by name. Uses reapy's track.add_fx() to find and add the plugin. Returns success with fx_index, name, and n_params, or an error message on failure.
def add_fx(track_index: int, fx_name: str) -> dict: """ Add an FX plugin to a track. Works for both instruments (VSTi) and effects (VST/AU). Use the exact plugin name as shown in REAPER's FX browser. Built-in Cockos plugins: ReaEQ, ReaComp, ReaDelay, ReaVerb, ReaLimit, ReaSynth, ReaSamplOmatic5000, ReaTune, ReaGate, ReaFIR, ReaXcomp. """ try: project = get_project() track = project.tracks[track_index] fx_index = track.add_fx(fx_name) if fx_index < 0: return {"success": False, "error": f"Plugin not found: '{fx_name}'"} fx = track.fxs[fx_index] return { "success": True, "fx_index": fx_index, "name": fx.name, "n_params": fx.n_params, "track_index": track_index, } except Exception as e: logger.error(f"add_fx failed: {e}") return {"success": False, "error": str(e)} - src/reaper_mcp/fx_tools.py:14-14 (schema)The function signature defines the schema: parameters track_index (int) and fx_name (str), returns dict.
def add_fx(track_index: int, fx_name: str) -> dict: - src/reaper_mcp/fx_tools.py:11-13 (registration)The tool is registered via the @mcp.tool() decorator inside register_tools(mcp), which is called from server.py.
def register_tools(mcp): @mcp.tool() - src/reaper_mcp/server.py:13-23 (registration)Import and invocation of fx_tools.register_tools (aliased as _reg_fx) in the main server module.
from reaper_mcp.fx_tools import register_tools as _reg_fx from reaper_mcp.audio_tools import register_tools as _reg_audio from reaper_mcp.mixing_tools import register_tools as _reg_mixing from reaper_mcp.render_tools import register_tools as _reg_render from reaper_mcp.mastering_tools import register_tools as _reg_mastering from reaper_mcp.analysis_tools import register_tools as _reg_analysis _reg_project(mcp) _reg_track(mcp) _reg_midi(mcp) _reg_fx(mcp) - src/reaper_mcp/connection.py:27-29 (helper)The get_project helper function used by add_fx to ensure REAPER connection and get the active project.
def get_project() -> reapy.Project: ensure_connected() return reapy.Project()