MCP server/ai-tools

LeaveManager MCP Server

Manage employee leave through natural language with Claude integration.

umamaheswararao04/leavemanager-mcp-server ↗by umamaheswararao04updated
1

Add it to Claude Code

claude mcp add leave-manager -- uv run main.py
2

Make your agent remember this setup

leave-manager's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Check employee leave balance
  • Apply leave for specific dates
  • View leave history
  • In-memory state management
  • Automatic tool selection from natural language

Tools 3

get_leave_balanceChecks remaining leave days for an employee.
apply_leaveApplies leave for given dates and updates balance.
get_leave_historyReturns all leave dates taken by an employee.

Try it

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
Original README from umamaheswararao04/leavemanager-mcp-server

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

🧠 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 Analyst

Frequently Asked Questions

What are the key features of LeaveManager?

Check employee leave balance. Apply leave for specific dates. View leave history. In-memory state management. Automatic tool selection from natural language.

What can I use LeaveManager for?

Automating leave balance inquiries for HR staff via Claude. Streamlining the leave application process for employees. Reviewing historical leave data for attendance tracking.

How do I install LeaveManager?

Install LeaveManager by running: uv run main.py

What MCP clients work with LeaveManager?

LeaveManager works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep LeaveManager docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest