MCP Leave Management
Click on "Install 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., "@MCP Leave ManagementShow pending leave requests for my team"
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.
MCP Leave Management
A local Model Context Protocol (MCP) server that simulates a leave management workflow for employees and managers. The server is designed for local demos, connector testing, and iterative MCP tool development with Claude Desktop.
It supports employee discovery, leave balance checks, leave application, manager review flows, full approvals, partial approvals, and rejections against a seeded in-memory dataset.
Features
MCP server over stdio using the official
@modelcontextprotocol/sdkEmployee and manager directory tools
Leave application with date validation and balance checks
Manager approval workflow scoped to the manager's own team
Partial approval support with separate approved and rejected day counts
Automatic leave balance deduction for approved days
Seeded demo data across Engineering, Finance, and HR
Related MCP server: HR Assistant Agent
Tool Catalog
The server currently exposes these MCP tools:
Tool | Purpose |
| Health check for the MCP server |
| List all people in the system, including managers with a position flag |
| List managers only |
| Show available Annual, Sick, and Unpaid leave for a person |
| Submit a new leave request after validating dates and balance |
| Show all leave requests for a specific person |
| Show pending leave requests for a manager's direct team |
| Fully approve a pending leave request |
| Approve part of a pending leave request and reject the remainder |
| Fully reject a pending leave request |
Approval Rules
Leave duration is calculated as inclusive days between
startDateandendDateDates must be in
YYYY-MM-DDformatEnd date cannot be earlier than start date
Employees cannot submit leave beyond their available balance
Managers cannot approve more leave days than the employee currently has available
Managers can only review leave requests for employees who report to them directly
Partial approvals deduct only the approved number of days from the employee's balance
Seed Data
The demo dataset includes:
14 employees
7 managers
Departments: Engineering, Finance, HR
Sample names from multiple regions including Indian and Mexican names for demo variety
All data is stored in-memory in src/data.ts. Restarting the server resets all leave requests and balances back to the seeded state.
Project Structure
.
├── src/
│ ├── data.ts
│ └── index.ts
├── package.json
├── package-lock.json
├── tsconfig.json
└── README.mdPrerequisites
Node.js 18 or later
npm
Claude Desktop, if you want to test the server as an MCP connector
Local Setup
Install dependencies:
npm installRun a type check:
npm run checkBuild the server:
npm run buildRun the compiled server:
npm startRun the server directly from TypeScript during development:
npm run devClaude Desktop Configuration
This server uses stdio transport. Claude Desktop should launch the process for you. You do not need to start the server manually before connecting it.
Example Claude Desktop MCP configuration:
{
"mcpServers": {
"leave-management": {
"command": "node",
"args": [
"C:/path/to/mcp-leave-management/dist/index.js"
]
}
}
}Recommended workflow:
Run
npm run buildPoint Claude Desktop to
nodeplusdist/index.jsReconnect Claude Desktop after each rebuild when you want it to load the latest server code
Development Notes
The project is configured as an ESM package with
type: moduleMCP SDK imports use explicit
.jssubpaths for correct runtime resolution in Node ESMdevusestsxfor a simpler local ESM TypeScript workflowbuildoutputs compiled files todist/
Reference Architecture
This repository is a leaf MCP server in a broader enterprise MCP pattern. In the target model, CoCounsel acts as the principal MCP client, determines which domain boundaries are relevant and allowed for the current user, and then engages the appropriate domain orchestration MCP servers.
flowchart TD
U[User Request and Persona]
U --> A[CoCounsel<br/>Principal MCP Client]
A --> P[Persona and Policy Check]
P --> B[HR Domain MCP Orchestration]
P --> C[Cloud Audit Suite MCP Orchestration]
B --> B1[Leave Management MCP]
B --> B2[HR Query MCP]
B --> B3[Payroll MCP]
C --> C1[Engagement Manager MCP]
C --> C2[Guided Assurance MCP]
C --> C3[Other Audit Domain MCPs]
B1 --> S1[HR or Leave Systems]
B2 --> S2[HR Data Sources]
B3 --> S3[Payroll Systems]
C1 --> S4[Engagement Systems]
C2 --> S5[Assurance Frameworks and Evidence Sources]
C3 --> S6[Other Audit Systems]In this model:
CoCounseloperates at the cross-domain layer and decides which domains should be enabled for the current requestdomain orchestration MCP servers define domain boundaries, high-level domain skill context, and access-scoped capability exposure
domain orchestration MCP servers may re-expose leaf tools directly, add light curation, or add a small number of domain-native abstractions
leaf MCP servers encapsulate focused systems and capabilities
this leave management server fits under the HR domain orchestration layer
Example access model:
an internal HR user may be allowed to use both the HR domain orchestration MCP and the Cloud Audit Suite orchestration MCP
an external auditor or client may only be allowed to use the Cloud Audit Suite orchestration MCP
if the request does not match any enabled domain,
CoCounselcan answer directly without invoking a domain MCP
Why the orchestration layer exists:
to establish a domain boundary rather than exposing every leaf MCP globally
to carry domain-level skill or semantic context that helps
CoCounselchoose the correct domainto enable persona-aware access control at the domain level
to leave room for future domain workflows without forcing them into the principal client
Example Scenarios
Employee flow
Call
list_all_employeesCall
check_leave_balancefor a selected employeeCall
apply_leaveCall
list_employee_leavesto verify the request is pending
Manager flow
Call
list_all_managersCall
list_pending_approvalsfor a managerCall
approve_leave,partial_approve_leave, orreject_leaveCall
check_leave_balanceagain to verify the resulting balance
Limitations
Data is in-memory only and is reset when the server restarts
No persistence or database integration yet
No authentication or role-based access beyond seeded manager-to-employee mappings
Partial approvals are day-count based, not date-specific within a leave range
Scripts
Script | Description |
| Run the MCP server from TypeScript using |
| Run TypeScript type checking without emitting output |
| Compile the server to |
| Run the compiled server from |
Tech Stack
TypeScript
Node.js
@modelcontextprotocol/sdkzod
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JayLathiaTR/mcp-leave-management'
If you have feedback or need assistance with the MCP directory API, please join our Discord server