OpenAI MCP — Auth Setup
OpenAI uses API keys to authenticate requests to its models and platform services.
1. Get your credentials
- Open the OpenAI API keys page (opens OpenAI — we never see your key)
- Click Create new secret key, give it a name, and set any usage limits
- Copy the key — it will not be shown again after you close the dialog
2. Set environment variables
macOS / Linux — add to ~/.zshrc or ~/.bashrc:
export OPENAI_API_KEY=YOUR_API_KEY_HERE
Then run source ~/.zshrc (or open a new terminal).
Windows — run in Command Prompt (then restart):
setx OPENAI_API_KEY "YOUR_API_KEY_HERE"
3. Verify
npx claude-skills doctor
You should see ✅ next to the OpenAI MCP entry. If you see ❌, confirm the key is set: echo $OPENAI_API_KEY.
4. Restart Claude Code
Quit and reopen Claude Code (or run /mcp list inside Claude Code to confirm the OpenAI MCP appears).

