LeaveManager
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., "@LeaveManagerApply for leave for employee E001 on 2025-04-17 and 2025-05-01"
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.
LeaveManager β MCP Server with Claude Integration
LeaveManager is a custom Model Context Protocol (MCP) server built using FastMCP.
It allows Claude to interact with a backend Leave Management System using natural language.
This project demonstrates how Claude can automatically select and execute backend tools based on user queries.
π Features
Check employee leave balance
Apply leave for specific dates
View leave history
In-memory state management
Claude Desktop integration via MCP
Automatic tool selection from natural language
Related MCP server: Attendance Management MCP Server
π§ Tech Stack
Python 3.10+
FastMCP
MCP CLI
Claude Desktop (for tool invocation)
uv (Python package manager)
π Project Structure
my-first-mcp-server/ β βββ main.py βββ pyproject.toml βββ README.md βββ .gitignore βββ uv.lock βββ .venv/
π οΈ MCP Tools
1οΈβ£ get_leave_balance
Checks remaining leave days for an employee.
Input:
employee_id(string)
2οΈβ£ apply_leave
Applies leave for given dates and updates balance.
Input:
employee_id(string)leave_dates(list of YYYY-MM-DD)
3οΈβ£ get_leave_history
Returns all leave dates taken by an employee.
Input:
employee_id(string)
π‘ Example Claude Queries
βCheck leave balance for employee E001β
βApply leave for employee E001 on 2025-04-17 and 2025-05-01β
βShow leave history for employee E001β
Claude automatically selects and executes the correct MCP tool.
β οΈ Important Note on Data Storage
This project uses in-memory storage
Data resets when the MCP server restarts
This is intentional for simplicity
Can be extended with SQLite for persistence
βΆοΈ Running Locally (Without Claude)
uv run main.py
π― Learning Outcomes
Built a real MCP server
Exposed backend tools to Claude
Understood stateful MCP behavior
Integrated Python backend with LLM tool calling
π Future Improvements
SQLite persistence
Date validation & duplicate checks
Employee creation & reset tools
FastAPI + MCP hybrid architecture
π§βπ» Author
Uma Maheswara Rao
Aspiring AI Engineer / Data AnalystAvailable Tools
3 toolsapply_leaveC
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 provided, the description carries full burden for behavioral disclosure. While 'Apply leave' implies a write/mutation operation, the description doesn't specify whether this requires approval, what permissions are needed, whether it's reversible, or what happens with conflicting dates. The example format is helpful but doesn't address critical behavioral aspects of a leave application system.
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 extremely concise - just one sentence with a helpful example. There's no wasted text, and the information is front-loaded. However, the brevity comes at the cost of completeness, making it more under-specified than optimally concise.
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 this is a mutation tool with no annotations, 2 parameters (0% schema coverage), but with an output schema present, the description is minimally adequate. The example format helps, but critical context is missing: no error conditions, no relationship to sibling tools, no behavioral constraints. The output schema existence means return values are documented elsewhere, but the description should still address more operational context.
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?
The description provides an example format for 'leave_dates' parameter (array of date strings), which adds meaningful context beyond the schema's 0% description coverage. However, it doesn't explain the 'employee_id' parameter at all, nor does it clarify date format requirements, validation rules, or what constitutes valid leave dates. The schema coverage is 0%, so the description partially compensates but not fully.
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 states the tool's purpose ('Apply leave for specific dates') which is a clear verb+resource combination. However, it doesn't distinguish this from potential sibling tools like 'get_leave_balance' or 'get_leave_history' - it only describes what it does without contextual differentiation. The example dates help illustrate the format but don't enhance the core purpose statement.
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 provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, constraints, or relationships with sibling tools like 'get_leave_balance' (which might be needed before applying leave) or 'get_leave_history' (which might show past applications). The agent receives no help in determining appropriate usage contexts.
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 has a clearly distinct purpose: apply_leave is for submitting new leave requests, get_leave_balance shows remaining leave days, and get_leave_history retrieves past leave records. There is no overlap in functionality, making tool selection straightforward for an agent.
All tools follow a consistent verb_noun naming pattern (apply_leave, get_leave_balance, get_leave_history) with clear, descriptive names. The pattern is uniform throughout, enhancing readability and predictability.
With only 3 tools, the server feels thin for a leave management domain, as it lacks operations like updating or canceling leave requests, viewing team leave calendars, or approving/rejecting leave. While the tools cover basic needs, the scope is borderline minimal.
The tool set has significant gaps for a leave management system. It includes apply, balance, and history but misses critical operations such as update_leave, delete_leave, list_pending_requests, or approve_leave. This incomplete coverage will likely cause agent failures in real-world workflows.
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
- mcp-serverOAuthio.klokin
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseDqualityDmaintenanceA Model Context Protocol server that enables Claude Desktop to access structured employee data and perform HR operations including employee lookups, searches, and global leave requests.31MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables querying attendance information and managing employee leave requests, overtime requests, and schedules.-
- AlicenseAqualityDmaintenanceManages employee leave with Claude Desktop via natural language. Enables checking balances, applying, approving, and reviewing leave requests through a Supabase-backed MCP server.10MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol server that enables Claude to interact with a Lucca instance to list employees, departments, and view absences in natural language.3MIT