Codex
Developer integration guide — connect GoldenClaw to OpenAI Codex CLI via MCP.
Prerequisites
- GoldenClaw API key (create one here)
- Codex CLI installed
Setup
1. Set Your API Key
Store your GoldenClaw API key as an environment variable:
export GOLDENCLAW_API_KEY="YOUR_API_KEY"Add this to your shell profile (~/.zshrc, ~/.bashrc) to persist across sessions.
2. Add GoldenClaw MCP Server
Option A: CLI Command
codex mcp add goldenclaw \
--transport http \
--url https://stage.goldenclaw.sh/mcp \
--bearer-token-env-var GOLDENCLAW_API_KEYOption B: Config File
Edit ~/.codex/config.toml (global) or .codex/config.toml (project-scoped):
[mcp_servers.goldenclaw]
url = "https://stage.goldenclaw.sh/mcp"
bearer_token_env_var = "GOLDENCLAW_API_KEY"Project-scoped config
Project-scoped .codex/config.toml requires the project to be trusted first. Global config at ~/.codex/config.toml works everywhere.
3. Verify Connection
Launch Codex and type /mcp to see active servers. Then test with:
"What's the current BTC/USDT price on Binance futures?"
Example Prompts
"Calculate RSI for ETH/USDT on the 4h timeframe on Bybit"
"What are my open positions on Binance futures?"
"Show me Bollinger Bands for SOL/USDT on OKX"
"Analyze BTC/USDT: get price, RSI, and MACD on the 4h chart"
Remove Server
codex mcp remove goldenclawAvailable Tools
| Category | Tools |
|---|---|
| Market Data | get_price, get_ohlcv, get_ticker, get_pairs, get_symbols, get_timeframes |
| Trading | place_order, cancel_order, get_orders, get_positions, close_position |
| Account | get_balance, get_account |
| Analysis | calculate_indicator (35+ indicators) |
| Discovery | list_exchanges |
See MCP Tools for full tool documentation.
Troubleshooting
"Unauthorized" error
Verify GOLDENCLAW_API_KEY is set correctly:
echo $GOLDENCLAW_API_KEYIf empty, set it again. If the key is expired, generate a new one from your Dashboard.
Server not connecting
Check that you're using --transport http. Codex supports both stdio and HTTP transports — GoldenClaw requires HTTP.
Tools not appearing
Run /mcp in the Codex TUI to check server status. If GoldenClaw is listed but tools aren't loading, restart Codex.