# Connect OpenAI Codex to Duang MCP (134 Providers in 4 Tools)

> Add Duang to Codex CLI in one command—live search, scraping, SEO, and team apps in 4 tools.

- **Canonical URL**: https://duang.ai/mcp/for/codex
- **Remote MCP endpoint**: `https://api.duang.ai/mcp`
- **Transport**: Remote HTTP MCP + SKILL.md
- **Config location**: `~/.codex/config.toml`
- **Coverage**: 3,012 live pay-per-call & free data APIs across 50 platforms + 79 team apps (134 providers total)
- **Billing**: New accounts get $1 free welcome credit on their first team (no card required); top up from $10 USD via Stripe with no auto-recharge. Failed upstream calls cost $0.

## Quick Setup (~/.codex/config.toml)

```
codex mcp add duang --url https://api.duang.ai/mcp
```

## Alternative: config.toml (`~/.codex/config.toml`)

```
[mcp_servers.duang]
url = "https://api.duang.ai/mcp"
```

## 3-Step Setup

1. **Register server** — Run codex mcp add duang --url https://api.duang.ai/mcp.
2. **Log in** — Run codex mcp login duang to authorize your team.
3. **Run workflows** — Call live APIs or pair with Duang SKILL.md recipes.

## Why 4 Meta-Tools Matter

Autonomous Codex loops burn tokens fast with bloated MCP lists. Four Duang meta-tools keep context tight and return exact USD receipts.

- `discover`: Find matching capabilities and providers with 1–2 keywords.
- `inspect`: Load exact input schema and live per-call USD price for one target.
- `call`: Execute safely with an idempotency key and receive normalized output + itemized USD receipt.
- `get_call`: Poll pending calls or inspect past receipts without double-billing.

## Frequently Asked Questions

### Why doesn't Codex list duang after editing config.toml?

Run codex mcp list to confirm [mcp_servers.duang] parsed cleanly, then run codex mcp login duang.

### How do I run Codex in headless CI without a browser?

Create a revocable team token in the Duang console and pass it via DUANG_API_KEY or a Bearer header.

### Will 134 providers slow down Codex?

No. Duang exposes only 4 meta-tools (discover, inspect, call, get_call) instead of dumping hundreds of tool schemas into every turn. Codex loads schemas on demand only when needed.

### Does Codex ever see my API keys?

Never. Your 79 team apps stay encrypted in Duang's vault, and managed data calls (3,012 live APIs across 50 platforms) bill per call in exact USD with $1 free for new teams and $0 on upstream failures.
