LeaveManager

LeaveManager

A Model Context Protocol server that enables users to manage employee leave through natural language. It provides tools to check leave balances, apply for leave, and view leave history via Claude integration.

Category
Visit Server

README

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured