Let the feed run. Keep the originals.

Riffler lets Claude scroll up to 10 X feeds at once and save the full-size images and videos to your repo. Free, MIT.

Install for Claude Code
claude mcp add riffler -- npx -y github:rayhankhilji/x-for-agents
npx -y github:rayhankhilji/x-for-agents login
Codex, Cursor and 5 more clients

Use a spare account for big runs; your cookies stay with you, never in chat or the repo. The limits

Sample output batch run rb81c04e · 10 jobs · 600 posts · 720 files · 41.2s

Sample images: public domain, from NASA, The Met and the Art Institute of Chicago. Credits

A contact sheet of 60 numbered frames from a sample run. Frames 2, 5b and 9 to 12 are circled to keep.

Watch a run.

38 seconds, no sound: one sentence to Claude, 10 feeds at once, one contact sheet, the originals in your repo.

Sample run on public domain images. The film has no audio track.

10 feeds at once, on one login.

Each tab scrolls the moment X answers, then scrolls again. Images, video and fonts are never drawn on screen, only downloaded.

  1. bookmarks60 posts · 81 media · 9.8s
  2. likes @sample0160 posts · 64 media · 8.1s
  3. user_media @sample0260 posts · 70 media · 7.4s
  4. search filter:videos60 posts · 92 media · 11.6s
  5. home60 posts · 58 media · 6.9s
  6. user_media @sample0360 posts · 77 media · 8.8s
  7. list 172944812060 posts · 66 media · 9.2s
  8. search #poster60 posts · 73 media · 10.4s
  9. following60 posts · 69 media · 7.7s
  10. user_media @sample0460 posts · 70 media · 8.3s

Sample output batch run rb81c04e (rows = all jobs in order) · 10 jobs · 600 posts · 41.2s

Claude never looks at a screenshot of X.

It reads the data X's own web app loads, so what comes back is a few lines of text.

What Claude reads back from x_batch Sample output
batch run rb81c04e (rows = all jobs in order) · 10 jobs · 600 posts · 41.2sfiles: 720 new, 0 had, 0 failed, 1.84GB → x-media/<handle>/<postId>_<n>.<ext>r3f9a12c · bookmarks · 60 posts · 81 media · 81 files · max_posts · 9.8sr7d20e4b · likes @sample01 · 60 posts · 64 media · 64 files · max_posts · 8.1sr0c84f1d · user_media @sample02 · 60 posts · 70 media · 70 files · max_posts · 7.4sr52be903 · search filter:videos · 60 posts · 92 media · 92 files · max_posts · 11.6src1d7a60 · home · 60 posts · 58 media · 58 files · max_posts · 6.9sr9e3305f · user_media @sample03 · 60 posts · 77 media · 77 files · max_posts · 8.8sr46fa2b8 · list 1729448120 · 60 posts · 66 media · 66 files · max_posts · 9.2srd08c7e1 · search #poster · 60 posts · 73 media · 73 files · max_posts · 10.4sr1b6e94a · following · 60 posts · 69 media · 69 files · max_posts · 7.7sra7f0d35 · user_media @sample04 · 60 posts · 70 media · 70 files · max_posts · 8.3s

about 250

tokens for 10 feeds, 600 posts and 720 files.

941 characters. No images.

60 thumbnails, one look.

When Claude needs to see, it gets one contact sheet: about 700 to 1,500 tokens. A letter picks one item from a post, so 5b is the second picture or video in post 5.

Draw a ring around frames to keep them, or click one.

x_preview returns one image Sample output

  1. 0:27
  2. 0:09
  3. 0:43
  4. gif
  5. 0:12
  6. 0:09
  7. gif
  8. 0:09
  9. 2:15
  10. 0:27
  11. 0:27

The ring becomes the call

x_download run:"rb81c04e" rows:"2,5b,9-12"
files: 6 new, 0 had, 0 failed, 41.6MB
x-media/sample08/1858927361_1.jpgx-media/sample09/1858813738_2.mp4x-media/sample07/1858596516_1.jpgx-media/sample04/1858546660_1.mp4x-media/sample01/1858484054_1.jpgx-media/sample08/1858425822_1.jpg

Add Riffler to your client.

Pick yours. Every snippet runs the same server from GitHub and needs Node 20 or later.

Claude Code

Run this in your terminal. The server builds itself on first start.

claude mcp add riffler -- npx -y github:rayhankhilji/x-for-agents
Or share it with your team in .mcp.json
{
  "mcpServers": {
    "riffler": {
      "command": "npx",
      "args": ["-y", "github:rayhankhilji/x-for-agents"],
      "env": { "X_AUTH_TOKEN": "${X_AUTH_TOKEN}", "X_CT0": "${X_CT0}" }
    }
  }
}

Claude Code asks you to approve servers from a project .mcp.json the first time.

Claude Desktop

Settings, Developer, Edit Config, then add this.

{
  "mcpServers": {
    "riffler": {
      "command": "npx",
      "args": ["-y", "github:rayhankhilji/x-for-agents"]
    }
  }
}

Quit Claude Desktop fully and open it again to load the server. On Windows the file is %APPDATA%\Claude\claude_desktop_config.json.

Codex

Run this, or add the block to your Codex config. The CLI, IDE extension and app share it.

[mcp_servers.riffler]
command = "npx"
args = ["-y", "github:rayhankhilji/x-for-agents"]
env_vars = ["X_AUTH_TOKEN", "X_CT0"]
Or from the terminal
codex mcp add riffler -- npx -y github:rayhankhilji/x-for-agents

A project .codex/config.toml loads only in trusted projects. env_vars forwards your shell values, so no cookie sits in the file.

Cursor

Add this to the project file, or to ~/.cursor/mcp.json for every project.

{
  "mcpServers": {
    "riffler": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "github:rayhankhilji/x-for-agents"],
      "env": { "X_AUTH_TOKEN": "${env:X_AUTH_TOKEN}", "X_CT0": "${env:X_CT0}" }
    }
  }
}
Visual Studio Code

Add this to the workspace file. VS Code asks for each cookie once and stores it as a secret.

{
  "inputs": [
    { "type": "promptString", "id": "x-auth-token", "description": "X auth_token cookie", "password": true },
    { "type": "promptString", "id": "x-ct0", "description": "X ct0 cookie", "password": true }
  ],
  "servers": {
    "riffler": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "github:rayhankhilji/x-for-agents"],
      "env": { "X_AUTH_TOKEN": "${input:x-auth-token}", "X_CT0": "${input:x-ct0}" }
    }
  }
}

This file uses the servers key, not mcpServers.

Zed

Run zed: open settings file and add this, or use Settings, AI, MCP Servers.

{
  "context_servers": {
    "riffler": {
      "command": "npx",
      "args": ["-y", "github:rayhankhilji/x-for-agents"]
    }
  }
}

Zed calls them context_servers.

Cline

MCP Servers, Configure, Configure MCP Servers, then add this.

{
  "mcpServers": {
    "riffler": {
      "command": "npx",
      "args": ["-y", "github:rayhankhilji/x-for-agents"],
      "disabled": false,
      "autoApprove": []
    }
  }
}
Gemini CLI

Add this to your user or project settings file.

{
  "mcpServers": {
    "riffler": {
      "command": "npx",
      "args": ["-y", "github:rayhankhilji/x-for-agents"],
      "env": { "X_AUTH_TOKEN": "$X_AUTH_TOKEN", "X_CT0": "$X_CT0" }
    }
  }
}

Set the cookies in the env block: Gemini CLI hides inherited variables named like tokens. Google moved unpaid users to Antigravity CLI in June 2026.

Reads from

5 tools Claude can call.

Ask in a sentence. Claude picks the tool and the arguments.

  1. x_collect

    Scrolls one feed, filters as it goes, downloads, and returns a run id with numbered rows.

    x_collect source:"user_media" target:"@handle" media_types:["video"]
  2. x_batch

    Up to 50 jobs across 10 tabs on one login. One line back per job.

    x_batch jobs:[{source:"bookmarks"}, {source:"likes"}]
  3. x_preview

    One contact sheet of up to 60 numbered thumbnails from a run.

    x_preview run:"rb81c04e" rows:"1-60"
  4. x_download

    Saves the rows you name, by row string or by post URL.

    x_download run:"rb81c04e" rows:"2,5b,9-12"
  5. x_status

    Login, account, tabs, rate limits left, ffmpeg and the output folder.

    x_status
Sources
home following user user_media search bookmarks likes list post url
Filters

“Videos over 30 seconds with 1,000 likes or more, posted since March.”

media_types:["video"] min_duration_s:30 min_likes:1000 since:"2026-03-01"
Files

Originals at full size and the best video bitrate, named so re-runs skip what you already have. Set X_OUTPUT_DIR=x-media to keep them inside the project.

x-media/<handle>/<postId>_<n>.jpg
Claude chat

Run riffler serve --http behind a tunnel and add its URL as a custom connector; results open as a gallery in the chat. That server holds your cookies on a public URL, so set X_MCP_TOKEN.

The full README

Free and MIT licensed. No paid plan, no account with us. The only bill is the tokens Claude spends.

Terminal
claude mcp add riffler -- npx -y github:rayhankhilji/x-for-agents