Content
# MCP HR Helper (v1)
An AI-integrated Leave Management System built using the **Model Context Protocol (MCP)**.
This project demonstrates how backend tools can be exposed to LLMs (like Claude) to perform real-world operations such as employee management and leave workflows.
---
## Features
### Employee Management
* Add new employees
* Delete employees
* Search employees by name
* View all employee details
* Update leave balance
### Leave Management
* Apply leave
* Approve / Reject leave
* Cancel leave
* Track leave status
* View employee leave history
### Analytics
* Leave summary (total, approved, pending, rejected)
* Low balance employee detection
### AI Integration
* MCP tools callable via Claude
* Prompt-based leave email generation
* Resource-based employee lookup (`employee://{id}`)
---
## Tech Stack
* Python
* MCP (Model Context Protocol)
* FastMCP Server
* JSON (file-based persistence)
---
## 📁 Project Structure
```
MCP_HR_HELPER/
│── main.py
│── employees.json
│── leaves.json
│── .gitignore
│── README.md
```
---
## How It Works
* Data is stored in **JSON files**
* MCP server exposes tools via `stdio`
* Claude interacts with tools dynamically
* All updates persist across restarts
---
## Setup Instructions
### 1. Clone Repository
```
git clone https://github.com/your-username/MCP_HR_HELPER.git
cd MCP_HR_HELPER
```
### 2. Create Virtual Environment
```
python -m venv .venv
.venv\Scripts\activate
```
### 3. Install Dependencies
```
pip install mcp
```
### 4. Run Server
```
python main.py
```
---
## MCP Configuration (Claude)
Add this in:
```
%APPDATA%\Claude\claude_desktop_config.json
```
```
{
"mcpServers": {
"leave-manager": {
"command": "C:\\path\\to\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\main.py"]
}
}
}
```
---
## Example Queries
* "Show all employees"
* "Apply leave for employee 101 for 2 days"
* "Approve leave with id 1"
* "Show leave summary"
* "Generate leave email for Subhasish for 3 days"
---
## Limitations (v1)
* No authentication
* No database (JSON-based storage)
* No concurrency handling
* Single-user system
---
## Future Improvements
* SQLite / PostgreSQL integration
* Role-based access (Admin / Employee)
* REST API + Frontend dashboard
* Multi-agent HR assistant
* Deployment (Docker / Cloud)
---
## Author
**Subhasish**
B.Tech | AI & Data Science
---