# Trợ lý AI (MCP)

VDM comes with an [MCP](https://modelcontextprotocol.io) server, `voltdownloadmanager-mcp`, so an AI assistant that supports MCP (Claude Desktop, Claude Code, Cursor, VS Code and others) can work with the downloads in your running VDM. You ask in your own words:

- "What is VDM downloading right now, and how long is left?"
- “Tải https://example.com/big.iso xuống D:\ISOs tối nay, nhưng chưa bắt đầu tải.”
- "Tạm dừng tất cả những gì đang tải xuống."
- "Xóa các bản tải xuống đã hoàn tất khỏi danh sách nhưng giữ lại các tệp."

Trợ lý tự khởi động máy chủ; bạn chỉ cần cho trợ lý biết vị trí của máy chủ một lần. Máy chủ chuyển từng yêu cầu đến ứng dụng thông qua [API tự động hóa](https://vdm.mikaillab.com/vi/help/command-line.html#the-automation-api), chỉ trên máy tính này.

## Trợ lý có thể làm gì

| Công cụ | Chức năng |
|---|---|
| `list_downloads` | Liệt kê các mục tải xuống của bạn, mới nhất trước: tệp, địa chỉ, thư mục, trạng thái, kích thước, mức độ hoàn thành, tốc độ. Nó có thể chỉ liệt kê một ID, chỉ một trạng thái (Đã xếp hàng, Đang tải xuống, Đã dừng, Hoàn tất, Lỗi), chỉ tên và địa chỉ có chứa một số văn bản, hoặc chỉ một danh mục hoặc hàng đợi; cũng báo cáo dung lượng đĩa trống. |
| `add_download` | Adds an http, https, ftp or ftps address and starts it, or only queues it (into the main queue by default, or a designated queue). It can say which folder, file name and category to use, the checksum the finished file must have, in the same form as the command line's `--checksum` (hex MD5, SHA-1, SHA-256, SHA-512 or CRC32, optionally named, e.g. `sha256:…`), and a custom Referer, User-Agent, or Cookie header. A magnet link opens **Add torrent** in VDM, for you to choose the files. |
| `pause_downloads` | Tạm dừng các bản tải xuống đang chạy. |
| `resume_downloads` | Bắt đầu hoặc tiếp tục tải xuống các mục đã dừng, đang chờ hoặc bị lỗi. |
| `remove_downloads` | Xóa các mục tải xuống khỏi danh sách nhưng giữ lại tệp, hoặc xóa cả tệp nếu được yêu cầu. Phải tạm dừng mục đang tải xuống trước khi xóa. |
| `start_queue` | Bắt đầu một hàng đợi tải xuống (hàng đợi chính theo mặc định, hoặc theo tên). |
| `stop_queue` | Dừng một hàng đợi tải xuống (hàng đợi chính theo mặc định, hoặc theo tên). |

The assistant can't change VDM's options, see your browser, or turn the automation API on by itself.

## Thiết lập

### 1. Bật API tự động hóa

Listing and acting on downloads needs VDM's automation API, which is off until you turn it on. With VDM running, run this once (it stays on):

```
voltdownloadmanager-cli api on
```

`voltdownloadmanager-cli api off` turns it off again. Without the API, the assistant can still add downloads, the same as VDM's [command line](https://vdm.mikaillab.com/vi/help/command-line.html#the-apps-command-line).

### 2. Tìm máy chủ

`voltdownloadmanager-mcp`nằm cạnh ứng dụng:

| Bạn đã cài đặt | Máy chủ |
|---|---|
| Windows, chỉ cài đặt cho bạn (mặc định của trình cài đặt) | `%LOCALAPPDATA%\Programs\Volt Download Manager\voltdownloadmanager-mcp.exe` |
| Windows, cài đặt cho mọi người | `C:\Program Files\Volt Download Manager\voltdownloadmanager-mcp.exe` |
| Windows, tệp zip hoặc [bản portable](https://vdm.mikaillab.com/vi/help/portable.html) | `voltdownloadmanager-mcp.exe`trong thư mục chứa ứng dụng |
| macOS | `/Applications/Volt Download Manager.app/Contents/MacOS/voltdownloadmanager-mcp` |
| Linux, tệp .deb hoặc .rpm | `/usr/bin/voltdownloadmanager-mcp` |
| Linux, tệp .tar.gz | `voltdownloadmanager-mcp`trong thư mục của nó (AppImage không hiển thị: hãy dùng .tar.gz) |

A portable copy's server finds the portable copy's VDM by itself, from its own folder.

### 3. Cho trợ lý biết

**Claude Desktop**: **Cài đặt → Nhà phát triển → Sửa cấu hình** mở `claude_desktop_config.json`. Thêm máy chủ, sau đó khởi động lại Claude Desktop:

```
{
  "mcpServers": {
    "voltdownloadmanager": {
      "command": "C:\\Users\\you\\AppData\\Local\\Programs\\Volt Download Manager\\voltdownloadmanager-mcp.exe"
    }
  }
}
```

**Claude Code**:

```
claude mcp add voltdownloadmanager -- "C:\Users\you\AppData\Local\Programs\Volt Download Manager\voltdownloadmanager-mcp.exe"
```

**Cursor**: mục `mcpServers` giống như của Claude Desktop, trong `~/.cursor/mcp.json` (hoặc thêm vào trong cài đặt MCP của Cursor).

**VS Code**: trong `.vscode/mcp.json`, hoặc **MCP: Thêm máy chủ** trong bảng lệnh:

```
{
  "servers": {
    "voltdownloadmanager": {
      "type": "stdio",
      "command": "C:\\Users\\you\\AppData\\Local\\Programs\\Volt Download Manager\\voltdownloadmanager-mcp.exe"
    }
  }
}
```

Dùng đường dẫn từ bước 2 (trong JSON, mỗi `\` được viết `\\`). Các trợ lý khác cũng dùng tương tự: một lệnh để khởi động, không có đối số.

## Dành cho công cụ AI đọc trang web

Separately from the server in the app, the website describes it for AI tools in an MCP server card, [/.well-known/mcp/server-card.json](https://vdm.mikaillab.com/.well-known/mcp/server-card.json), and has every page in Markdown (`/download.md` beside `/download.html`), so an assistant can read how to set VDM up: see [For AI tools and agents](https://vdm.mikaillab.com/agents.html). There is no MCP server on the website: the server always runs on your computer, next to the app.

## Quyền riêng tư

VDM itself still sends nothing anywhere: the server talks only to the VDM on this computer, over the token-protected local channel. But what the assistant reads, it passes to its own AI service: when it lists your downloads, their file names, addresses and folders go to that service, under that service's privacy terms. Turn the automation API off, or remove the server from the assistant, when you don't want that.

## Khi gặp sự cố

| Thông báo của trợ lý | Cách xử lý |
|---|---|
| Volt Download Manager isn't running | Start VDM. The server can't start it for you. |
| API tự động hóa đang tắt | Run `voltdownloadmanager-cli api on` with VDM running. |
| VDM didn't answer in time | A window in VDM may be waiting for you (a question, **Add torrent**); answer it and ask again. |
| VDM refused the request | VDM's channel file is from an earlier start; restart VDM. |
| Không thấy công cụ nào | Kiểm tra đường dẫn trong cài đặt của trợ lý rồi khởi động lại trợ lý. Khi khởi chạy thủ công, `voltdownloadmanager-mcp --help` sẽ cho biết chức năng của nó. |

## Liên quan

- [Tùy chọn](https://vdm.mikaillab.com/vi/help/options.html)
- [Chủ đề](https://vdm.mikaillab.com/vi/help/themes.html)
- [Ngôn ngữ](https://vdm.mikaillab.com/vi/help/languages.html)
- [Chế độ di động](https://vdm.mikaillab.com/vi/help/portable.html)
- [Phím tắt](https://vdm.mikaillab.com/vi/help/keyboard-shortcuts.html)

[Sửa trang này trên GitHub](https://github.com/mikailhossenimran/voltdownloadmanager/edit/main/docs/ai-assistants.md) [Báo cáo sự cố với trang này](https://github.com/mikailhossenimran/voltdownloadmanager/issues/new?template=website.yml&title=Website%3A%20AI%20assistants%20%28MCP%29&page=https%3A//vdm.mikaillab.com/help/ai-assistants.html) [Lịch sử trang](https://github.com/mikailhossenimran/voltdownloadmanager/commits/main/docs/ai-assistants.md)

Miễn phí, mã nguồn mở, không quảng cáo, không dùng thử.

[Download Volt Download Manager](https://vdm.mikaillab.com/vi/download.html)
