saurav-farkade/MCP-Workshop-Saurav-Mahesh-Parth
If you are the rightful owner of MCP-Workshop-Saurav-Mahesh-Parth and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A MongoDB-backed Leave Management System that integrates with Claude using the Multi-Command Protocol (MCP) framework.
Leave Management MCP Server
A MongoDB-backed Leave Management System that integrates with Claude using the Multi-Command Protocol (MCP) framework. This project allows you to manage employee leave applications and data through natural language prompts within the Claude desktop application.
📝 Table of Contents
✨ Features
- Employee Management: Add, delete, and view employee details.
- Leave Management: Apply for leave and view leave history.
- Leave Balance: Check an employee's remaining leave balance.
- Natural Language Interface: Interact with the system using simple, conversational prompts via Claude.
🚀 Prerequisites
Before you begin, ensure you have the following installed:
- Python 3.9+: Download here
- VS Code (or any IDE): Download here
- Claude Desktop App: Download here
📦 Setup Instructions
Follow these steps to get your MCP server up and running.
1. Configuration
-
Install
mcpanduvOpen your terminal and run the following commands to install the necessary packages.
uvis a fast package installer that simplifies dependency management.pip install mcppip install uv -
Initialize the Project
Create a new project directory and initialize it with
uv.uv init mcp-server-democd mcp-server-demouv add mcp["cli"] -
Create the Server Code
Replace the contents of
server.pywith your MCP server code. -
Configure the MongoDB URI
Create a
.envfile in the project's root directory to store your MongoDB connection string securely.# .env MONGO_URI=<ENTER YOUR MONGO DB CONNECTION STRING>
2. Running the Server
Once everything is set up, run this single command from your terminal. This will install the dependencies and automatically register your server with the Claude Desktop App.
uv run mcp install .\server.py
Claude Desktop will detect and register the MCP server, making it available for use in your conversations.
🔧 Available Tools
Your MCP server exposes the following tools, which Claude can use to interact with your system.
| Function | Description |
|---|---|
add_employee(...) | Add employee with personal and leave info |
get_all_employee_details() | List all employee personal info |
get_all_employees() | Show leave balance and history |
delete_employee(...) | Delete employee records |
get_leave_balance(...) | Get leave balance of an employee |
apply_leave(...) | Apply leave for an employee |
get_leave_history(...) | Show leave dates taken |
greeting://{name} | Return a greeting message |
💬 Sample Prompts
Try these prompts in Claude to test your new leave management system. You can use either direct tool calls or natural language.
Direct Tool Calls:
add_employee("1234", "Saurav Farkade", "sauravfarkade9191@gmail.com", "SimulationHub", 10)
get_all_employee_details()
get_leave_balance("1234")
apply_leave("1234", ["2025-08-05", "2025-08-06"])
get_leave_history("1234")
delete_employee("1234")
Or You can prompt in Natural Language as well:
"Add employee Saurav Farkade, 1234, sauravfarkade9191@gmail.com, SimulationHub, with a balance of 10 days.""Show me all employee data.""What is the leave balance for employee 1234?""Apply leave for employee 1234 on August 5th and 6th, 2025.""Greet Saurav."
🎉 You're Done!
Your Claude-powered Leave Management Server is now fully functional. Enjoy the seamless integration and natural language interface!