Leave Manager MCP server for managing employee leave balance, applications, and history
Project description
Local AI with Ollama, WebUI & MCP on Windows
A self-hosted AI stack combining Ollama for running language models, Open WebUI for user-friendly chat interaction, and MCP for centralized model management—offering full control, privacy, and flexibility without relying on the cloud.
This sample project provides an MCP-based tool server for managing employee leave balance, applications, and history. It is exposed via OpenAPI using mcpo for easy integration with Open WebUI or other OpenAPI-compatible clients.
🚀 Features
- ✅ Check employee leave balance
- 📆 Apply for leave on specific dates
- 📜 View leave history
- 🙋 Personalized greeting functionality
📁 Project Structure
leave-manager/
├── main.py # MCP server logic for leave management
├── requirements.txt # Python dependencies for the MCP server
├── Dockerfile # Docker image configuration for the leave manager
├── docker-compose.yml # Docker Compose file to run leave manager and Open WebUI
└── README.md # Project documentation (this file)
📋 Prerequisites
- Windows 10 or later (required for Ollama)
- Docker Desktop for Windows (required for Open WebUI and MCP)
- Install from: Docker Desktop for Windows
🛠️ Workflow
- Install Ollama on Windows
- Pull the
deepseek-r1model - Clone the repository and navigate to the project directory
- Run the
docker-compose.ymlfile to launch services
Install Ollama
➤ Windows
-
Download the Installer:
- Visit Ollama Download and click Download for Windows to get
OllamaSetup.exe. - Alternatively, download from Ollama GitHub Releases.
- Visit Ollama Download and click Download for Windows to get
-
Run the Installer:
- Execute
OllamaSetup.exeand follow the installation prompts. - After installation, Ollama runs as a background service, accessible at: http://localhost:11434.
- Verify in your browser; you should see:
Ollama is running
- Execute
-
Start Ollama Server (if not already running):
ollama serve
- Access the server at: http://localhost:11434.
Verify Installation
Check the installed version of Ollama:
ollama --version
Expected Output:
ollama version 0.7.1
Pull the deepseek-r1 Model
1. Pull the Default Model (7B):
Using PoweShell
ollama pull deepseek-r1
To Pull Specific Versions:
ollama run deepseek-r1:1.5b
ollama run deepseek-r1:671b
2. List Installed Models:
ollama list
Expected:
Expected Output:
NAME ID SIZE
deepseek-r1:latest xxxxxxxxxxxx X.X GB
4. Alternative Check via API:
curl http://localhost:11434/api/tags
Expected Output:
A JSON response listing installed models, including deepseek-r1:latest.
4. Test the API via PowerShell:
Invoke-RestMethod -Uri http://localhost:11434/api/generate -Method Post -Body '{"model": "deepseek-r1", "prompt": "Hello, world!", "stream": false}' -ContentType "application/json"
Expected Response: A JSON object containing the model's response to the "Hello, world!" prompt.
5. Run and Chat the Model via PowerShell:
ollama run deepseek-r1
- This opens an interactive chat session with the
deepseek-r1model. - Type
/byeand pressEnterto exit the chat session.
🐳 Run Open WebUI and MCP Server with Docker Compose
-
Clone the Repository:
git clone https://github.com/ahmad-act/Local-AI-with-Ollama-Open-WebUI-MCP-on-Windows.git cd Local-AI-with-Ollama-Open-WebUI-MCP-on-Windows
-
To launch both the MCP tool and Open WebUI locally (on Docker Desktop):
docker-compose up --build
This will:
- Start the Leave Manager (MCP Server) tool on port
8000 - Launch Open WebUI at http://localhost:3000
🌐 Add MCP Tools to Open WebUI
The MCP tools are exposed via the OpenAPI specification at: http://localhost:8000/openapi.json.
- Open http://localhost:3000 in your browser.
- Click the Profile Icon and navigate to Settings.
- Select the Tools menu and click the Add (+) Button.
- Add a new tool by entering the URL: http://localhost:8000/.
💬 Example Prompts
Use these prompts in Open WebUI to interact with the Leave Manager tool:
- Check Leave Balance:
Check how many leave days are left for employee E001 - Apply for Leave:
Apply  - View Leave History:
What's the leave history of E001? - Personalized Greeting:
Greet me as Alice
🛠️ Troubleshooting
- Ollama not running: Ensure the service is active (
ollama serve) and check http://localhost:11434. - Docker issues: Verify Docker Desktop is running and you have sufficient disk space.
- Model not found: Confirm the
deepseek-r1model is listed withollama list. - Port conflicts: Ensure ports
11434,3000, and8000are free.
📚 Additional Resources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_ahmad_act_open_webui_mcp-0.1.0.tar.gz.
File metadata
- Download URL: iflow_mcp_ahmad_act_open_webui_mcp-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
391fc92a78077f812851ced4433ad200e501e57522661248e1598f1c8a126732
|
|
| MD5 |
22d92c339b9c4d83d66196c60f189eb5
|
|
| BLAKE2b-256 |
c16bb45ef3b5311bc7ae0d101112347d347a1234450b0d0e9772bb2fc66275a1
|
File details
Details for the file iflow_mcp_ahmad_act_open_webui_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_ahmad_act_open_webui_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46d7705f651087efa187a696e914e9b511317b89b2244a2887c209ca312b45c9
|
|
| MD5 |
077b4814bd766b49b8a5fb1282175cb7
|
|
| BLAKE2b-256 |
c5cf9880b8eb177c9bda8e3750245bdfbbd3fcf41993a2aba7b1aa99c5a545bc
|