Add the SunoBoard MCP server to ~/.codex/config.toml with an API key and Codex generates Suno songs and sound effects from the terminal. About 2 minutes; keys come with Pro.
01The short answer
Codex reads MCP servers from ~/.codex/config.toml. Point a server at https://mcp.sunoboard.com/mcp with your SunoBoard key as the bearer token, restart Codex, and ask it for music: it calls generate_music and gives you the audio URL.
Suno itself has no official MCP server or public API, so this goes through SunoBoard, which runs the Suno models via sunoapi.org. More on that here.
02Step 1: get a SunoBoard API key
Sign in at sunoboard.com, open Settings → SunoBoard API Key and create a key (it starts with sb_). API keys come with Pro (US$ 9.97/month: 75 credits and 200 sound effects) and Studio. On the free plan, use the Claude.ai connector instead: it needs no key.
03Step 2: add the server to config.toml
Export the key in your shell profile so it never sits in a config file, then add the block below to ~/.codex/config.toml and restart Codex.
export SUNOBOARD_KEY=sb_YOUR_KEY
# ~/.codex/config.toml [mcp_servers.sunoboard] url = "https://mcp.sunoboard.com/mcp" bearer_token_env_var = "SUNOBOARD_KEY"
04Prefer a local server?
The open-source package runs over stdio. It works with an sb_ key or with your own sunoapi.org key:
# ~/.codex/config.toml [mcp_servers.suno] command = "npx" args = ["-y", "@yellowkode/suno-mcp"] [mcp_servers.suno.env] SUNO_API_KEY = "sb_YOUR_KEY"
05Step 3: ask for music from your repo
Codex can write the files straight into your project. One credit is one Suno request and returns 2 songs; a sound effect uses 1 of your monthly sound effects, not credits.
Generate a 90-second calm exploration track for a cozy farming game, instrumental, and save both versions to assets/music/.
Make 5 short UI sound effects (click, confirm, cancel, coin, level up), 1 second each, and put them in assets/sfx/.
FAQ
Does Codex support remote MCP servers?
Yes. Codex reads [mcp_servers.<name>] blocks from ~/.codex/config.toml; a block with url and bearer_token_env_var connects to a remote HTTP server, and a block with command and args starts a local stdio server.
Can I use the free SunoBoard plan with Codex?
Codex needs an API key, and keys come with Pro and Studio. On the free plan (5 credits a month) use the hosted connector in Claude.ai, which signs in with Google instead of a key.
Where do the generated songs go?
Every generation is saved to your SunoBoard library with its prompt, and Codex gets the audio URL so it can download the file into your project.












