# Testing YTPipe with Claude Code
## π― Current Status
β
**MCP Server Configured**: Added to `~/.claude/mcp_settings.json`
β
**Repository**: https://github.com/leolech14/ytpipe
β
**Tools**: 12 available (pipeline, query, analytics)
---
## π Next Steps to Test
### 1. Restart Claude Code
**IMPORTANT**: MCP servers are loaded on startup. You need to restart Claude Code for ytpipe tools to become available.
```bash
# Restart Claude Code completely
# Then the ytpipe tools will be discoverable
```
### 2. Verify Tools are Available
After restart, in a new Claude Code session:
```
User: "What ytpipe tools are available?"
Claude: *should list all 12 ytpipe tools*
```
### 3. Test Pipeline Tool
```
User: "Process this YouTube video: https://youtube.com/watch?v=dQw4w9WgXcQ"
Claude: *calls ytpipe_process_video*
Claude: "β
Video processed successfully!
- Title: Rick Astley - Never Gonna Give You Up
- Chunks: 1 (367 words)
- Embeddings: β
- Time: ~15 seconds"
```
### 4. Test Analytics Tools
```
User: "Optimize SEO for video dQw4w9WgXcQ"
Claude: *calls ytpipe_seo_optimize*
Claude: "SEO recommendations:
- Score: 87/100
- Suggested title: ...
- Tags: love, music, 80s, pop, rick-astley"
```
```
User: "Show me the topic timeline for video dQw4w9WgXcQ"
Claude: *calls ytpipe_topic_timeline*
Claude: "Topic analysis:
- Main keywords: love, never, gonna, give
- Topic shifts detected: 0
- Consistent theme throughout"
```
### 5. Test Search Tools
```
User: "Search video dQw4w9WgXcQ for 'love'"
Claude: *calls ytpipe_search*
Claude: "Found 3 matches:
- [0:30] ...strangers to love...
- [1:15] ...never gonna give you up...
- [2:45] ...love theme continues..."
```
---
## π§ͺ Manual Testing (Without Restart)
If you want to test NOW without restarting:
```bash
cd ~/PROJECTS_all/PROJECT_ytpipe
source venv/bin/activate
# Test MCP server
python3 -c "
from ytpipe.mcp.server import mcp
import asyncio
async def test():
tools = await mcp.list_tools()
print(f'β
{len(tools)} tools registered')
for tool in tools:
print(f' - {tool.name}')
asyncio.run(test())
"
# Test processing a video
python3 << 'PYEOF'
import asyncio
from ytpipe.mcp.server import ytpipe_process_video
async def test():
result = await ytpipe_process_video(
url="https://youtube.com/watch?v=dQw4w9WgXcQ",
output_dir="./DEMO_OUTPUT",
backend="faiss"
)
print(f"Success: {result['success']}")
print(f"Title: {result['metadata']['title']}")
print(f"Chunks: {len(result['chunks'])}")
asyncio.run(test())
PYEOF
```
---
## π― Expected Behavior
### After Restart
When you ask Claude Code to process a video, you should see:
1. **Tool Discovery**: Claude finds ytpipe tools
2. **Tool Call**: Claude calls `ytpipe_process_video`
3. **Processing**: Pipeline executes (15-120s depending on video)
4. **Results**: Claude reports back with:
- Video metadata
- Processing stats
- Output location
- Any insights
### In This Session (Before Restart)
MCP tools won't be available yet because servers load on startup. But you can:
- Test manually with Python (as shown above)
- Verify the configuration is correct
- See that the server starts successfully
---
## π Troubleshooting
### If Tools Don't Appear After Restart
1. **Check MCP settings**:
```bash
cat ~/.claude/mcp_settings.json
```
2. **Test server manually**:
```bash
cd ~/PROJECTS_all/PROJECT_ytpipe
source venv/bin/activate
python -m ytpipe.mcp.server
```
3. **Check logs**:
```bash
cat ~/.claude/logs/*.log | grep ytpipe
```
### If Processing Fails
- Check FFmpeg is installed: `ffmpeg -version`
- Check virtual environment is set up
- Try with verbose: `--verbose` flag
- Check output directory permissions
---
## π What Each Tool Does
### Pipeline
- `ytpipe_process_video` - Full 8-phase pipeline β Start here
- `ytpipe_download` - Just download + metadata
- `ytpipe_transcribe` - Just transcription
- `ytpipe_embed` - Just embeddings
### Query
- `ytpipe_search` - Find keywords in transcript
- `ytpipe_find_similar` - Semantic similarity
- `ytpipe_get_chunk` - Get specific chunk
- `ytpipe_get_metadata` - Get video info
### Analytics
- `ytpipe_seo_optimize` - Title/tag optimization
- `ytpipe_quality_report` - Content quality metrics
- `ytpipe_topic_timeline` - Topic evolution
- `ytpipe_benchmark` - Performance analysis
---
**Ready to test in next Claude Code session!** π