lacuna-mcp
[npm version]
[License: MIT]
[Node.js]
Model Context Protocol server for the Lacuna Music API. Lets MCP-compatible clients (Claude Desktop, Claude Code, Cursor, Zed, Continue, etc.) generate AI music as part of an agent loop.
Looking for the SDK or CLI? See lacuna-sdk and lacuna-toolkit.
Installation
The server is published as a single npm package and runs over stdio. No install step is needed — your MCP client launches it via npx.
Configuration
The server reads its configuration from environment variables:
Music API access requires the Pro plan or above.
Claude Desktop
Add an entry to claude_desktop_config.json:
The config file lives at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
Claude Code
Then export the key in your shell or set it via your client's MCP settings.
Cursor / Zed / other MCP clients
Any client that speaks the Model Context Protocol over stdio can run npx -y lacuna-mcp as the command and pass LACUNA_API_KEY as an env var. Refer to your client's MCP setup docs for the exact JSON shape.
Tools
generate_music
Credits are deducted on creation and refunded automatically if the upstream provider fails.
get_generation
wait_for_generation
Requirements
- Node.js 18 or newer.
- An API key from a Lacuna Pro plan or above.
License
MIT © Louis Tsang