MCP (Model Context Protocol)
Use TranscriptAPI seamlessly with AI assistants through the Model Context Protocol (MCP).
Complete guide to integrate TranscriptAPI with Claude AI assistant via MCP.
Step-by-step guide to connect TranscriptAPI with ChatGPT using OAuth authentication.
Learn how to set up TranscriptAPI with OpenAI Agent Builder for AI workflows.
What is MCP?
Section titled “What is MCP?”Model Context Protocol (MCP) is a standardized framework that enables AI assistants like Claude and ChatGPT to connect directly with external tools and data sources. With TranscriptAPI’s MCP integration, your AI can fetch YouTube transcripts on-demand without manual copy-pasting or switching between applications.
Key Benefits:
- Direct integration into your AI workflow
- No manual transcript fetching needed
- Consistent, structured data format
- Works with any MCP-compatible platform
Why Use TranscriptAPI with MCP?
Section titled “Why Use TranscriptAPI with MCP?”TranscriptAPI offers unique advantages for YouTube Transcript MCP integration:
Universal Compatibility
Section titled “Universal Compatibility”TranscriptAPI works with any platform that supports MCP. Whether your platform uses OAuth for seamless authentication (like Claude and ChatGPT) or requires manual API key configuration (like OpenAI Agent Builder), we provide both options to ensure maximum compatibility.
Proven Reliability
Section titled “Proven Reliability”- Battle-tested with major AI platforms
- Consistent performance across all authentication methods
- Same powerful transcript extraction engine as our REST API
- Flexible authentication options (OAuth or API Key) based on your platform’s requirements
Prerequisites
Section titled “Prerequisites”Before setting up TranscriptAPI with MCP, ensure you have:
- A TranscriptAPI account (sign up free)
- An AI assistant or platform that supports MCP
- For OAuth: A web browser for the initial authorization
- For API Key: An active API key from your dashboard
MCP Server Configuration
Section titled “MCP Server Configuration”Get your MCP configuration details from the MCP dashboard or use these settings:
| Property | Value |
|---|---|
| Server Name | Transcript API |
| Server URL | https://transcriptapi.com/mcp |
| Description | Use TranscriptAPI to fetch YouTube video transcript automatically |
| Icon | Download Icon |
Authentication
Section titled “Authentication”TranscriptAPI supports two authentication methods to work with different MCP platforms:
OAuth Authentication
Section titled “OAuth Authentication”OAuth provides automatic, secure authentication without manual key management. Supported by:
- Claude (Dynamic Client Registration - optional credentials)
- ChatGPT (Static Client Registration - requires Client ID/Secret)
- Any MCP client supporting OAuth 2.1
Two Registration Methods:
TranscriptAPI supports both Dynamic Client Registration (DCR) and Static Client Registration to work with different platforms:
1. Dynamic Client Registration (Claude, optional)
- Claude and other clients that support DCR can automatically register
- No Client ID/Secret needed - just add the MCP server URL
- The client automatically discovers OAuth endpoints and registers itself
- You’ll be redirected to authorize access (one-time)
2. Static Client Registration (ChatGPT, required)
- ChatGPT requires Client ID and Client Secret upfront
- Get your credentials from the MCP Integration dashboard
- Select “OAuth (Recommended)” and click “Generate Credentials”
- Copy your Client ID and Client Secret
- Add them to your ChatGPT MCP connector configuration
How it works:
- Add the MCP server URL to your client
- For ChatGPT: Add Client ID and Client Secret
- For Claude: Credentials are optional (DCR supported)
- The client automatically discovers our OAuth endpoints
- You’ll be redirected to authorize access (one-time)
- Tokens are managed automatically with refresh support
Technical Details:
- Uses OAuth 2.1 with both Dynamic Client Registration (RFC 7591) and Static Registration
- Authorization server metadata:
/.well-known/oauth-authorization-server - Protected resource metadata:
/.well-known/oauth-protected-resource - Required scope:
mcp:access - Access tokens prefixed with
oat_
Benefits:
- No manual key management (for DCR clients)
- Automatic token refresh
- Secure, time-limited access
- Revocable permissions
- Platform-specific support (ChatGPT and Claude)
API Key Authentication
Section titled “API Key Authentication”API Key authentication provides simple, direct access for platforms that don’t support OAuth. Required for:
- OpenAI Agent Builder
- Custom MCP implementations
- Development/testing environments
How it works:
- Get your API key from the API Keys dashboard
- Add it to your MCP client configuration
- The key is sent as a Bearer token with each request
Configuration:
{ "mcpServers": { "transcriptapi": { "url": "https://transcriptapi.com/mcp", "apiKey": "sk_your_api_key_here" } }}Technical Details:
- Bearer token authentication:
Authorization: Bearer sk_... - API keys prefixed with
sk_ - Keys never expire (unless manually revoked)
- Same key works for both REST API and MCP
Security Best Practices:
- Store keys in environment variables
- Never commit keys to version control
- Use separate keys for different environments
- Rotate keys regularly
Available Tools
Section titled “Available Tools”get_youtube_transcript
Section titled “get_youtube_transcript”Extract transcripts from any YouTube video with full control over the output format.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
video_url | string | required | YouTube video URL or 11-character video ID |
send_metadata | boolean | true | Include video title, author, and thumbnail |
format | string | "text" | Output format: "text" (markdown) or "json" (structured) |
include_timestamp | boolean | true | Include timestamps with each segment |
Accepted URL Formats:
- Full URL:
https://www.youtube.com/watch?v=dQw4w9WgXcQ - Short URL:
https://youtu.be/dQw4w9WgXcQ - Video ID only:
dQw4w9WgXcQ
Example Usage:
// Get transcript as markdown with metadata (default)get_youtube_transcript({ video_url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"})
// Returns:{ "content": "# Metadata\n## Title: Rick Astley - Never Gonna Give You Up\n## Author: RickAstleyVEVO\n## Author URL: https://www.youtube.com/@RickAstley\n## Thumbnail: https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg\n\n# Transcript\n[0.0s] Never gonna give you up\n[4.12s] Never gonna let you down..."}
// Get JSON format without metadataget_youtube_transcript({ video_url: "dQw4w9WgXcQ", format: "json", send_metadata: false})
// Returns:{ "content": { "transcript": [ { "text": "Never gonna give you up", "start": 0.0, "duration": 4.12 }, { "text": "Never gonna let you down", "start": 4.12, "duration": 3.85 } ] }}
// Get plain text without timestampsget_youtube_transcript({ video_url: "dQw4w9WgXcQ", format: "text", include_timestamp: false, send_metadata: false})
// Returns:{ "content": "# Transcript\nNever gonna give you up Never gonna let you down Never gonna run around and desert you..."}Output Formats:
Returns markdown-formatted text with optional metadata header and timestamped transcript lines.
# Metadata## Title: Video Title Here## Author: Channel Name## Author URL: https://www.youtube.com/@ChannelName## Thumbnail: https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg
# Transcript[0.0s] First line of transcript[3.5s] Second line of transcript[7.2s] Third line of transcriptReturns structured data with transcript segments and optional metadata.
{ "transcript": [ { "text": "First line of transcript", "start": 0.0, "duration": 3.5 }, { "text": "Second line of transcript", "start": 3.5, "duration": 3.7 } ], "metadata": { "title": "Video Title Here", "author_name": "Channel Name", "author_url": "https://www.youtube.com/@ChannelName", "thumbnail_url": "https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg" }}Platform Integration
Section titled “Platform Integration”TranscriptAPI MCP works with any platform that supports the Model Context Protocol. Here are guides for popular platforms:
Tested Platforms
Section titled “Tested Platforms”- Connect to Claude - OAuth authentication support
- Connect to ChatGPT - OAuth authentication support
- Connect to OpenAI Agent Builder - API key authentication
Universal Compatibility
Section titled “Universal Compatibility”TranscriptAPI works with any tool, framework, or custom implementation that supports MCP:
- OAuth-enabled platforms: Automatic authentication and token management
- API key platforms: Manual configuration with your TranscriptAPI key
- Custom implementations: Choose the authentication method that fits your needs
Credit Usage & Rate Limits
Section titled “Credit Usage & Rate Limits”MCP requests consume credits and are subject to rate limits just like REST API calls:
Credit Cost
Section titled “Credit Cost”- 1 credit per successful transcript request
- Only charged on HTTP 200 responses
- Failed requests (4xx, 5xx) don’t consume credits
- Cached responses still consume 1 credit
Rate Limits
Section titled “Rate Limits”- 200 requests per minute per API key/OAuth token
- 2 concurrent requests maximum
- Rate limits apply across all API usage (REST + MCP combined)
See API Rate Limits for detailed information and best practices.
Error Handling
Section titled “Error Handling”The YouTube Transcript MCP tool returns user-friendly error messages that AI assistants can understand and communicate:
Common Errors
Section titled “Common Errors”| Error Code | Description | Solution |
|---|---|---|
| 401 | Invalid authentication | Check your API key or re-authorize OAuth |
| 402 | Insufficient credits | Purchase more credits or upgrade plan |
| 404 | Transcript not available | Video may not have captions or be private |
| 422 | Invalid YouTube URL | Provide a valid YouTube URL or video ID |
| 429 | Rate limit exceeded | Wait before retrying (see Retry-After header) |
| 500 | Server error | Temporary issue, retry after a few moments |
Error Response Format
Section titled “Error Response Format”Errors are returned in a format that AI assistants can easily interpret:
{ "content": "Unable to fetch transcript: Payment required. You have no credits remaining. Please purchase more credits at https://transcriptapi.com/dashboard/billing"}The AI assistant will communicate these errors naturally to the user.
Best Practices
Section titled “Best Practices”Security
Section titled “Security”- OAuth platforms: Let the platform handle token storage and refresh
- API key platforms: Store keys in environment variables, never in code
- Rotate API keys regularly for enhanced security
- Monitor usage through the dashboard to detect anomalies
Performance
Section titled “Performance”- Batch requests when possible to stay within rate limits
- Cache transcripts locally if you need them multiple times
- Handle 402 errors gracefully—inform users about credit status
- Implement exponential backoff for retries on 429/500 errors
Integration Tips
Section titled “Integration Tips”- Test with common videos first to ensure configuration works
- Provide context to the AI about video content for better responses
- Use metadata to give AI information about video source and author
- Choose the right format: JSON for structured processing, text for natural language
Troubleshooting
Section titled “Troubleshooting”OAuth Issues
Section titled “OAuth Issues”- “Authorization failed”: Clear browser cookies and try again
- “Invalid redirect”: Ensure you’re using the latest MCP client version
- Token expiration: OAuth tokens auto-refresh; if issues persist, re-authorize
API Key Issues
Section titled “API Key Issues”- “Invalid API key”: Verify key starts with
sk_and is active in dashboard - “No credits”: Check credit balance at /dashboard/billing
- Key not working: Ensure no extra spaces when copying the key
General Issues
Section titled “General Issues”- No transcript returned: Video might not have captions available
- Slow responses: Check if video is very long (>2 hours)
- Connection errors: Verify your internet connection and firewall settings
Next Steps
Section titled “Next Steps”Ready to get started? Here’s what to do next:
- Get your credentials: Sign up and get an API key or prepare for OAuth
- Choose your platform: Select from our platform-specific guides
- Configure MCP: Follow the configuration examples above
- Test it out: Try fetching a transcript from a YouTube video
- Explore the API: Check our REST API Reference for advanced usage
Need live testing? Try our Swagger UI to experiment with the API directly.