# Lyria API and music MCP server: render takes from Claude, ChatGPT or Cursor

> Lyria4.net's own API and MCP server let your assistant render your music prompts on Lyria 2 by Google and the other engines here, on your account, and hand you the audio links. It is not Google's Lyria API. It uses the same engines, prices, credits and refunds as the studio.

Server URL (Streamable HTTP): `https://lyria4.net/mcp`

## Connect Lyria4.net to Claude, ChatGPT or Cursor

### Claude

In claude.ai or Claude Desktop open Settings → Connectors → Add custom connector, name it Lyria4.net and paste the URL. Press Connect and approve access.

```
https://lyria4.net/mcp
```

### Claude Code

Run this in a terminal, then type /mcp inside Claude Code and pick the server to sign in.

```
claude mcp add --transport http lyria4-net https://lyria4.net/mcp
```

### ChatGPT

In ChatGPT open Settings → Apps & Connectors → Advanced and turn on developer mode, then Create a connector with this URL and OAuth authentication.

```
https://lyria4.net/mcp
```

### Codex

Add the block to ~/.codex/config.toml, then run codex mcp login lyria4-net to sign in.

```
[mcp_servers.lyria4-net]
url = "https://lyria4.net/mcp"
```

### Cursor

Add the server to ~/.cursor/mcp.json (or Settings → MCP → Add new server). Cursor shows a Login button for it.

```
{
  "mcpServers": {
    "lyria4-net": {
      "url": "https://lyria4.net/mcp"
    }
  }
}
```

### VS Code

Save as .vscode/mcp.json in your workspace (or run MCP: Add Server). VS Code asks you to sign in on the first tool call.

```
{
  "servers": {
    "lyria4-net": {
      "type": "http",
      "url": "https://lyria4.net/mcp"
    }
  }
}
```

### Windsurf

Add it to ~/.codeium/windsurf/mcp_config.json and refresh the MCP panel in Cascade.

```
{
  "mcpServers": {
    "lyria4-net": {
      "serverUrl": "https://lyria4.net/mcp"
    }
  }
}
```

Your browser opens Lyria4.net: sign in (or create a free account) and press Allow access. No password or API key is shared with the assistant.

## Signing in once with your Lyria4.net account

1. Your client calls the server and receives a 401 that points to our OAuth metadata.
2. It registers itself (Client ID Metadata Document or dynamic registration) and opens a PKCE sign-in page.
3. You sign in on Lyria4.net and approve that one app on the consent screen.
4. The client gets a token for https://lyria4.net/mcp only, refreshed automatically and revocable at any time.

## Rendering music from code without a browser

There are no API keys yet: every client signs in with OAuth, which works in Claude, ChatGPT, Cursor, VS Code, Codex and Windsurf.

## Music tools your assistant can call

- `list_prices`: Credit prices for each engine and the limits on prompts and lengths.
- `render_take`: Render one prompt on one engine: 45 credits for a 30-second Lyria 2 take, 67 for a full song, 147 for a long instrumental, or 63 per 10 s for an exact-length track.
- `compare_engines`: Top plan only: render the same prompt on up to 4 engines in one run, each take charged and refunded on its own.
- `get_take`: The state of one take, with its audio link once ready.
- `list_takes`: Your latest takes, newest first.
- `get_credits`: Remaining balance and plan.

Credits are taken only when a take starts rendering, and a take that fails is refunded automatically. Every take is saved in your library.

## Troubleshooting

- Client says 'needs authentication': delete the server and add it once more, which makes it sign in from scratch.
- “Not enough credits”: ask for get_credits, then buy credits on the pricing page. You weren't charged.
- A take still “running”: takes need from a few seconds to two minutes. Ask the assistant to call get_take again.
- 401 with a key starting sk_: this site has no API keys. Remove the header and sign in with OAuth.

## Questions from assistant users

### Does the MCP server cost extra?

No. Connecting is free; you only spend the credits each take costs, exactly as in the studio.

### What can my assistant do?

Help you shape a music prompt, render it on the engine you pick, check on it and read back the audio link. The prompt doctor and the waveform player are in the studio.

### What happens if a take fails or my balance is too low?

A job takes credits only when it starts rendering, and a take that fails comes back as credits on its own. With too few credits the tool tells you, and your balance stays as it was.

### Can my assistant copy an artist's sound?

No. Prompts that name artists, copy a voice or cover existing songs are refused, over MCP and in the studio alike.

### My client keeps asking me to sign in. What do I do?

Delete the server in your client, add it once more, and the next tool call opens a new sign-in.

### How long does a take need, and where does it go?

From a few seconds for a Lyria 2 take to two minutes for a full song, so the assistant may check back once. Every take is saved in your library.


---

Source: https://lyria4.net/mcp-server · Site index for AI agents: https://lyria4.net/llms.txt · Full content: https://lyria4.net/llms-full.txt
