# Prism for AI agents and the command line Prism can be driven by AI agents (through the **Model Context Protocol**, MCP) and by your own scripts (through a small **command-line** program). An agent can download a file, a video or a magnet link for you, follow it, wait until it finishes and tell you where the file is. Both go through Prism's helper program, `prism-native-host` — the same one the browser extension talks through. It's installed with Prism on every system. ## Turn it on Agents and scripts can't do anything until you allow them: **Prism → Settings → MCP & CLI → Let AI agents and scripts use Prism** The same page shows the helper's exact path on your computer, a ready MCP configuration and the Claude Code command, each with a **Copy** button. When it's off, every request is answered with a note saying where to turn it on, so an agent can tell you what to do. > Nothing an agent or a script does deletes files: *remove* only takes downloads off Prism's > list, their files stay where they are. ## AI agents (MCP) Add Prism to your agent's MCP settings (Claude Desktop, Cursor, VS Code, Windsurf and other apps that speak MCP). Copy the block from Settings, it already has the right path: ```json { "mcpServers": { "prism": { "command": "C:\\Users\\you\\AppData\\Local\\Prism\\prism-native-host.exe", "args": ["mcp"] } } } ``` Claude Code: ```sh claude mcp add prism -- "" mcp ``` Prism doesn't need to be open: the helper starts it in the background when an agent asks for something. ### Tools | Tool | What it does | |---|---| | `add_download` | Download links: files, video pages (YouTube, Vimeo, …) and magnet or `.torrent` links. Optional folder, file name, quality (`best`, `audio` or a height like `720`), start now, later or in a queue. | | `list_downloads` | The downloads in the list, newest first; filter by state or search. | | `get_download` | One download: state, progress, speed, time left, file path. | | `wait_for_download` | Wait until a download finishes, fails or is paused (up to 30 minutes). | | `pause_downloads` / `resume_downloads` | Pause or start downloads, or all of them. | | `remove_downloads` | Take downloads off the list. Their files stay. | | `get_statistics` | How much Prism downloaded. | | `list_queues`, `start_queue`, `stop_queue` | The queues. | | `set_speed_limit` | A speed limit for all downloads in MB/s, `0` lifts it. | | `show_prism` | Bring Prism's window to the front. | Try asking your agent: *"Download the latest Blender for Windows with Prism and tell me when it's done"* or *"What is Prism downloading right now?"* ## Command line Run the helper with a command. On Windows use its full path (Settings shows it), or add its folder to `PATH`; on Linux `deb`/`rpm` installs put it on `PATH` already. ```sh prism-native-host add https://example.com/file.zip --wait prism-native-host add "https://www.youtube.com/watch?v=..." --quality 1080 --folder ~/Videos prism-native-host list --status active prism-native-host pause --all prism-native-host limit 2M prism-native-host help commands ``` | Command | | |---|---| | `add ... [--folder ] [--name ] [--later \| --queue ] [--quality best\|audio\|] [--wait]` | Download links | | `list [--status all\|active\|unfinished\|finished\|failed\|paused\|queued\|trash] [--search ] [--limit ]` | The list, newest first | | `get ` | One download | | `wait ... [--timeout ]` | Wait until downloads finish | | `pause ... \| --all`, `resume ... \| --all` | Pause or start downloads | | `remove ...` | Take downloads off the list (their files stay) | | `stats`, `queues`, `queue start\|stop ` | Statistics and queues | | `limit \| off` | Speed limit, e.g. `2M` or `500K` per second | | `open` | Show Prism's window | Add `--json` to any command for Prism's answer as JSON, for scripts. Exit codes: `0` done, `1` Prism said no (or a download didn't finish), `2` the command was written wrong.