Hosted MCP server
YouTube transcripts in Codex CLI
Codex CLI supports remote MCP servers in its config.toml. Add GetYouTubeTranscript there, keep your key in an environment variable, and Codex can use video transcripts while it works on your code.
Set it up
- 1
Get an API key
Sign in at getyoutubetranscript.com and create a key on the developers page (100 free credits, no card). Keys start with sk_live_.
- 2
Add the server to config.toml
Add this to ~/.codex/config.toml:
[mcp_servers.getyoutubetranscript] url = "https://getyoutubetranscript.com/api/mcp" bearer_token_env_var = "GYT_API_KEY" - 3
Set the key
Export the environment variable the config points to, for example in your shell profile:
export GYT_API_KEY="sk_live_..." - 4
Check it
Start Codex and run /mcp to see the server and its tools.
What to ask Codex
- Follow the steps in this tutorial and set the project up here: <YouTube URL>
- Summarize this release video and update CHANGELOG.md with what affects us: <YouTube URL>
- Search YouTube for a demo of the Stripe CLI and list the commands used.
Tools Codex CLI gets
| Tool | What it does | Cost |
|---|---|---|
| get_youtube_transcript | Full transcript plus title, author, thumbnail | 1 credit |
| search_youtube | Search videos or channels, paginated | 1 credit |
| get_channel_latest_videos | A channel's metadata and recent uploads | Free |
| search_channel_videos | Search within one channel | 1 credit |
| list_channel_videos | Every video a channel has uploaded | 1 credit |
| list_playlist_videos | Every video in a playlist | 1 credit |
| get_credits | Remaining credit balance for the key | Free |
Good to know
- bearer_token_env_var keeps the key out of config.toml; Codex reads it from the environment and sends it as the Authorization header.
- The server is hosted, so there is nothing to run locally and no proxy to manage.
- Tools that only read metadata, like a channel's latest uploads and your credit balance, are free.
Links
Questions about Codex CLI
Can I scope it to one project?
Yes. Codex also reads .codex/config.toml in trusted projects, so you can put the same block there instead.
Codex says the server is unauthorized.
The environment variable is probably not set in the shell that started Codex. Export GYT_API_KEY and start Codex again.
What does it cost?
Each transcript, search or channel page uses one credit from your account, and failed requests are not charged. New accounts get 100 free credits, no card, and paid plans add more credits each month.