# Claude Feed Sorting MCP - Quick Reference

## Connection

Add to your `~/.claude/settings.json` (token provided during onboarding):

```json
{
  "mcpServers": {
    "feed-sorting": {
      "url": "https://sort-mcp.aprendio.ai/mcp?token=YOUR_TOKEN"
    }
  }
}
```

Works in both Claude Code and Claude Cowork — no special setup needed.

---

## THE MOST IMPORTANT THING

To download or transcribe a video, you ONLY need the **page URL from the browser**.

Example: `https://www.instagram.com/reel/DT5tRboDjef/`

That's it. Just copy the URL and pass it to the MCP tool:

```
extract_social_media(url: "https://www.instagram.com/reel/DT5tRboDjef/")
```

Or to transcribe directly:

```
transcribe_audio(audioUrl: "https://www.instagram.com/reel/DT5tRboDjef/")
```

**You do NOT need:**
- CDN URLs
- Media IDs
- JavaScript extraction
- curl/wget/yt-dlp commands

**Just the page URL from the browser address bar.**

---

## Key Rule: Tools Run on the SERVER

All MCP tools execute on the remote server, NOT in your local/VM environment.

**DO NOT** use curl, wget, or yt-dlp directly - they will fail due to proxy restrictions.
**DO** use the MCP tools - they run on an unrestricted server.

---

## Primary Tools

### extract_social_media
Downloads video + thumbnail to server. Returns file paths AND download URLs.
```
extract_social_media(url: "https://www.instagram.com/reel/ABC123/")
```

### transcribe_audio
Downloads AND transcribes in one step. Returns transcript text.
```
transcribe_audio(audioUrl: "https://www.instagram.com/reel/ABC123/", model: "base")
```

### get_social_media_info
Get metadata WITHOUT downloading.
```
get_social_media_info(url: "https://www.instagram.com/reel/ABC123/")
```

### transcribe_local_file
Transcribe a file already on the server (after extract_social_media).
```
transcribe_local_file(filePath: "/tmp/claude-feed-downloads/you/username_ABC123.mp4")
```

---

## Retrieving Downloaded Files

Files are stored per-user on the server. Use these endpoints (auth required):

### List your files
```
GET https://sort-mcp.aprendio.ai/files
```

### Download a file
```
GET https://sort-mcp.aprendio.ai/files/username_ABC123.mp4
```
