Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 01: Deploy an MCP Server

In this task, you will deploy an MCP server. Later in the workshop, you will connect an agent to the MCP server.

Key tasks


01: Explore the MCP server components (optional)

  1. On the VM’s taskbar, open Visual Studio Code.

    ejcb91cm.jpg

  2. On the menu bar, select File and then select Open Folder.

    fydu6j31.jpg

  3. Go to C:\, select labs, then select Select Folder.

    8wclg0v3.jpg

  4. In the dialog that displays, select Yes, I trust the authors.

    f7e96my9.jpg

  5. Expand the hr-mcp-server folder.

    o2jxwwp9.jpg

  6. Explore the files in the following folder:

    • Data: hr-mcp-server\Data\candidates.json
    • Services: hr-mcp-server\Services
    • Tools: hr-mcp-server\Tools

    Select any file to view the file contents.

  7. Close Visual Studio Code.


02: Deploy and configure the MCP server

  1. In the @lab.VirtualMachine(Win11).SelectLink virtual machine, on the Windows taskbar, right-click Windows PowerShell and select Run as administrator.

    j7e6erip.jpg

  2. At the PowerShell prompt, enter the following command:

     cd C:\labs\deploy
    
  3. At the PowerShell prompt, enter the following command:

     pwsh -File C:\labs\deploy\Deploy-MCP.ps1
    

    0q0h0mv4.jpg

  4. When prompted, sign in by using the following credentials:

    Object Value
    Username +++@lab.CloudPortalCredential(User1).Username+++
    Tap +++@lab.CloudPortalCredential(User1).AccessToken+++
  5. Close the confirmation web page and return to PowerShell.

    2r6edcza.jpg

    After a couple of minutes, you will start to see activity in the PowerShell window.

    f4t541nj.jpg

  6. Leave the PowerShell window open.

    It may take up to 10 minutes for the system to deploy the MCP server.

    You can safely continue with other tasks in this exercise while you wait for the MCP server to get ready. Check back later to ensure that the process has completed.

    When the process is complete, the following actions will occur:

    • The PowerShell window will display the message Deployment complete. MCP_Info.txt written to Desktop. 7354tbr0.jpg

    • A file named MCP_Info.txt is added to the desktop. This file contains the information that you will need to connect to the MCP server.

  7. Double-click MCP_Info.txt.

  8. Review the file contents. The file contents should resemble the following screenshot:

    1foq7lql.jpg