# Let your AI agent make the music.

> Let Claude, ChatGPT, Codex or Cursor make songs and change them. An AI music generator API and a music MCP server: get a key, paste one line, ask.

Connect Claude, ChatGPT, Codex or Cursor to Shawarma. Ask for a song in plain words, then ask for changes: your agent changes only the part you asked about, and every version is kept.

[Get an API key](https://shawarma.studio/auth/google)

You: Make background music for my game’s boss fight, then make the drums heavier.

shawarma · `make_song`(description: “boss fight, game background”)

Made “Boss Hall”: 140 BPM, low strings and war drums. shawarma.studio/s/k7qmz2

shawarma · `change_song`(song_id: "boss-hall", request: “heavier drums”)

Version 2: a second kick and louder toms. The strings did not change.

The drum pattern of version 2: the second kick and the toms are new

Claude: The drums are heavier now. Do you want the MP3?

You: Yes please.

shawarma · `export_audio`(song_id: "boss-hall", format: “mp3”)

boss-hall.mp3 · 1:12

## Songs your agent can *keep changing*

Other AI music tools hand back one finished file: keep it or roll again. A Shawarma song is written as code, so “busier drums” changes the drums and nothing else. Your agent can open the song next week and pick up where it stopped.

1. Get a key: Sign in, open Development from your account menu, and make a key. Claude.ai and ChatGPT need no key: you sign in from the app.
2. Paste one line: Add Shawarma to your agent with the setup below. It takes a minute.
3. Ask for music: “A calm 20-second intro for my podcast.” Then ask for changes until it is right.

## The tools your agent gets

The same tools are a plain web API at `https://shawarma.studio/v1` for your own code. Every argument and route is in the [API reference](https://shawarma.studio/docs/api).

| Tool | What it does | Plan |
| --- | --- | --- |
| `make_song` | A new song from words: style, mood, length. | Pro, from your AI allowance |
| `change_song` | Changes only what was asked and saves a new version. | Pro, from your AI allowance |
| `get_song / list_songs` | Title, code, versions and links. | Free |
| `restore_version` | Goes back to an earlier version. | Free |
| `share_song` | A public link that plays without signing in. | Free |
| `export_audio` | An MP3 or WAV file of the song. | Pro |
| `list_sounds` | Drum kits, instruments, darbuka and riq, maqam scales. | Free |
| `write_song` | Your agent writes the music code; Shawarma checks it and saves it. | Free |
| `check_code / guide` | Finds mistakes in music code, and a short guide for the agent. | Free |
| `get_job` | Follows a long request (composing, audio) until it is ready. | Free |

## Two ways to compose

Pro

### Shawarma composes

Your agent sends words and Shawarma’s own composer writes the song, the same one as in the app. It uses your monthly AI allowance. Export MP3 and WAV files too.

Free

### Your agent composes

Your agent reads the short guide, writes the music code itself, and Shawarma checks, saves, plays and shares it. Up to 30 songs a day, kept in your 3 projects.

[See pricing](https://shawarma.studio/pricing)

## Set it up

The address for every agent is `https://shawarma.studio/mcp`. Replace `shk_…` with a key from Development, in your account menu.

### Claude Code

Run this once in your terminal.

```
claude mcp add --transport http shawarma https://shawarma.studio/mcp \
  --header "Authorization: Bearer shk_…"
```

### Codex

Add this to ~/.codex/config.toml, then put the key in your shell profile.

```
[mcp_servers.shawarma]
url = "https://shawarma.studio/mcp"
bearer_token_env_var = "SHAWARMA_API_KEY"

# in ~/.zshrc or ~/.bashrc
export SHAWARMA_API_KEY="shk_…"
```

### Cursor

Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project). Cursor uses a key: it has no sign-in to Shawarma.

```
{
  "mcpServers": {
    "shawarma": {
      "url": "https://shawarma.studio/mcp",
      "headers": { "Authorization": "Bearer shk_…" }
    }
  }
}
```

### Claude.ai

No key to copy: you sign in to Shawarma.

1. Open Settings, then Connectors.
2. Choose Add custom connector and paste the address above.
3. Choose Connect, sign in to Shawarma and choose Allow.

### ChatGPT

No key to copy: you sign in to Shawarma.

1. Open Settings, then Apps and connectors. Under Advanced settings, turn on developer mode (custom connectors need it).
2. Choose Create, paste the address above and choose OAuth.
3. Sign in to Shawarma and choose Allow.

### Your own code

Call the AI music API over HTTPS with the same key.

```
curl https://shawarma.studio/v1/songs \
  -H "Authorization: Bearer shk_…" \
  -H "Content-Type: application/json" \
  -d '{"description": "calm 20-second intro for a podcast"}'
```

## Questions

**What is an MCP server?**

MCP is the way AI agents such as Claude, ChatGPT, Codex and Cursor use outside tools. Add Shawarma once and your agent can make songs, change them and export audio when you ask.

**Do I need Pro?**

No. On Free, your agent writes the music code itself, and Shawarma checks, saves, plays and shares it. Up to 30 songs a day, and they count toward your 3 projects. With Pro, Shawarma’s AI composes from your words and your agent can export MP3 and WAV files.

**Does it use my agent’s tokens or my Shawarma allowance?**

When Shawarma composes, it uses your Shawarma AI allowance, the same one as the app. When your agent writes the music code itself, your agent does the thinking and Shawarma uses no allowance.

**Can my agent change a song it made earlier?**

Yes. Every song keeps its versions. Ask for busier drums or a longer ending and only that part changes; ask to go back and the earlier version returns.

**Is my API key safe?**

Shawarma keeps only a fingerprint of each key and shows the key once. Each key has its own limits, and you can revoke it at any time. No key can change billing or delete your account.

**Who owns the songs?**

You own what you make and can use it in your videos and games. Some built-in sounds ask for a credit; the list is on the Terms page. [Sound credits](https://shawarma.studio/terms#sound-credits)

## Give your agent a band

Free to start. Pro adds Shawarma’s composer and audio files.

[Get an API key](https://shawarma.studio/auth/google) [See pricing](https://shawarma.studio/pricing)

---

The page: https://shawarma.studio/developers
