HR Assist MCP Server
README.md
# ๐งโ๐ผ HR Assist โ MCP Server
An **MCP (Model Context Protocol) server** that automates HR onboarding tasks โ HRMS registration, welcome emails, IT ticketing, meeting scheduling, and leave management โ so an AI agent like Claude can handle the entire new-hire workflow from a single prompt. ๐
---
## โจ Features
| Area | What it does |
|---|---|
| ๐ค **Employee Management** | Add employees, fetch details by (fuzzy) name search, look up managers & direct reports |
| ๐ง **Email** | Send plain-text or HTML emails (with optional attachments) via SMTP |
| ๐ซ **Ticketing** | Raise, update, and list IT/equipment tickets (laptop, ID card, etc.) |
| ๐
**Meetings** | Schedule, list, and cancel meetings for any employee |
| ๐ด **Leave Management** | Check leave balance, apply for leave, view leave history |
| โก **Ready-made Prompt** | Built-in `onboard_new_employee` MCP prompt that chains all of the above into one onboarding flow |
---
## ๐๏ธ Project Structure
```
atliq-hr-assist/
โโโ server.py # FastMCP server โ defines all MCP tools & the onboarding prompt
โโโ emails.py # EmailSender โ SMTP email utility (plain/HTML + attachments)
โโโ utils.py # seed_services() โ seeds in-memory demo data
โโโ HRMS/
โ โโโ __init__.py
โ โโโ employee_manager.py # EmployeeManager โ employee CRUD + org hierarchy
โ โโโ meeting_manager.py # MeetingManager โ schedule/list/cancel meetings
โ โโโ leave_manager.py # LeaveManager โ leave balance & history
โ โโโ ticket_manager.py # TicketManager โ IT/equipment tickets
โ โโโ schemas.py # Pydantic models for all entities
โโโ pyproject.toml
โโโ .python-version
โโโ .gitignore
โโโ .env # ๐ local secrets โ never committed
```
> ๐ Note: `server.py` does `from HRMS import *`, so the manager classes (`employee_manager.py`, `meeting_manager.py`, etc.) and `schemas.py` should live inside an `HRMS/` package folder alongside `__init__.py`.
---
## ๐ ๏ธ Requirements
- ๐ Python **3.10+**
- Dependencies (see `pyproject.toml`):
- `fastmcp>=3.4.5`
- `mcp[cli]>=1.9.4`
- `pydantic>=2.13.4`
- `python-dotenv`
---
## โ๏ธ Setup
### 1. Clone & install
```bash
git clone https://github.com/Vraj-Data-Scientist/hr-onboarding-agent-with-MCP.git
cd hr-onboarding-agent-with-MCP
# using uv (recommended)
uv sync
# or using pip
pip install -e .
```
### 2. Configure environment variables
Create a `.env` file in the project root (already git-ignored ๐):
```env
EMAIL=your-smtp-email@gmail.com
EMAIL_PWD=your-app-specific-password
```
> โ ๏ธ **Security note:** Use a Gmail **App Password**, not your real account password, and never commit `.env` to version control. If real credentials were ever pushed to a repo, rotate/revoke them immediately.
### 3. Run the server standalone (optional, for testing)
```bash
python server.py
```
This starts the MCP server over **stdio** transport.
---
## ๐ Connecting to Claude as an MCP Client
This server speaks MCP over stdio, so it plugs directly into any MCP-compatible Claude client.
### ๐ฅ๏ธ Option A โ Claude Desktop
1. Open your Claude Desktop config file:
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
2. Add this server under `mcpServers`:
```json
{
"mcpServers": {
"hr-onboarding-agent": {
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/hr-onboarding-agent-with-MCP",
"mcp",
"run",
"server.py"
],
"env": {
"EMAIL": "your-smtp-email@gmail.com",
"EMAIL_PWD": "your-app-specific-password"
}
}
}
}
```
3. Restart Claude Desktop. A ๐จ tools icon should appear, showing the `hr-assist` server connected with tools like `add_employee`, `send_email`, `create_ticket`, `schedule_meeting`, and more.
4. Prompt Claude naturally, e.g.:
> "Onboard a new employee named Priya Nair reporting to Tony Sharma."
### ๐ก Using the built-in onboarding prompt
The server exposes a ready-made MCP prompt, `onboard_new_employee`, which Claude Desktop (via the `/` prompt picker) and Claude Code can surface directly โ just supply `employee_name` and `manager_name`, and the full onboarding flow runs end-to-end.
---
## ๐งช Example
**Prompt:**
```
Onboard a new employee with the following details:
- Name: Vraj Dobariya
- Manager Name: Tony Sharma
```
**What happens automatically:**
1. ๐ค Employee added to HRMS with correct manager mapping
2. ๐ง Welcome email sent with generated login
3. ๐จ Manager notified of the new hire
4. ๐ซ Tickets raised for laptop, ID card, and other equipment
5. ๐
Introductory meeting scheduled between employee and manager
---
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessNo issues