Skip to main content
← Back to all MCP clients
⚡OpenAI Codex Setup Guide

Connect SonicAura MCP to Codex

Add SonicAura's audio tools directly to your Codex terminal or desktop app. Once connected, you can prompt Codex to split stems, remove vocals, or denoise audio without ever leaving your development environment.

⏱ ~3 min setup🔐 Bearer Token Auth✅ CLI & Desktop App

Before you start

  • • Node.js 16+ installed locally
  • • OpenAI Codex CLI installed (npm install -g @openai/codex)
  • • A SonicAura account and an API Key

Step-by-step setup

1

Install Codex CLI

Ensure Node.js (v16+) is installed, then install the OpenAI Codex CLI globally. (Note: If you get EACCES permission errors, do not use sudo. Configure npm to use a user-level directory instead.)

npm install -g @openai/codex
2

Open the config file

Codex reads MCP servers from a TOML config file. Open or create the following file in your editor.

File path
~/.codex/config.toml
3

Set your API Key environment variable

It is recommended to store your API key securely. Add this to your shell profile (~/.zshrc or ~/.bashrc) and reload it (source ~/.zshrc).

export SONICAURA_API_KEY="sk_live_your_api_key_here"
4

Paste the SonicAura config

Append the following TOML configuration to your config.toml file. Codex will automatically use the Bearer token from the environment variable.

[mcp_servers.sonicaura_mcp]
url = "https://api.sonicaurastudio.com/mcp"
bearer_token_env_var = "SONICAURA_API_KEY"
5

Verify the connection

Run the following command in your terminal to verify Codex has picked up the server. Then, launch Codex and type /mcp inside the chat to see the available tools.

codex mcp list

Verify in Codex

Launch the Codex interactive terminal by typing codex, then type the following command in the chat:

/mcp

Codex will output a list of all connected servers. If you see sonicaura_mcp and its tools, you are ready to go!

Available tools

check_service_status

Check if the service is ready and how many credits you have.

get_my_credits

Query your remaining separation credits.

get_upload_url

Get a presigned URL to upload large audio files.

upload_audio

Upload small audio files (<1MB) via base64.

submit_separation

Submit a stem separation task (2/4/6 tracks).

check_separation_status

Check task progress and download the separated stems.

Troubleshooting

Terminal says "codex: command not found" after installation.

This means the npm global bin directory is not in your PATH. Run "npm prefix -g" to find your global path, then add it to your shell profile (e.g., export PATH="/usr/local/bin:$PATH"). Alternatively, use nvm to manage Node.js.

I get "EACCES: permission denied" when installing.

You do not have write access to the global node_modules. Avoid using sudo. Instead, set a new npm prefix: "npm config set prefix ~/.npm-global", add "~/.npm-global/bin" to your PATH, and install again.

How do I know if the MCP server is loaded in Codex?

First, run "codex mcp list" in your terminal to check if it is enabled. Then, open the Codex interactive chat (just type "codex") and type "/mcp" to see the actual list of tools loaded for your current session.

Can I use the desktop app instead of the CLI?

Yes. Open the Codex desktop app, go to Settings -> Plugins -> MCPs, and select "Connect to a custom MCP". Choose "Streamable HTTP", enter the URL, and add your Bearer Token in the authentication settings.

Ready to connect another client?

We support Claude Desktop, Cursor, and VS Code too.

View all MCP clients →