leave-manager-mcp
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-mcpApply for leave on 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.
Leave Management System using MCP (Model Context Protocol)
A minimal, AI-ready Leave Management System built using FastMCP (Model Context Protocol).
This project demonstrates how backend business logic can be exposed directly to AI clients (like Claude Desktop), without REST APIs or prompt hacks.
โจ Why This Project Exists
Most of us:
Watch reels
Save YouTube tutorials
Bookmark blogs
โฆbut never execute.
This project started when I searched:
โfast api backend for employee management systemโ
and found this Medium article:
๐ Building a Leave Management System with FastAPI and FastMCP by Madhuri
Instead of just reading it, I asked:
โWhy not build it myself?โ
That curiosity turned into execution โ and this repo is the result.
Related MCP server: leave_manager
๐ง What This Project Demonstrates
What MCP (Model Context Protocol) actually looks like in practice
How AI models can discover and call backend functions
How to build an AI-first backend, not just an API
How Claude Desktop interacts with real application logic
โ๏ธ Features
MCP Tools
get_leave_balance(employee_id)apply_leave(employee_id, leave_dates)get_leave_history(employee_id)
MCP Resource
greeting://{name}
System Details
In-memory mock database
Claude Desktop compatible (stdio-based MCP server)
No REST APIs, no frontend โ pure MCP
๐๏ธ Project Structure
leave-manager-mcp/ โโโ main.py # MCP server (Claude-compatible) โโโ requirements.txt # Dependencies โโโ README.md
yaml Copy code
โถ๏ธ How It Works (Big Picture)
Claude Desktop โ Model Context Protocol (MCP) โ FastMCP Server (Python) โ Business Logic (Leave Management)
yaml Copy code
Claude discovers tools, understands their schema, and calls them directly.
๐ Getting Started
1๏ธโฃ Create & activate virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
2๏ธโฃ Install dependencies
bash
Copy code
pip install -r requirements.txt
3๏ธโฃ Run MCP server (manual testing)
bash
Copy code
python main.py
โ ๏ธ For Claude Desktop, Claude itself starts this process via MCP configuration.
๐ค Claude Desktop Configuration (Windows Example)
json
Copy code
{
"mcpServers": {
"LeaveManagerPython": {
"command": "C:\\Users\\<USERNAME>\\path\\to\\.venv\\Scripts\\python.exe",
"args": [
"C:\\Users\\<USERNAME>\\path\\to\\main.py"
],
"cwd": "C:\\Users\\<USERNAME>\\path\\to\\leave-manager-mcp"
}
}
}
๐ Restart Claude Desktop after updating the config.
๐งช Example Prompts (Claude)
rust
Copy code
Check leave balance for employee E001
Apply leave for employee E002 on 2025-04-17 and 2025-04-18
Show leave history of E001
Use greeting://Akash
Claude will automatically call the correct MCP tools.
โ ๏ธ Key Learnings
MCP requires a pure stdio process
FastAPI & MCP must be separated
Claude Desktop caches MCP configs aggressively
Execution teaches more than tutorials
๐ฎ Future Improvements
Add FastAPI (dual-mode: REST + MCP)
Persist data using PostgreSQL
Add authentication & roles
Build AI agents on top of MCP tools
Production deployment
๐ Final Thought
Reading tutorials gives comfort.
Watching reels gives motivation.
But execution gives clarity.
This repo exists because of curiosity โ not perfection.
yaml
Copy code
---
## โ
Why This README Works
โ Clean headings
โ Clear story hook
โ Explains MCP simply
โ Recruiter / dev friendly
โ Medium-article ready
โ No fluff, no noise
---
### ๐ Next (Recommended)
Now that GitHub is ready, next we should:
1. **Write the Medium article using this repo**
2. **Add FastAPI back cleanly (dual-mode)**
3. **Create an AI agent on top of this**
Just say **which one** and we continue ๐ฅThis server cannot be deployed
Maintenance
Related MCP Connectors
- AstrocalOAuthdev.astrocal
AI-native scheduling: check availability, book meetings, cancel and reschedule via MCP
Let AI agents query data and act across all your business apps via MCP.
- mcp-serverOAuthio.klokin
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables HR teams to query and manage employee leave through natural language using Claude Desktop, with tools for checking balances, applying leave, and viewing history.3-
- FlicenseNot gradedqualityCmaintenanceEnables natural-language-based employee leave management including leave balance checks, leave applications, approvals, and history retrieval through an MCP-compatible client.-
- FlicenseBqualityCmaintenanceEnables LLMs to manage employee leave by checking balances, applying for leave, and viewing history.3-
- FlicenseAqualityCmaintenanceExposes 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-