Lacuna Music — Claude Code MCP server for AI music
Connect an MCP client to Lacuna Music to request tracks and check generation progress. Useful when an agent needs to create a song from a style brief and lyrics.
claude mcp add --transport http lacuna-mcp https://www.lacuna.fm/mcpWhat Lacuna Music does
The server exposes Lacuna Music generation through MCP. Call generate_music with a track name and style description; include lyrics unless you request an instrumental. The call returns a task, which you can inspect with get_generation. To keep checking until completion or failure, use wait_for_generation.
The available models are aether and echo. Vocal hints and several style controls apply to aether. Running the npm package locally requires Node.js 18 or newer, plus an API key on the Pro plan or above, supplied as LACUNA_API_KEY. A lower plan does not provide access to music generation through the API.
What it helps with
- create a track from a style brief
- generate an instrumental piece
- check a generation task's state
- wait for a task to finish or fail
Example prompts for the agent
- Create a track called “Morning Drive” with an indie pop sound and lyrics about heading home.
- Generate an instrumental piece for a quiet game scene.
- Check the generation task with ID
abc123.
How to install Lacuna Music
1Platform CLI: remote server
claude mcp add --transport http lacuna-mcp https://www.lacuna.fm/mcp2Platform CLI
claude mcp add --env LACUNA_API_KEY=<LACUNA_API_KEY> --env LACUNA_BASE_URL=<LACUNA_BASE_URL> --transport stdio mcp -- npx -y lacuna-mcpReplace <…> with your own values
1Platform CLI: remote server
codex mcp add mcp --url https://www.lacuna.fm/mcp2Platform CLI
codex mcp add mcp --env LACUNA_API_KEY=<LACUNA_API_KEY> --env LACUNA_BASE_URL=<LACUNA_BASE_URL> -- npx -y lacuna-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"mcp": {
"url": "https://www.lacuna.fm/mcp"
}
}
}{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"lacuna-mcp"
],
"env": {
"LACUNA_API_KEY": "<LACUNA_API_KEY>",
"LACUNA_BASE_URL": "<LACUNA_BASE_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mcp": {
"type": "http",
"url": "https://www.lacuna.fm/mcp"
}
}
}{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lacuna-mcp"
],
"env": {
"LACUNA_API_KEY": "<LACUNA_API_KEY>",
"LACUNA_BASE_URL": "<LACUNA_BASE_URL>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http mcp https://www.lacuna.fm/mcp2Platform CLI
gemini mcp add -e LACUNA_API_KEY=<LACUNA_API_KEY> -e LACUNA_BASE_URL=<LACUNA_BASE_URL> mcp npx -y lacuna-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Lacuna Music
How do I install Lacuna Music in Claude Code?
Add the server with claude mcp add --transport http lacuna-mcp https://www.lacuna.fm/mcp.
What does Lacuna Music do?
It gives an MCP client tools to create music through the Lacuna Music API and inspect generation status.
What do I need to generate music?
You need an API key on the Pro plan or above. Running the npm package locally also requires Node.js 18 or newer.