
# Kết nối GitHub Copilot trong VS Code {/* #connect-github-copilot-in-vs-code */}

## Đăng nhập OAuth qua trình duyệt {/* #oauth-browser-sign-in */}

**[Cài Reconstruct trong VS Code](https://vscode.dev/redirect/mcp/install?name=reconstruct&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Freconstruct.dev%2Fmcp%22%7D)** thêm `https://reconstruct.dev/mcp` vào cấu hình người dùng. VS Code tự đăng ký và mở đăng nhập khi máy chủ khởi chạy. Nếu không hoàn tất, dùng token cá nhân. Xem [tính tương thích](/docs/vi/connect-ai-agents#client-compatibility).

## Token truy cập cá nhân {/* #personal-access-token */}

Sao chép token MCP từ [cài đặt tài khoản Reconstruct Platform](https://reconstruct.dev/platform/). Xem yêu cầu tại [Trước khi bắt đầu](/docs/vi/connect-ai-agents#before-you-start).

Tạo `.vscode/mcp.json` trong workspace. VS Code hỏi token và lưu câu trả lời cho lần sau.

```json
{
  "inputs": [
    {
      "id": "reconstruct-token",
      "type": "promptString",
      "description": "Reconstruct MCP access token",
      "password": true
    }
  ],
  "servers": {
    "reconstruct": {
      "type": "http",
      "url": "https://reconstruct.dev/mcp",
      "headers": {
        "Authorization": "Bearer ${input:reconstruct-token}"
      }
    }
  }
}
```

Chạy **MCP: List Servers** để khởi chạy/kiểm tra. Trong Copilot Chat, chuyển **Agent** (Tác nhân), bật Reconstruct trong bộ chọn công cụ. Yêu cầu Copilot gọi `list_products` để xác nhận. Xem [cấu hình MCP VS Code chính thức](https://code.visualstudio.com/docs/agent-customization/mcp-servers).

Tiếp theo, thử các [ví dụ câu lệnh](/docs/vi/prompt-examples).
