leave-manager-mcp

leave-manager-mcp

Enables AI assistants to manage employee leave by checking balances, applying for leave, and viewing history via MCP tools.

Category
Visit Server

README

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.


๐Ÿง  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 ๐Ÿ”ฅ

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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

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