Codex
Connect TubeLab to Codex and turn it into your YouTube research assistant.
Connect your TubeLab account to Codex and it becomes your YouTube research assistant — searching channels, finding viral videos, pulling transcripts — all within your chat.
Setup
1. Create a TubeLab API key
You must have an active subscription with available credits.
Create an API key here and copy it.
Be aware, this key won't be shown again.
2. Add the MCP server
In Codex, go to Settings → MCP Servers and click Add server. Fill in:
- MCP server name: TubeLab
- Select Streamable HTTP
- URL:
https://public-api.tubelab.net/mcp- Bearer token: paste the API key from the previous step
3. Start using TubeLab
Save the server and TubeLab's tools are now available to Codex in every chat.
Done. TubeLab is now available in Codex.
Example prompts
Ask Codex anything about YouTube and it will call TubeLab's tools behind the scenes:
- "Search for cooking channels with over 100K subscribers"
- "Get me the transcript of this video: dQw4w9WgXcQ"
- "What are the top comments on this video?"
- "Find channels similar to @mkbhd"
- "What viral videos are there about home automation this month?"
- "How many credits do I have left?"
Tools
Once connected, Codex has access to 11 TubeLab tools:
| Tool | What it does | Cost |
|---|---|---|
search_channels | Search YouTube channels by keyword with filters (subscribers, views, language, monetization, etc.) | 5 credits |
search_related_channels | Find channels similar to a given channel | 5 credits |
search_outliers | Find viral or underperforming videos across YouTube by keyword | 2 credits |
search_related_outliers | Find outlier videos from channels similar to a given channel | 2 credits |
get_channel | Get info about a YouTube channel (accepts ID, URL, or @handle) | free |
get_channel_videos | Get recent videos from a channel | free |
get_channel_shorts | Get recent Shorts from a channel | free |
get_video | Get detailed info about a specific video | free |
get_video_transcript | Get the transcript/captions of a video | free |
get_video_comments | Get top comments from a video | free |
get_credits_balance | Check your TubeLab credit balance | free |
You don't need to call these by name. Just ask Codex what you need in plain language and it picks the right tools automatically.
Good to know
- Tools consume your TubeLab credits at the same rate as the TubeLab app or API
- The Bearer token authenticates as your account — treat it like a password
- Check your balance anytime: "What's my TubeLab credit balance?"
How it works
TubeLab's Codex integration uses MCP (Model Context Protocol) — an open standard that lets AI assistants use external tools directly inside a conversation. When you add TubeLab as an MCP server, Codex can call TubeLab's API on your behalf without you writing any code or leaving the chat.