mcp_server_tool

nguyenthevu1/mcp_server_tool

3.1

If you are the rightful owner of mcp_server_tool and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Model Context Protocol (MCP) Server is a tool designed to facilitate seamless integration and management of cloud desktop environments through automated scripts and configurations.

Hướng dẫn cài đặt và kết nối MCP vào Cloud Desktop

1. Yêu cầu hệ thống

  • Python 3.10 trở lên
  • pip
  • Quyền truy cập SSH tới Cloud Desktop
  • Vì dùng Ansible nên máy Windows sẽ cần chạy bằng WSL

2. Cài đặt MCP Server

Bước 1: Clone repository

# Clone mã nguồn MCP Server
$ git clone <repo-url> && cd mcp-server

Bước 2: Cài đặt các phụ thuộc

# Cài đặt các package cần thiết
$ pip install -r requirements.txt

3. Cấu hình kết nối Cloud Desktop

Bước 1: Thiết lập thông tin kết nối

  • User có quyền ssh vào server

Bước 2: Kiểm tra kết nối

  • Sử dụng lệnh sau để kiểm tra kết nối từ MCP tới Cloud Desktop:
$ python3 mcp_server.py --test-connection
  • Nếu kết nối thành công, sẽ nhận được thông báo xác nhận.

4. Khởi động MCP Server

$ pip install uv
$ uv venv
$ source .venv/bin/activate (trên win .venv\Scripts\activate)
$ uv pip install -r requirements.txt

5. Sử dụng các chức năng với Cloud Desktop

  • Thiết lập Cloude Desktop

  • Chỉnh cấu hình Cloude Desktop gọi vào tool MCP

  • Cấu hình file Cloude Desktop

  • Thêm Cấu hình vào file, Thay đường dẫn

{
  "mcpServers": {
    "updateOs": {
      "command": "uv",
      "args": [
        "--directory",
        "${path}/mcp-server",
        "run",
        "mcp.py"
      ]
    }
  }
}
  • Nếu dùng WSL
{
  "mcpServers": {
    "updateOs": {
      "command": "wsl",
      "args": [
        "bash",
        "-ic",
        "cd ${path}/mcp-server && uv run mcp_server.py"

      ]
    }
  }
}
  • Sau khi cấu hình file xong tắt hoàn toàn Cloude Desktop rồi bật lại

  • Check xem Cloude Desktop đã kết nối được vào MCP tool chưa

  • Sau khi kết nối thành công, có thể sử dụng các chức năng như cập nhật hệ điều hành, kiểm tra phiên bản Python, reboot, v.v.

  • Tham khảo các playbook và script trong thư mục updateOS/ để thực hiện các tác vụ tự động hóa.

6. Promt mẫu

  • Check os:
Hãy check os version server <server1> <server2>
  • Update server:
Hãy update server <server1> <server2>

...

  • Muốn xem thêm tool vào file updateOS/README.md xem hướng dẫn
  • Chọn Always allow để sau không bị hỏi nữa
  • Test MCP đã chạy chưa

7. Tài liệu tham khảo