Triangle pointing up
MCP Server

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

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 SettingsMCP Servers and click Add server. Fill in:

  1. MCP server name: TubeLab
  2. Select Streamable HTTP
  3. URL:
https://public-api.tubelab.net/mcp
  1. 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:

ToolWhat it doesCost
search_channelsSearch YouTube channels by keyword with filters (subscribers, views, language, monetization, etc.)5 credits
search_related_channelsFind channels similar to a given channel5 credits
search_outliersFind viral or underperforming videos across YouTube by keyword2 credits
search_related_outliersFind outlier videos from channels similar to a given channel2 credits
get_channelGet info about a YouTube channel (accepts ID, URL, or @handle)free
get_channel_videosGet recent videos from a channelfree
get_channel_shortsGet recent Shorts from a channelfree
get_videoGet detailed info about a specific videofree
get_video_transcriptGet the transcript/captions of a videofree
get_video_commentsGet top comments from a videofree
get_credits_balanceCheck your TubeLab credit balancefree

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.