概览
lacuna-mcp
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.
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.
npx lacuna-mcp
Configuration
| Variable | Required | Description |
|---|---|---|
LACUNA_API_KEY | yes | API key from your profile dashboard. Begins with lyr_live_. |
LACUNA_BASE_URL | no | Override the API base URL (e.g. for staging). |
Music API access requires the Pro plan or above.
Claude Desktop
{
"mcpServers": {
"lacuna": {
"command": "npx",
"args": ["-y", "lacuna-mcp"],
"env": {
"LACUNA_API_KEY": "lyr_live_..."
}
}
}
}
Claude Code
claude mcp add lacuna -- npx -y lacuna-mcp
Tools
| Tool | Description |
|---|---|
generate_music | Create a music generation task. Returns a pending task immediately. |
get_generation | Retrieve the current state of a generation task by id. |
wait_for_generation | Poll a task until it reaches a terminal state (ready or failed) or the timeout elapses. |
Requirements
- Node.js 18 or newer.
- An API key from a Lacuna Pro plan or above.
License
MIT © Louis Tsang
服务器配置
{
"mcpServers": {
"lacuna": {
"command": "npx",
"args": [
"-y",
"lacuna-mcp"
],
"env": {
"LACUNA_API_KEY": "lyr_live_..."
}
}
}
}