Leave Manager MCP Tool Server
A centralized employee leave management system that allows users to check leave balances, apply for leave, and view leave history through an OpenAPI interface.
README
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。