Home / MCP / Cloud PC MCP Server

Cloud PC MCP Server

Provides Cloud PC management actions via Microsoft Graph API, including listing users, Cloud PCs, rebooting, renaming, troubleshooting, and reprovisioning.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "cloud_pc": {
            "command": "uv",
            "args": [
                "run",
                "--directory",
                "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-cloud-pc",
                "mcp-cloud-pc.py"
            ],
            "env": {
                "MSGRAPH_TENANT_ID": "<YOUR GRAPH API TENANT ID>",
                "MSGRAPH_CLIENT_ID": "<YOUR GRAPH API CLIENT ID>",
                "MSGRAPH_CLIENT_SECRET": "<YOUR GRAPH API CLIENT SECRET>"
            }
        }
    }
}

You use this MCP Server to manage Azure Cloud PCs through the Microsoft Graph API. It lets you list users and Cloud PCs, reboot or rename Cloud PCs, troubleshoot, end grace periods, check review status, and reprovision with specific Windows versions and user types. This server runs as a local process and communicates with Graph API endpoints to perform these actions.

How to use

You run the MCP server as a local process and connect to it from an MCP client. The server exposes a set of tools that perform common Cloud PC management tasks via the Microsoft Graph API. Use the available tools to list all registered users, list Cloud PCs in the tenant, reboot or rename Cloud PCs, troubleshoot, end grace periods, review status, and reprovision with Windows 10 or 11 images for chosen user types.

How to install

Prerequisites you need before installing: - Python installed on your machine (version compatible with the script you run). - A runtime environment that can execute Python files via your chosen MCP runner (the example uses a universal runtime approach). - Access credentials for the Microsoft Graph API (tenant ID, client ID, client secret). These credentials must be configured in the environment for the MCP server to authenticate with Graph API.

Step-by-step installation flow you can follow: 1) Prepare the environment and dependencies. 2) Create the MCP server configuration with the required environment variables. 3) Run the MCP server using your MCP runner of choice. 4) Connect an MCP client to begin using the Cloud PC management commands.

Concrete steps you can follow based on the example configuration: - Create a configuration that runs a Python script via the MCP runner (uv in the example) and point it to the script responsible for handling the Cloud PC management logic. - Supply Graph API credentials as environment variables so the server can authenticate with Microsoft Graph.

Example startup command snippet you would configure in your MCP client:
```json
{
  "mcpServers": {
    "mcp-cloud-pc": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-cloud-pc",
        "mcp-cloud-pc.py"
      ],
      "env": {
        "MSGRAPH_TENANT_ID": "<YOUR GRAPH API TENANT ID>",
        "MSGRAPH_CLIENT_ID": "<YOUR GRAPH API CLIENT ID>",
        "MSGRAPH_CLIENT_SECRET": "<YOUR GRAPH API CLIENT SECRET>"
      }
    }
  }
}
``n

Additional content

Configuration and security notes: Ensure the Graph API credentials are kept secure and rotated regularly. Use least-privilege permissions for the Graph API application as required by your use case. When deploying in production, consider securing the environment variables and restricting access to the MCP runner.

Troubleshooting tips: If you encounter authentication errors, verify that the tenant ID, client ID, and client secret are correct and that the Graph API application has the necessary permissions granted. Check the MCP runner’s logs for any errors related to starting the Python script or locating the Cloud PC management entry points.

Notes: This MCP server focuses on Cloud PC management via Graph API using explicit commands described in the tooling list. You can expand compatibility by adding additional Graph API capabilities if needed, while maintaining secure handling of credentials.

Available tools

cloud_pc_list_users

List all registered users and return a JSON-formatted string with user information.

cloud_pc_list

List all Cloud PCs available to the current tenant and return a JSON-formatted string.

cloud_pc_reboot

Reboot a Cloud PC identified by its Cloud PC ID.

cloud_pc_rename

Set a new display name for a Cloud PC by its Cloud PC ID.

cloud_pc_troubleshoot

Troubleshoot a Cloud PC identified by its Cloud PC ID.

cloud_pc_end_grace_period

End the grace period for a Cloud PC identified by its Cloud PC ID.

cloud_pc_get_review_status

Retrieve the review status for the Cloud PC with the given ID.

cloud_pc_reprovision

Reprovision a Cloud PC with Windows 10 or 11, selecting a Windows user type and OS version.