MCP Server
Use Stophy through the Model Context Protocol. Gives AI agents direct access to YouTube: search, transcripts, comments, channels, and playlists.
stophy-mcp is an open-source MCP server that exposes all Stophy endpoints as tools for AI agents. Works with Claude, Cursor, VS Code, Windsurf, and any MCP-compatible client.
Quick start
env STOPHY_API_KEY=st_YOUR_API_KEY npx -y stophy-mcpSetup
Get your API key from stophy.dev/dashboard.
Claude Desktop
Add this to your Claude Desktop config file.
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"stophy": {
"command": "npx",
"args": ["-y", "stophy-mcp"],
"env": {
"STOPHY_API_KEY": "your_api_key_here"
}
}
}
}If you see a spawn npx ENOENT error, Node.js is not installed or not in your PATH. Install it from nodejs.org (LTS version), then fully restart Claude Desktop.
Claude Code
claude mcp add stophy -e STOPHY_API_KEY=your_api_key -- npx -y stophy-mcpCursor
Open Cursor Settings
Go to Features > MCP Servers
Click "+ Add new global MCP server" and paste:
{
"mcpServers": {
"stophy": {
"command": "npx",
"args": ["-y", "stophy-mcp"],
"env": {
"STOPHY_API_KEY": "your_api_key_here"
}
}
}
}Refresh the MCP server list. The Stophy tools will appear automatically in the Composer Agent.
VS Code
Add to your User Settings JSON (Ctrl+Shift+P → Preferences: Open User Settings (JSON)):
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "apiKey",
"description": "Stophy API Key",
"password": true
}
],
"servers": {
"stophy": {
"command": "npx",
"args": ["-y", "stophy-mcp"],
"env": {
"STOPHY_API_KEY": "${input:apiKey}"
}
}
}
}
}Or add it to .vscode/mcp.json in your project to share the config with your team:
{
"inputs": [
{
"type": "promptString",
"id": "apiKey",
"description": "Stophy API Key",
"password": true
}
],
"servers": {
"stophy": {
"command": "npx",
"args": ["-y", "stophy-mcp"],
"env": {
"STOPHY_API_KEY": "${input:apiKey}"
}
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"stophy": {
"command": "npx",
"args": ["-y", "stophy-mcp"],
"env": {
"STOPHY_API_KEY": "your_api_key_here"
}
}
}
}Tools
| Tool | What it does |
|---|---|
stophy_search_videos | Search YouTube by keyword with filters for type, date, duration, and sort order |
stophy_get_video | Get details, transcript, or comments for a video URL |
stophy_get_channel | Browse a channel's videos, shorts, playlists, or about page |
stophy_get_playlist | Fetch all videos in a playlist with full metadata |
stophy_get_suggestions | Get autocomplete suggestions for a partial query |
stophy_get_credits | Check your remaining credit balance |
Each tool call costs one credit. stophy_get_credits is free.
Environment variables
| Variable | Required | Description |
|---|---|---|
STOPHY_API_KEY | Yes | Your Stophy API key from stophy.dev/dashboard |
Error Handling
All errors return a JSON body with a machine-readable code. Rate limit is 120 req/min.
Video POST
Fetch video details, transcript, comments, or replies. Pass type: details for metadata, transcript for timestamped captions, comments for top-level comments, or replies for a comment thread (pass the repliesToken from a comment as continuationToken).