๐ด Employee Vacations MCP Server Sample (Streamable HTTP version) โ
Welcome to the Employee Vacations MCP Server Sample (Streamable HTTP version). In this sample, you will learn how to deploy the MCP Server to Azure or run it locally, and then add it to Microsoft Copilot Studio. This sample simulates the scenario of using MCP to connect an internal LOB system to an agent created in Copilot Studio. In this case, the sample mimics an internal application to manage employee vacations.
This MCP Server has multiple tools available:
getAllEmployeesAsync| Get the list of all the available employees and their vacation daysgetVacationDaysLeftAsync| Get the number of vacation days left for a specific employeechargeVacationDaysAsync| Charge vacation days for a specific employee
โ๏ธ Prerequisites โ
- Visual Studio Code (link)
- Node v22 (ideally installed via nvm for Windows)
- The Azurite extension for Visual Studio Code (link)
- GitHub account
๐ Minimal path to awesome โ
Clone this repository by running
git clone https://github.com/microsoft/copilot-studio-mcp/in your terminalOpen Visual Studio Code on the subfolder
samples/employeevacations-http-typescriptLaunch the Azurite emulator for the Table service by running the command
Azurite: Start Table Servicein the command palette (pressctrl+shift+Porcmd+shift+Pon Mac)Open the terminal and navigate to the same folder
Run
npm installRun
npm run build && npm run start
Select
PORTSat the top of the Visual Studio Code Terminal
Select the green
Forward a Portbutton
Enter
3000as the port number (this should be the same as the port number you see when you ran the command in step 5). You might be prompted to sign in to GitHub, if so please do this, since this is required to use the port forwarding feature.Right click on the row you just added and select
Port visibility>Publicto make the server publicly availableCtrl + click on the
Forwarded address, which should be something like:https://something-3000.something.devtunnels.msSelect
Copyon the following pop-up to copy the URL
Open to the browser of your choice and paste the URL in the address bar, type
/mcpbehind it and hit enter
If all went well, you will see the following error message:
{"jsonrpc":"2.0","error":{"code":-32000,"message":"Method not allowed."},"id":null}Don't worry - this error message is nothing to be worried about!
๐จโ๐ป Use the Employee Vacations MCP Server in Visual Studio Code / GitHub Copilot โ
To use the Employee Vacations MCP Server, you need to use the URL of your server (can be either your devtunnel URL or your deployed Azure Container App) with the /mcp part at the end and add it as an MCP Server in Visual Studio Code.
Press either
ctrl+shift+P(Windows/Linux) orcmd+shift+P(Mac) and typeMCPSelect
MCP: Add Server...Select
HTTP (HTTP or Server-Sent Events)Paste the URL of your server in the input box (make sure
/mcpin the end is included)Press
EnterEnter a name for the server, for instance
EmployeesVacationMCPSelect
User Settingsto save the MCP Server settings in your user settingsOpen
GitHub CopilotSwitch from
AsktoAgentMake sure the
EmployeesVacationMCPserver actions are enabledAsk the following question:
textGive me the list of employees and their vacation days
This should give you a response like this:

Now you have added the EmployeesVacationMCP server to Visual Studio Code!
