How to Get YouTube Transcripts in Cursor with MCP
Cursor is an AI code editor with built-in MCP support. By default, it works with your local codebase and whatever the model knows from training. Pulling content from YouTube, a tutorial you want to reference or a conference talk with relevant context, normally means leaving the editor. AgentPatch connects Cursor to a YouTube transcript tool so it can fetch that content directly.
Why This Matters
Technical video content is everywhere but hard to work with programmatically. You can’t search a video. If a key architectural explanation lives inside a recorded presentation, your agent can’t use it unless it can read the transcript.
With AgentPatch connected, Cursor can fetch a YouTube transcript mid-session and use that content to answer questions, inform code decisions, or populate documentation. The transcript comes back with timestamps, so you can reference or jump to specific sections.
This is different from summarization. Sometimes you want the raw transcript: to quote it directly, to search for a specific term, or to process the text yourself. The tool returns the full text with timing data.
Setup
The AgentPatch CLI is designed for AI agents to use via shell access. Install it, and your agent can discover and invoke any tool on the marketplace.
Install (zero dependencies, Python 3.10+):
pip install agentpatch
Set your API key:
export AGENTPATCH_API_KEY=your_api_key
Example commands your agent will use:
ap search "web search"
ap run google-search --input '{"query": "test"}'
Get your API key from the AgentPatch dashboard.
- Open Cursor Settings (Cmd+Shift+J on Mac, Ctrl+Shift+J on Windows/Linux).
- Navigate to the MCP section in the sidebar.
- Click Add new global MCP server.
- Cursor opens
~/.cursor/mcp.json. Add the AgentPatch server config:
{
"mcpServers": {
"agentpatch": {
"url": "https://agentpatch.ai/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
- Replace
YOUR_API_KEYwith your actual key from the AgentPatch dashboard. - Save and restart Cursor. It discovers all AgentPatch tools automatically.
Example
You’re implementing a feature and there’s a recorded walkthrough of the API you’re building against. In Cursor’s chat:
“Fetch the transcript for this video and find where they discuss rate limiting: https://www.youtube.com/watch?v=abc123”
Cursor calls the YouTube Transcript tool through AgentPatch, returns the full transcript, and highlights the section on rate limiting with timestamps. You can read the exact words used and decide how to handle the edge case.
Another scenario: you’re writing documentation and want to cross-reference a well-known talk.
“Get the transcript from this video and pull out every mention of ‘caching strategy’ with timestamps.”
Cursor fetches the transcript and returns the relevant passages. No browser, no caption window, no copy-pasting.
For more structured work:
“Fetch this video’s transcript and convert the speaker’s step-by-step instructions into a numbered list I can put in our docs.”
Cursor gets the raw text and reformats it. The video content becomes usable documentation without you watching a single minute of footage.
Wrapping Up
The YouTube Transcript tool is part of a larger marketplace. Once AgentPatch is connected to Cursor, you also get access to web search, email, image generation, Google Maps, and more with no additional configuration. Visit agentpatch.ai to see the full list.