Employee Leave Management MCP Server
# Employee Leave Management MCP Server
A [FastMCP](https://github.com/modelcontextprotocol/python-sdk) server that lets Claude Desktop manage employee leave through natural language. Uses an in-memory data model seeded with sample employees, so it runs with no external database.
## Features
**Tools:** `apply_for_leave`, `approve_leave`, `reject_leave`, `cancel_leave`, `list_pending_requests`, `check_leave_balance`
**Resources:** `employee://{id}/balance`, `employee://{id}/requests`, `policy://leave`
**Prompts:** `draft_leave_request`, `draft_decision`
Leave is counted in working days (Mon–Fri). Balances deduct on approval and are credited back on cancellation.
## Setup
Requires Python 3.10+ and [uv](https://docs.astral.sh/uv/).
```bash
uv add "mcp[cli]"
```
## Run
```bash
uv run main.py # run the server
uv run mcp install main.py # register with Claude Desktop
```
After installing, fully restart Claude Desktop. The server appears under **Settings → Developer → Local MCP servers**.
## Example prompts
- "What's the leave balance for employee E001?"
- "Apply for annual leave for E001 from 2026-08-03 to 2026-08-07, reason vacation."
- "Show pending leave requests for manager M001."
- "Approve request 1 as M001."
- "Apply for 30 days of annual leave for E001"
TDQS
Scored across 6 tools
Each tool targets a distinct lifecycle action (apply, approve, reject, cancel, list, check) with no obvious overlaps. The only minor potential confusion is between approve/reject/cancel, all acting on pending requests, but their differing effects on balance make them clearly distinct.
All tools follow a consistent verb_noun naming pattern (apply_for_leave, approve_leave, reject_leave, cancel_leave, list_pending_requests, check_leave_balance). The verbs are clear and uniform, with snake_case throughout.
Six tools is well-scoped for a leave management domain, covering the full request lifecycle plus balance and listing queries. No tool feels redundant or unnecessary, and none are missing within the core scope.
The surface covers the full request lifecycle (apply, approve, reject, cancel) plus balance checking and pending listing. Minor gaps exist—such as no update_leave for modifying a request or a get_leave for viewing individual approved requests—but core workflows are covered.