Leave Manager
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 What's the leave balance for employee ID 5?"
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
This project is a Python MCP server for managing employees, leave balances, and leave requests with SQLite.
1. Create the project
Open PowerShell and create a project directory:
mkdir D:\Coding\mcpserver\LeaveManager
cd D:\Coding\mcpserver\LeaveManagerCreate a uv Python project inside leave_manager_server:
uv init leave_manager_server
cd leave_manager_server
uv add "mcp[cli]>=2.1.1"The project requires Python 3.14 or newer. uv creates pyproject.toml, uv.lock, and the virtual environment used to run the server.
Related MCP server: leave_manager
2. Implement the server
Create server.py and add the following parts:
Import
MCPServerfrommcp.server.mcpserver.Create the server with
MCPServer("Leave Manager").Define
EmployeeandLeaveRequestdata models.Create a SQLite database next to
server.pyusing an absolute path.Initialize
employeesandleave_requeststables and insert sample data on startup.Add resources for employee directories and leave requests.
Add tools to submit and approve leave, check balances, list pending approvals, get database statistics, and add employees.
Start the server from the
__main__block:
if __name__ == "__main__":
init_database()
mcp.run()The project uses MCP 2.x. The old MCP 1.x import does not work with this dependency:
from mcp.server.fastmcp import FastMCPThe working MCP 2.x form is:
from mcp.server.mcpserver import MCPServer
mcp = MCPServer("Leave Manager")3. Run the server directly
From the project directory:
cd D:\Coding\mcpserver\LeaveManager\leave_manager_server
uv run server.pyThe server uses standard input/output for MCP communication, so it stays running while an MCP client is connected. Press Ctrl+C to stop it.
Validate that the module imports correctly without starting the long-running server:
uv run python -c "import server; print('Server import valid')"4. Test with MCP Inspector
The supported development command is:
cd D:\Coding\mcpserver\LeaveManager\leave_manager_server
uv run mcp dev server.pyThe MCP Inspector uses Node.js. Install Node.js 22.19.0 or newer before using the latest Inspector. Check versions with:
node --version
npm --versionDo not run npm i in this Python project directory because it has no package.json. If Inspector reports a missing native binding, clear the temporary npx cache and retry:
Remove-Item "$env:LOCALAPPDATA\npm-cache\_npx" -Recurse -Force
uv run mcp dev server.py5. Connect Claude Desktop
Claude Desktop reads its configuration from:
%APPDATA%\Claude\claude_desktop_config.jsonAdd this server entry. Replace the path if the project is stored elsewhere:
{
"mcpServers": {
"leave-manager": {
"command": "uv",
"args": [
"run",
"--directory",
"D:\\Coding\\mcpserver\\LeaveManager\\leave_manager_server",
"server.py"
]
}
}
}Restart Claude Desktop after saving the configuration. The server creates leave_manager.db beside server.py on its first startup.
Available MCP features
Resources:
employees://allemployee://{employee_id}leave-requests://allleave-requests://employee/{employee_id}leave-requests://status/{status}
Tools:
submit_leave_requestapprove_leave_requestcheck_leave_balanceget_pending_approvalsget_database_statsadd_employeeThis will add my Config file automaticuv run mcp install server.py --name "leave_manager"
Available Tools
6 toolsadd_employeeC
Add a new employee to the system with duplicate checking
Inputs: name (required), manager (required), department (required), force_create, +2 more. Returns: result
approve_leave_requestD
Approve a leave request
Inputs: request_id (required), approver_name (required). Returns: result
check_leave_balanceC
Check leave balance for an employee
Inputs: employee_id (required). Returns: result
get_database_statsC
Get database statistics
Inputs: no named parameters. Returns: result
get_pending_approvalsA
Get all pending leave requests that need approval
Inputs: no named parameters. Returns: result
submit_leave_requestC
Submit a new leave request
Inputs: reason (required), end_date (required), leave_type (required), start_date (required), +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct action and target resource; there is no overlap between submitting, approving, checking balance, listing pending approvals, adding employees, or retrieving stats.
All tool names follow a consistent snake_case verb_noun pattern (submit_leave_request, approve_leave_request, etc.), making the set predictable and easy to parse.
Six tools is well within the typical 3-15 range for a focused domain. Each tool earns its place, though get_database_stats is somewhat generic.
The leave lifecycle lacks key operations like reject_leave_request, cancel_leave_request, or get_leave_history. Approval without rejection is a notable gap, and employee management only supports addition.
Maintenance
Related MCP Connectors
Employee leave and PTO: requests, approvals, balances, who is out, and conflict checks.
Track and manage employee time off with quick balance lookups and streamlined applications. Find t…
Check shifts, time clock entries, time-off requests, swaps and availability, and manage shifts.
Read employees, leave, recruiting and reports; book or decide leave and add applicant notes.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage employee leave by checking balances, applying for leave, and viewing history via MCP tools.-
- FlicenseNot gradedqualityDmaintenanceEnables natural-language-based employee leave management including leave balance checks, leave applications, approvals, and history retrieval through an MCP-compatible client.-
- FlicenseAqualityDmaintenanceExposes employee leave-management operations (add employees, check balance, apply/cancel leave, view history) as MCP tools for AI clients like Claude Desktop to call directly.6-
- FlicenseNot gradedqualityDmaintenanceEnables managing employee information, tasks (todos), and company policies via MCP tools and resources.-