Employee Vacation
STDIO.NET MCP server for managing employee vacation days with tracking and balance updates
.NET MCP server for managing employee vacation days with tracking and balance updates
This project demonstrates a Model Context Protocol (MCP) server and client implementation in .NET for managing employee vacation days. It provides a backend service for tracking, querying, and updating vacation balances for employees, and exposes these capabilities through MCP tools.
The sample is documented through a series of blog posts:
The repository contains two versions of the same samples: one built with C# and .NET and one with TypeScript.
To run the .NET sample, you need to have the following prerequisites installed:
To run the TypeScript sample, you need to have the following prerequisites installed:
For both languages, you need to have the following prerequisites installed:
dotnetrun --project src/csharp/Stdio/MCP.Stdio.Server/MCP.Stdio.Server.csprojnode/src/ts/stdio/server/dist/app.jsBefore using it, make sure to compile the TypeScript code by running the following command:
cd src/ts/stdio/server npm run build
To run the SSE sample, follow these steps:
Clone the repository to your local machine.
Open the appsettings.json file in the MCP.SSE.AppHost project inside the SSE folder and update the openAiConnectionName property with your Azure OpenAI connection string using the following format:
"openAiConnectionName": "Endpoint=https://<your-endpoint>.openai.azure.com/;Key=<your-key>"
Start the Azurite Table service emulator by clicking on the button in the application bar, or by opening the command palette (Ctrl+Shift+P) and selecting Azurite: Start Table Service.
Run the MCP.SSE.AppHost project using the following command:
dotnet run --project MCP.SSE.AppHost/MCP.SSE.AppHost.csproj
Once the project starts, a new browser window will automatically open up on the Aspire dashboard.
Open a new browser tab and navigate to the following URL:
http://localhost:5291/
Now you can use the Blazor application to send prompts to the LLM. You can use one of the following prompts to trigger the usage of one of the MCP tools:
"Give me a list of the employees and their vacation days left" "Charge 5 vacation days to Alice Johnson""
The Teams AI library sample is already registered as part of the Aspire solution. However, before using it, you must follow these steps:
env.example file to .envAZURE_OPENAI_API_KEY with the key of your Azure OpenAI serviceAZURE_OPENAI_ENDPOINT with the endpoint of your Azure OpenAI serviceAZURE_OPENAI_API_VERSION with the API version (pay attention, this is a different value than the model version, you can find it in the Azure OpenAI portal)AZURE_OPENAI_MODEL_DEPLOYMENT_NAME with the name of your model deployment in Azure OpenAIOnce the Aspire dashboard is up & running, you will see that the **ttk2-agent **project has two endpoints:

You can access to the testing tool for the agent by using the endpoint with the higher port number and adding the /devtools path to it.
For example, in the previous image, the URL would be:
http://localhost:54251/devtools/