leave-manager-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@leave-manager-mcp-server Check my leave balance for employee E001"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Leave Manager MCP Server
A modern model context protocol (MCP) server built with FastMCP in Python for managing employee leave balances and history. It allows LLMs to query leave balances, submit leave applications, and view leave history for employees.
π Project Structure
To maintain clean modularity and scale features independently, tools and resources are separated:
server.py: Instantiates the
FastMCPserver object.tools/: Package directory holding all server tools.
leave_tools.py: Defines MCP tools (
get_leave_balance,apply_leave,get_leave_history).
resources/: Package directory holding all server resources.
greeting_resources.py: Defines MCP resources.
main.py: Entrypoint file which registers the tools and resources, and launches the server.
Related MCP server: HR Leave Management MCP Server
π οΈ Features & API Surface
This MCP server exposes the following tools and resources to LLMs:
Tools
get_leave_balance(employee_id: str): Checks how many leave days are remaining for the given employee (e.g.,"E001").apply_leave(employee_id: str, leave_dates: list[str]): Submits a leave request for specific dates (e.g.,["2025-04-17", "2025-05-01"]). Validates leave balance and updates the mock database.get_leave_history(employee_id: str): Fetches the log of past leave dates for the employee.
Resources
greeting://{name}: A personalized greeting resource that provides instructions on how to use the server.
π Prerequisites
Before setting up the project, make sure you have the following installed:
Python (version
3.13or higher)uv - An extremely fast Python package manager and resolver.
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Claude Desktop (optional, for testing the desktop application integration)
π Setup & Usage
1. Install Dependencies
The project uses uv to manage dependencies. Run the following command to add and install required dependencies:
uv add mcp[cli]2. Run the MCP Server
You have three ways to run and test the server:
A. Basic Run
To run the server directly via standard Python (for testing basic initialization):
uv run python main.pyB. Development & Local Testing (MCP Inspector)
The recommended way to test and debug your tools locally is using the MCP Inspector:
uv run mcp dev main.pyThis command starts the server and spins up the web-based MCP Inspector. You can use it to view, call, and debug your tools/resources in a browser UI.
C. Installation into Claude Desktop
To integrate this server directly with your Claude Desktop client:
Ensure Claude Desktop is installed and you've switched it to Developer Mode.
Run the following installation helper command:
uv run mcp install main.py This automatically locates your Claude Desktop MCP configuration file and adds this server setup.
3. Open or restart Claude Desktop.
4. Click the + (plus) icon/selector in the chat window. You should see LeaveManager listed as an active connector. Claude will now query the server automatically to answer your leave management questions!
π Mock Database
The project contains pre-configured mock data for employees (E001 to E010) located in employeeLeaveData.py.
Example Employee records:
E001: 18 leave days remaining.E002: 20 leave days remaining.E003: 16 leave days remaining.
Available Tools
3 toolsapply_leaveB
Apply leave for specific dates (e.g., ["2025-04-17", "2025-05-01"])
Inputs: employee_id (required), leave_dates (required). Returns: result
get_leave_balanceC
Check how many leave days are left for the employee
Inputs: employee_id (required). Returns: result
get_leave_historyC
Get leave history for the employee
Inputs: employee_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 3 tools
Each tool targets a distinct aspect of leave management: balance inquiry, applying for leave, and viewing history. There is no overlap in purpose or output.
All tool names follow a clear verb_noun pattern: get_leave_balance, apply_leave, get_leave_history. The naming is predictable and consistently structured.
With 3 tools, the server is well-scoped for a simple leave management use case. Each tool serves a clear need without unnecessary bloat.
The tool set covers the basic employee-facing actions (check balance, apply, view history), but it lacks an update or cancellation operation for leave requests. This is a notable gap in the lifecycle.
Maintenance
Related MCP Connectors
Employee leave and PTO: requests, approvals, balances, who is out, and conflict checks.
Read Breathe HR employees, absences, sickness and leave; create and review leave requests.
Track and manage employee time off with quick balance lookups and streamlined applications. Find tβ¦
Read Jet HR employees, absences, clockings, payroll; create, approve, delete leave; create expenses.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides tools for managing human resources tasks such as applying for leave, checking leave balances, and viewing holiday schedules. It enables natural language interaction for employee information and leave history tracking via the Model Context Protocol.-
- FlicenseBqualityDmaintenanceEnables managing employee leave requests (apply, view, list leaves) through Claude desktop using natural language.6-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage employee leave by checking balances, applying for leave, and viewing history via MCP tools.-
- FlicenseBqualityDmaintenanceEnables managing employee leave requests including checking balance, applying for leave, and viewing history.3-