Skip to main content
Glama

MCP RIR

License: MIT Python MCP

Room impulse responses from a plain description, via pyroomacoustics.

An MCP server that lets any compatible agent generate an IR from natural language and write it where you want. Describe a space in any language and the calling model turns it into room dimensions, an absorption coefficient and mic/source positions.

Useful for matching a room you no longer have access to (dry foley or dialogue recorded on location, with no IR captured at the time), and for building reverbs that are realistic, impossible, or somewhere between.

Example

"a stairwell, mic near the wall, quite reverberant, put it in my samples folder"

2.4 × 4.8 × 11.2 m · absorption 0.06 (wet) · mic near wall · source near wall
2.33 s stereo, 48000 Hz
/Users/you/Music/samples/medium_near_wall_wet_b7b2.wav

The result loads into any convolution reverb.

Anything left unspecified is randomised. Values you do supply are used as given, but exact mic placement and per-wall absorption are redrawn on every call, so the same numbers twice produce a different take. Call again to reroll.

Related MCP server: strudel-ai

Setup

Requires uv. Add the following to your MCP client configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and restart the client:

{
  "mcpServers": {
    "rir": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/tbimbato/MCP_RiR", "mcp-rir"],
      "env": {
        "RIR_OUTPUT_DIR": "~/Music/IRs"
      }
    }
  }
}

The first launch takes a minute while pyroomacoustics is fetched.

RIR_OUTPUT_DIR sets the default destination. Without it, files land in ~/RIR-MCP/. A destination can also be given per request ("put it in my samples folder", "call it hallway.wav").

The tool

generate_room_ir. Every argument is optional.

argument

description

width_m, length_m, height_m

room size in metres, 0.5 to 40

absorption

surface reflectivity, 0.02 to 0.95. Bare tile or concrete around 0.05, plaster 0.15, carpeted 0.3, heavily treated 0.5

mic_position, source_position

center, corner or near wall

output_path

a folder, or a full path ending in .wav

Output is a stereo 48 kHz 24-bit WAV, peak-normalised, capped at 20 seconds. Out-of-range values are clamped rather than rejected, and the reply says so.

Ranges, defaults and the parameters that shape the sound are in src/mcp_rir/config.py.

Roadmap

  • Stereo output, 48 kHz 24-bit, peak-normalised.

  • Per-request output path, so files land where you ask.

  • Microphone directivity. The pair is currently two omnidirectional capsules, the weakest option for stereo image. Cardioid, hypercardioid and figure-of-eight patterns would allow real techniques (XY, ORTF, Blumlein) and widen the image considerably.

  • Multichannel output. Quad and octophonic. Adding microphones to the same simulation is inexpensive; the work is picking layouts that convolvers actually accept.

  • Ambisonic B-format (first order, W/X/Y/Z). Higher priority than a fixed quad, since it decodes to any speaker arrangement afterwards.

  • Room rendering. An image of the simulated geometry with mic and source positions, written next to the WAV, to see what was generated without loading the file.

  • Non-shoebox geometry. Arbitrary polygonal footprints extruded to 3D: L-shaped rooms, narrow corridors, concave spaces that focus reflections. No new dependencies needed.

  • Post-processing tool. Reshaping an existing impulse response: reversed decay, gated tails, extreme time stretch. Taking a file path means it would work on impulse responses not generated here.

  • Tuning. The default ranges are informed guesses, not yet adjusted by ear.

Suggestions and contributions welcome.

Development

git clone https://github.com/tbimbato/MCP_RiR
cd MCP_RiR
pip install -e .

Point the configuration at that checkout:

{
  "mcpServers": {
    "rir": {
      "command": "/path/to/your/python",
      "args": ["-m", "mcp_rir.server"]
    }
  }
}

License

MIT

Available Tools

1 tool
generate_room_irA

Simulate a room and write a stereo impulse response WAV for convolution reverb. Returns a summary and the file path.

Translate the space the user described into dimensions and an absorption coefficient, following the guidance on each argument. Omitted arguments are randomised. Repeated calls vary even with identical arguments, so call again to get a different take on the same room.

Inputs: width_m, height_m, length_m, absorption, +3 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion. The tool's purpose is clearly defined and distinct.

    Naming Consistency5/5

    The single tool name 'generate_room_ir' follows a clear verb_noun pattern and is descriptive, with no inconsistent conventions.

    Tool Count4/5

    The server has exactly one tool, which is on the low end but reasonable for the very specific purpose of generating room impulse responses. It is not excessive, and the narrow scope justifies the minimal count.

    Completeness5/5

    The tool fully covers the stated capability of simulating a room and writing a stereo impulse response WAV. There are no obvious missing operations within the declared domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to generate and control real-time audio synthesis through natural language descriptions using SuperCollider. Features 10 built-in synth types, pattern sequencing, audio recording, and server lifecycle management for creating sounds from simple English descriptions.
      11
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to create and edit Strudel music code, render offline WAV audio, and obtain structured hearing reports with waveform, spectrogram, BPM, and onset analysis.
      AGPL 3.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables coding agents to synthesize and play video-game sound effects by translating natural-language descriptions into layered synthesis specs, then rendering normalized WAV files.
      9
      MIT