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-serverCheck 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"])
| Name | Required | Description | Default |
|---|---|---|---|
| employee_id | Yes | ||
| leave_dates | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description provides no behavioral context beyond the action itself. It does not disclose side effects, whether approval is required, how conflicts are handled, or permissions needed. The only extra is the date array example.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with a concrete example, front-loaded with the verb, and contains no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-required-parameter mutation tool, the description omits the employee_id parameter entirely and gives no information about constraints or process. Although an output schema exists, the description does not fully compensate for the 0% schema description coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description adds meaning only to leave_dates via an example, but leaves employee_id entirely unexplained beyond its property name. No additional semantics for employee_id are provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('apply') and resource ('leave'), and the example clarifies the expected date array format. It is clearly distinct from the read-only siblings (get_leave_balance, get_leave_history).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for requesting time off but does not explicitly state when to use this versus the sibling getter tools, nor any prerequisites or exclusion criteria. The contrast is implicit through the tool name and sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_leave_balanceC
Check how many leave days are left for the employee
| Name | Required | Description | Default |
|---|---|---|---|
| employee_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does mention the action is to 'Check', implying a read-only operation, but it does not explicitly state whether authentication is required, what happens if the employee_id is invalid, or the format of the returned data. It also does not confirm there are no side effects, which is critical without annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no redundant words. It is front-loaded with the action and resource, making it easy to parse. This is appropriately sized for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with only one parameter and an output schema, so the description covers the core function. However, it misses usage context and does not explicitly frame it as a read-only operation. The absence of annotations and lack of comparison to siblings leaves gaps, but given the tool's simplicity, it is minimally viable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description does not mention the employee_id parameter at all. The parameter name and type are self-explanatory, but the description adds no meaning about the expected format, whether it is an internal identifier, or any constraints. Given the low coverage, the description should compensate but fails to do so.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: checking remaining leave days for an employee. It uses a specific verb ('Check') and resource ('leave days'), which distinguishes it from generic operations. However, it does not explicitly compare against sibling tools like get_leave_history or apply_leave, so the differentiation is implied rather than stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives. The description simply states what it does, but does not mention that it should be used for current balance checks, nor provide exclusions (e.g., for historical data use get_leave_history). This leaves the agent without clear decision-making context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_leave_historyC
Get leave history for the employee
| Name | Required | Description | Default |
|---|---|---|---|
| employee_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It only states the purpose without disclosing behavioral traits such as read-only nature, response format, filtering, or pagination. Minimal disclosure of the operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no redundant words, making it concise and front-loaded. However, it is somewhat under-specified, but for conciseness it earns high marks.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the existence of an output schema and one required parameter, the description is very incomplete. It does not explain expected return values, usage context, or any limitations. For a tool with no annotations, this is a significant gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description adds no information about the employee_id parameter beyond what the schema shows. It would need to explain how to specify the employee, but it does not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Get' and resource 'leave history', clearly indicating the tool's function. It distinguishes from siblings like get_leave_balance (balance vs history), though it lacks detail on scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. Does not mention conditions, prerequisites, or exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
apply_leave - First observed
get_leave_balance - First observed
get_leave_history
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
Track and manage employee time off with quick balance lookups and streamlined applications. Find t…
Governed HR records and confirmed time-off actions for UK SMEs.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
- StackOneOAuthcom.stackone
Give AI agents 30,000+ safe, token-optimized actions across Workday, SAP, Oracle + hundreds more.
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.-
- FlicenseBqualityCmaintenanceEnables managing employee leave requests including checking balance, applying for leave, and viewing history.3-