Bước 1: Cài đặt Claude Desktop App
- Tải Claude Desktop từ: https://claude.ai/download
- Cài đặt và đăng nhập tài khoản Anthropic của bạn
Bước 2: Cài đặt MCP Server cho File System
Yêu cầu: Node.js (tải tại nodejs.org)
Truy cập: https://nodejs.org
Tải bản LTS (Long Term Support) – nút màu xanh lá bên trái
Hiện tại là phiên bản 20.x hoặc 22.x
Tải file .msi cho Windows
2.1. Cài đặt MCP Filesystem Server
npm install -g @modelcontextprotocol/server-filesystem
2.2. Cấu hình Claude Desktop
Trên Windows: Mở file cấu hình: %APPDATA%\Claude\claude_desktop_config.json
Trên macOS: Mở file cấu hình: ~/Library/Application Support/Claude/claude_desktop_config.json
Trên Linux: Mở file cấu hình: ~/.config/Claude/claude_desktop_config.json
2.3. Thêm cấu hình MCP
Thêm nội dung sau vào file claude_desktop_config.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"D:\\Projects",
"C:\\Users\\YourName\\Documents"
]
}
}
}
Dùng lệnh “npm –version” nếu gặp lỗi sau:
npm : File D:\Program Files\nodejs\npm.ps1 cannot be loaded because running scripts is disabled on this system. For
more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ npm --version
+ ~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
thì là do Windows chặn chạy script PowerShell vì lý do bảo mật. Để giải quyết trong PowerShell Admin, chạy lệnh này:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Kiểm tra bằng lệnh
npm –version
Nếu ok chạy tiếp lệnh để cài MCP Server:
npm install -g @modelcontextprotocol/server-filesystem
Sau khi cài xong thực hiện như sau:
Bước 1: Mở file cấu hình Claude Desktop
Chạy lệnh này trong PowerShell:
notepad "$env:APPDATA\Claude\claude_desktop_config.json"
Bước 2: Dán nội dung cấu hình
Nếu file trống, dán toàn bộ nội dung này:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"E:\\onedrive\\claude"
]
}
}
}
Để kiểm tra hoạt động. Tại Claude Desktop chọn File > Setting > Developer nếu thấy hiện như này là OK
