fleapit
MCP server that enables AI agents to search torrents, download them, and stream video directly to VLC while managing active downloads.
README
<p align="center"> <img src="assets/logo-flea.svg" alt="" width="112" height="112"> </p>
<h1 align="center">fleapit</h1>
<p align="center"><b>The seediest cinema in your terminal.</b></p>
A fleapit is British slang for the scruffy neighborhood picture-house — sticky floors, creaky seats, but it played everything and everyone secretly loved it. This fleapit is an MCP server that lets any terminal AI agent find torrents, download them, and stream video straight to VLC. And yes: every show here is powered by seeders.
- Search — curated scrapers (vendored from torlink, MIT): YTS, The Pirate Bay, 1337x, EZTV, Nyaa, SubsPlease, FitGirl, BitTorrented. Results come back with size, seeders, and ready-to-use magnet links.
- Download — WebTorrent under the hood; downloads run in the background inside the server process, saved to
~/Downloadsby default. - Stream — a local HTTP server with Range support streams any video file while it downloads; VLC launches automatically and playback starts within seconds.
What it looks like
Once fleapit is hooked up, you just talk to your agent:
"Find me Big Buck Bunny and play it" → agent calls
search_torrents, picks the healthiest result, callsstream_torrent— VLC opens and playback starts while the download runs behind it.
"Download the latest SubsPlease release of that show" →
search_torrentswithcategory: "anime", thendownload_torrent; the file lands in~/Downloads.
"How are my downloads doing?" →
list_downloads— progress, speed, ETA, peers.
"That torrent has 12 episodes, play episode 3" →
list_filesto see indexes, thenstream_torrentwithfileIndex.
Requirements
- Node.js ≥ 20
- VLC for streaming (
brew install --cask vlcon macOS) — downloads work without it, andstream_torrentstill returns a URL any player can open
Hook it up to your agent
fleapit is on npm — no clone, no build. The server speaks MCP over stdio, so it works with every MCP-capable agent.
Claude Code:
claude mcp add fleapit -- npx -y fleapit
Gemini CLI — ~/.gemini/settings.json:
{
"mcpServers": {
"fleapit": { "command": "npx", "args": ["-y", "fleapit"] }
}
}
Codex CLI — ~/.codex/config.toml:
[mcp_servers.fleapit]
command = "npx"
args = ["-y", "fleapit"]
OpenCode — opencode.json:
{
"mcp": {
"fleapit": { "type": "local", "command": ["npx", "-y", "fleapit"] }
}
}
Claude Code plugin — same MCP server, but also ships the torrents usage skill that teaches Claude when to search vs. download vs. stream. No clone, no build; paste both lines into Claude Code:
/plugin marketplace add nikets40/fleapit
/plugin install fleapit@niket-tools
Tools
| Tool | What it does |
|---|---|
search_torrents |
Search all (or one category of) sources; sorted by seeders, deduped by infohash |
download_torrent |
Add a magnet/infohash and download in the background |
stream_torrent |
Stream the (largest) video file to VLC while downloading |
list_files |
List files in a torrent, with indexes for stream_torrent |
list_downloads |
Progress, speed, ETA, peers for everything active |
control_torrent |
pause / resume / remove (keep files) / delete (remove files) |
Configuration
| Env var | Effect |
|---|---|
FLEAPIT_DIR |
Default download folder (default: ~/Downloads) |
VLC_PATH |
Explicit VLC binary if it's not on the default path |
How it works
One Node process is the whole machine. The MCP server owns a lazy WebTorrent client; search_torrents fans out to the vendored scrapers in parallel (a dead source is reported, never fatal) and merges results by seeders. stream_torrent adds the magnet, waits for metadata, picks the largest video file, and starts a loopback-only HTTP server with Range support in front of file.createReadStream — WebTorrent prioritizes the pieces behind whatever byte range the player asks for, so seeking works and playback starts long before the download finishes. VLC is launched pointing at that URL (open -a VLC on macOS, VLC_PATH override anywhere).
Development
npm run dev # run from source (tsx)
npm run typecheck # tsc --noEmit
npm run build # bundle to dist/ (tsup)
Layout: src/index.ts (MCP tools) → src/engine.ts (WebTorrent wrapper) → src/stream-server.ts (Range streaming) + src/vlc.ts (player launch). Search scrapers live in src/vendor/sources/, one file per source with a common Source interface — adding a source means one new file and one line in registry.ts.
Troubleshooting
- "No results" — a source may be blocked on your network; the response's
sourcesOfflinesays which. Try another category or query. - Metadata timeout on stream/download — weak swarm. Pick a result with more seeders.
- VLC doesn't open — install VLC or set
VLC_PATH; the stream URL in the response works in any player (QuickTime, mpv, a browser). - WebRTC peers — the optional
node-datachannelnative module adds WebRTC peer support. If your npm blocks its install script, everything still works over TCP/uTP/DHT.
Notes
- Torrents are active only while the server runs; re-adding a magnet resumes from whatever file data is already on disk.
- The stream URL binds to
127.0.0.1only. - Search scrapers in
src/vendor/are vendored from torlink (MIT — seesrc/vendor/TORLINK-LICENSE); diff against upstream occasionally to pick up scraper fixes. - What you download is your responsibility. Several of the indexed sources list copyrighted material.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。