# MCP

From the Lero API docs: https://lero.studio/docs/en/ai#mcp. Everything in one file: https://lero.studio/docs/en/llms-full.txt.

The MCP puts Lero inside your agent. It gets 3 tools and starts generating audio straight from the chat, without you writing code. Run your agent's command, with your key in place of `lero_your_key`:

Claude Code:

```bash
claude mcp add --env LERO_API_KEY=lero_your_key lero -- npx -y lero-mcp
```

Codex:

```bash
codex mcp add lero --env LERO_API_KEY=lero_your_key -- npx -y lero-mcp
```

Cursor:

```json
{
  "mcpServers": {
    "lero": {
      "command": "npx",
      "args": [
        "-y",
        "lero-mcp"
      ],
      "env": {
        "LERO_API_KEY": "lero_your_key"
      }
    }
  }
}
```

Claude Desktop:

```json
{
  "mcpServers": {
    "lero": {
      "command": "npx",
      "args": [
        "-y",
        "lero-mcp"
      ],
      "env": {
        "LERO_API_KEY": "lero_your_key"
      }
    }
  }
}
```

In Cursor, the JSON goes in `~/.cursor/mcp.json`. In Claude Desktop, in Settings > Developer > Edit Config. Needs Node 18 or newer.

Then just ask, for example: *make an audio in the São Paulo voice saying "seu pedido saiu para entrega"*.

| tool | what it does | cost |
|---|---|---|
| `lero_fala` | Turns text into speech and saves the MP3. Up to 500 characters per call. | 1 credit per character |
| `lero_vozes` | Lists the voices. | free |
| `lero_saldo` | Shows the account credits and the plan. | free |

The MP3s go to `~/Downloads/Lero`. To change the folder, add `LERO_PASTA` to the config, the same way as the key. The key stays only in your agent's config, on your computer, and goes straight to the Lero API.
