Connect Codex to AI Rap Generators MCP
Add the AI Rap Generators remote MCP server to Codex CLI and configure its Bearer API key safely.
Last updated: 2026-11-12
Codex can use AI Rap Generators through its remote Streamable HTTP MCP connection. It can call four text tools and four video tools to create and poll original duo video tasks, check credits, and list stages. The endpoint is https://airapgenerators.com/api/mcp; tool calls authenticate with an AI Rap Generators account API key sent as a Bearer token. Video tasks cost 10 credits and require two public HTTPS image URLs.
The MCP integration cannot upload private images. To create a video task, check the available credits and provide two public image URLs the provider can retrieve; use only authorized images. The website generator supports private photo uploads. A free first video is not guaranteed. The MCP page lists the complete tool fields and the API reference explains the protocol behavior.
Create an API key
Sign in to the site and visit Settings → API Keys. Create a new key for Codex and copy it while the full value is shown. Keep the key in a private environment variable. Do not commit the key to config.toml, a project repository, or a prompt. If it becomes public, revoke it in settings and create a new one.
Register the remote MCP server
From a terminal where Codex CLI is installed, add the Streamable HTTP endpoint:
codex mcp add airap --url https://airapgenerators.com/api/mcp
Codex stores the server entry in ~/.codex/config.toml. Add the token variable name to that same server section; if the command already created [mcp_servers.airap], edit the existing section rather than adding a duplicate:
[mcp_servers.airap]
url = "https://airapgenerators.com/api/mcp"
bearer_token_env_var = "AIRAP_API_KEY"
Export your key before starting Codex from that shell:
export AIRAP_API_KEY="YOUR_API_KEY"
codex mcp list
bearer_token_env_var is the variable name, not the key itself. The active Codex process must inherit a non-empty value for AIRAP_API_KEY. If you use an IDE extension or desktop client, set the variable in the environment that launches that application and restart it. Codex CLI and the IDE extension use the Codex MCP configuration, while the process environment still determines whether the credential is available.
Verify the connection
After the server appears in codex mcp list, open a Codex session and ask it to list rap stages or check your credits. You can also inspect MCP status in the client’s MCP interface. Tool discovery may succeed even when the key is missing because listing tools does not call a protected tool; a tool call without the key returns HTTP 401. If that happens, check the variable in the environment that actually launched Codex and confirm that the name in config.toml matches it exactly.
The lyric tools accept a topic up to 300 characters or birthday fields with bounded lengths and a supported relationship. They return short English text and share 10 free drafts per account per 24-hour period. The name tools are free. A provider problem or exhausted allowance appears as a readable tool error with a reset time when applicable.
Use the draft in a video
Use get_credits before generation. When the account has at least 10 credits and you provide two authorized public HTTPS image URLs, create_rap_video starts a duo task and get_video_status checks it. Poll at least three seconds apart. A lyric draft is not a promise about the exact final lyrics. For private photo uploads, use the website generator. For other clients, see Claude, Cursor, and the AI Rap Video Skill. Codex’s official MCP setup example shows the remote server registration pattern.