# Connect an AI agent to Mirli

Connect Claude Code, Cursor, Codex or another AI assistant to Mirli so it can make sound for you: effects written
straight into your project, or a voiced scene laid out in the studio for you to keep editing. It all runs on your
computer, and every sound lands in your library.

## Before you begin

- Mirli is open. The connection is on whenever the app runs; there is nothing to turn on.
- Your assistant supports MCP servers. Every assistant in this guide does.

## Find the address

1. In the Mirli sidebar, click **Agents**.

   The **Agents** page opens, with the address in the **Connect an agent** card.

   ![The Agents page, with the Connect an agent card showing the MCP address and the Connected agents card listing three assistants](https://github.com/HamSanders/soundbox/blob/main/site/public/docs/agents/connect.webp)

2. Under **Streamable HTTP (preferred)**, check the address. If it is not `http://127.0.0.1:17494/mcp`,
   use yours in the next section.

## Connect your assistant

1. Add Mirli to your assistant: run the command on its tab, or add the entry to its settings file. If the file already
   lists other servers, add the `soundbox` entry next to them instead of replacing them.

   The command or entry for each assistant:

   ```bash title="Claude Code"
   claude mcp add --transport http -s user soundbox http://127.0.0.1:17494/mcp
   ```

   ```bash title="Codex"
   codex mcp add soundbox --url http://127.0.0.1:17494/mcp
   ```

   ```json title="Cursor"
   {
     "mcpServers": {
       "soundbox": {
         "url": "http://127.0.0.1:17494/mcp"
       }
     }
   }
   ```

   ```json title="VS Code"
   {
     "servers": {
       "soundbox": {
         "type": "http",
         "url": "http://127.0.0.1:17494/mcp"
       }
     }
   }
   ```

   ```json title="Claude Desktop"
   {
     "mcpServers": {
       "soundbox": {
         "command": "npx",
         "args": ["-y", "mcp-remote", "http://127.0.0.1:17494/mcp"]
       }
     }
   }
   ```

   ```json title="Antigravity"
   {
     "mcpServers": {
       "soundbox": {
         "serverUrl": "http://127.0.0.1:17494/mcp"
       }
     }
   }
   ```

   ```bash title="Devin Desktop"
   devin mcp add soundbox http://127.0.0.1:17494/mcp
   ```

   ```json title="Zed"
   {
     "context_servers": {
       "soundbox": {
         "url": "http://127.0.0.1:17494/mcp"
       }
     }
   }
   ```

   ```json title="Cline"
   {
     "mcpServers": {
       "soundbox": {
         "type": "streamableHttp",
         "url": "http://127.0.0.1:17494/mcp",
         "disabled": false,
         "autoApprove": []
       }
     }
   }
   ```

   ```yaml title="Goose"
   extensions:
     soundbox:
       name: soundbox
       type: streamable_http
       uri: http://127.0.0.1:17494/mcp
       enabled: true
       timeout: 300
   ```

   ```json title="LM Studio"
   {
     "mcpServers": {
       "soundbox": {
         "url": "http://127.0.0.1:17494/mcp"
       }
     }
   }
   ```

   ```bash title="opencode"
   opencode mcp add soundbox --url http://127.0.0.1:17494/mcp
   ```

   ```yaml title="Continue"
   mcpServers:
     - name: soundbox
       type: streamable-http
       url: http://127.0.0.1:17494/mcp
   ```

   For any other assistant, add a remote or HTTP server with the address.

2. Follow the notes for your assistant: where its settings file is, anything else to turn on, and how to check that
   it worked.

   The settings file, the check and the common fix for each assistant:

   ```text title="Claude Code"
   File:  ~/.claude.json (written by the command)
   Check: start claude and type /mcp. soundbox shows as connected.
   Fix:   a hand-written .mcp.json entry needs "type": "http",
          or Claude Code skips it.
   ```

   ```text title="Codex"
   File:  ~/.codex/config.toml, shared by the Codex CLI, the IDE
          extension and the ChatGPT desktop app
   Check: start a new Codex session and run /mcp.
   Fix:   a project's own .codex/config.toml is read only in
          trusted projects.
   ```

   ```text title="Cursor"
   File:  ~/.cursor/mcp.json for every project, or
          .cursor/mcp.json for one project
   Then:  in Cursor Settings > MCP, turn on soundbox.
   Check: Cursor Settings > MCP lists soundbox and its tools.
   ```

   ```text title="VS Code"
   File:  .vscode/mcp.json in your workspace. Or run
          MCP: Add Server > HTTP from the Command Palette.
   Check: in Copilot Chat, switch to Agent mode and open the tools
          picker. It lists the soundbox tools.
   Fix:   this file's key is "servers", not "mcpServers".
   ```

   ```text title="Claude Desktop"
   File:  open it with Settings > Developer > Edit Config.
   Needs: Node.js, because the entry runs mcp-remote.
   Then:  quit Claude Desktop completely and open it again.
   Check: in a new chat, the tools menu lists soundbox.
   Fix:   don't add a "url" entry to this file, and don't use
          Settings > Connectors: it cannot reach Mirli.
   ```

   ```text title="Antigravity"
   File:  ~/.gemini/config/mcp_config.json for every project, or
          .agents/mcp_config.json for one workspace
   Check: restart the session and run /mcp.
   Fix:   Antigravity rejects "httpUrl". The older Gemini CLI is
          the reverse: it wants "httpUrl" in ~/.gemini/settings.json.
   ```

   ```text title="Devin Desktop"
   File:  .devin/mcp_config.json (written by the command). Add
          -s user to the command for every project.
   Check: start a new Devin Local session. The MCP server list
          shows soundbox.
   ```

   ```text title="Zed"
   File:  run "zed: open settings file". Or use Settings > AI >
          MCP Servers > Add Remote Server and paste the address.
   Check: the Agent panel's MCP server list shows soundbox running.
   ```

   ```text title="Cline"
   File:  open it with MCP Servers > Configure.
   Check: the MCP Servers panel lists soundbox and its tools.
   Fix:   keep the "type" line. Without it Cline tries an older
          transport and cannot connect.
   ```

   ```text title="Goose"
   File:  ~/.config/goose/config.yaml. Or run goose configure >
          Add Extension > Remote Extension (Streamable HTTP).
   Check: the extension list shows soundbox enabled.
   Fix:   the key is "uri", not "url".
   ```

   ```text title="LM Studio"
   File:  open it with Program > Install > Edit mcp.json.
   Check: the Program tab lists soundbox. Turn its tools on in a
          chat.
   ```

   ```text title="opencode"
   File:  opencode.json (written by the command). Add --global
          for every project.
   Check: opencode mcp list shows soundbox as connected.
   Fix:   a hand-written entry needs "oauth": false, because Mirli
          has no sign-in.
   ```

   ```text title="Continue"
   File:  .continue/mcpServers/soundbox.yaml, or your main
          Continue config
   Check: in Agent mode, the tools list includes soundbox.
   Fix:   a file of its own in .continue/mcpServers/ also needs
          top-level name, version and schema keys.
   ```

3. Quit your assistant completely and start it again, so it loads the new server.

The [Mirli MCP page](https://mirli.app/mcp) has one-click install links for Cursor, VS Code, Goose and LM Studio.

## Check the connection

1. Ask your assistant to "list Mirli's models".

   The assistant answers with the models you have installed.

2. In Mirli, go to the **Agents** page.

   Your assistant appears in **Connected agents**, and its request appears in **Recent calls** with a tick. A cross
   means it failed; click the row to see the error.

If **Connected agents** still says **No agent has connected yet**, see
[Troubleshoot the connection](#troubleshoot-the-connection).

## Install the skills

Skills are instruction files that teach an assistant to write good sound prompts, check licences, voice a script and
do a sound pass over a whole project.

1. On the **Agents** page, click the **Skills** tab.

   ![The Skills tab on the Agents page, with the assistant list and the Install all skills button](https://github.com/HamSanders/soundbox/blob/main/site/public/docs/agents/skills.webp)

2. In the list, select your assistant: **Claude Code**, **Cursor** or **Codex**. An assistant marked **(not found)**
   is not installed on this computer.
3. Click **Install all skills**.
4. Optional: after each Mirli update, click **Install all skills** again so the skills match the new version.

## Ask for your first sound

1. Ask your assistant for a sound, describing what makes it. For example:

   ```text
   Make three takes of a wooden crate breaking, two seconds each,
   and copy the best one into assets/sfx.
   ```

   The assistant waits while Mirli renders, then the sounds appear in your library.

> [!TIP]
> Describe the material, the action and the space. "Low metallic groan of a ship's hull under pressure, distant" works
> far better than "scary sound".

Other requests that work well:

- "Go through this game's code, list every event that needs a sound, and make them all."
- "Write a short scene between a guard and a thief, cast it to my saved voices and open it in the studio."

Mirli makes one sound at a time, so ten sounds take ten times as long as one.

## Troubleshoot the connection

| Problem | What to do |
|---|---|
| The assistant says it cannot reach the server | Open Mirli and try again. |
| It still cannot connect | Compare the address with the **Agents** page, including the port, with no slash at the end. |
| The `soundbox` tools don't appear | Quit the assistant completely and start it again. |
| The **Agents** page says **This server doesn't offer agent connections** | This is a hosted copy of Mirli. Agents connect only to Mirli on your own computer. |
| Long music stops partway | Ask for a shorter clip, or raise the assistant's tool timeout. |

## What's next

- [About AI agents in Mirli](https://mirli.app/docs/agents/index.md): what an assistant can do, and when to use the HTTP API instead.
- [The studio](https://mirli.app/docs/studio/index.md): edit what your assistant arranged.
- [MCP server reference](https://mirli.app/docs/mcp/index.md): every tool and argument, for developers building on Mirli.
