---
title: "Connect FeedMCP to OpenAI Codex CLI (Social Media Data MCP & API) | FeedMCP"
description: "Connect FeedMCP to OpenAI Codex CLI with 3 lines in `~/.codex/config.toml` so Codex can query 193 social data endpoints right from your terminal."
canonical: "https://feedmcp.com/integrations/codex/"
---
<p class="crumbs"><a href="/integrations/">Integrations</a> / OpenAI Codex CLI</p>

# Connect FeedMCP to OpenAI Codex CLI (Social Media Data MCP & API)

Connect FeedMCP to OpenAI Codex CLI with 3 lines in `~/.codex/config.toml` so Codex can query 193 social data endpoints right from your terminal.

| Item | Value |
| --- | --- |
| Method | Native remote MCP (`~/.codex/config.toml`) |
| MCP URL | `https://api.feedmcp.com/mcp` |
| OpenAPI | https://feedmcp.com/openapi.json |
| Coverage | 21 platforms · 193 endpoints |
| Billing | Pay per call (from $0.0003), failures free, $0.10 trial credit |

## Setup steps

### 1. Create a spend-capped API key

Sign up in the [console](/console/keys/) ($0.10 free trial credit, no card) and create a dedicated API key (`fmk_live_…`) for OpenAI Codex CLI with a spend cap.

### 2. Configure FeedMCP in OpenAI Codex CLI

Add to `~/.codex/config.toml`:

```toml
[mcp_servers.feedmcp]
url = "https://api.feedmcp.com/mcp"
http_headers = { Authorization = "Bearer fmk_live_YOUR_KEY" }
```

### 3. Verify the connection

Start Codex and ask "Use feedmcp to find YouTube transcript endpoints"—it should return `youtube.videos.transcript.get` at $0.002 for free.

## First prompts to try

| Prompt | Estimated cost |
| --- | --- |
| Pull today's top 10 trends on X and TikTok via FeedMCP and save them as JSON | 2 calls, $0.004 |
| Get the transcript of this YouTube video and write timestamped notes | 1 call, $0.002 |
| Search TikTok Shop for "coffee grinder" and summarize buyer complaints | 2 calls, $0.004 |

## Tips & guardrails

Keep the header in your user-level `~/.codex/config.toml` rather than inside a shared git repository.

## Questions

### How much does FeedMCP cost in OpenAI Codex CLI?

Pay per call with no subscription, starting at $0.0003 (most platforms $0.002/call; Xiaohongshu and WeChat $0.02/call). Failed calls are free; $0.10 free trial credit on sign-up.

### How do I prevent OpenAI Codex CLI from overspending?

Set a total spend cap on the API key in the console, and use `X-Max-Price` / `max_price` to cap individual calls.

### Which platforms can OpenAI Codex CLI read through FeedMCP?

All 21 platforms and 193 endpoints: TikTok, YouTube, Instagram, X, Threads, Telegram, Reddit, LinkedIn, Facebook, Pinterest, Meta Ad Library, Google Ads Transparency, Xiaohongshu (RedNote), Douyin, Kuaishou, WeChat Official Accounts, WeChat Channels, WeChat Search, Weibo, Zhihu and Bilibili. See [all endpoints](/apis/).

## Other AI client guides

- [Claude Code](/integrations/claude-code/)：Native remote MCP (Streamable HTTP)
- [Claude (Desktop / Web)](/integrations/claude/)：Remote MCP server (Streamable HTTP)
- [Cursor](/integrations/cursor/)：Native remote MCP (`~/.cursor/mcp.json`)
- [Windsurf](/integrations/windsurf/)：Native remote MCP (`mcp_config.json`)
- [Cherry Studio](/integrations/cherry-studio/)：GUI remote MCP (Streamable HTTP)
- [ChatGPT (connectors / Custom GPT Actions)](/integrations/chatgpt/)：Remote MCP connector (OAuth sign-in), or Custom GPT Actions (`/openapi.json`)
- [DeepSeek](/integrations/deepseek/)：MCP client (Cherry Studio / Cline) or Function Calling
- [WorkBuddy](/integrations/workbuddy/)：Remote MCP (Streamable HTTP) or `agents.md` setup
- [Doubao & Coze](/integrations/doubao/)：Coze plugin / OpenAPI import + MCP
- [Qwen (Tongyi / Model Studio)](/integrations/qwen/)：Remote MCP (Streamable HTTP) or HTTP tool calling
- [Dify & n8n Workflows](/integrations/dify-n8n/)：OpenAPI import / HTTP Request node / MCP node

---

HTML version: https://feedmcp.com/integrations/codex/
