A Model Context Protocol server that enables querying attendance information and managing employee leave requests, overtime requests, and schedules.
This is a Model Context Protocol (MCP) server for attendance information queries and form applications. It provides tools and resources for managing employee attendance, leave requests, overtime requests, and schedules.
Clone this repository:
git clone https://github.com/yourusername/attendance-mcp-server.git
cd attendance-mcp-server
Set up a virtual environment and install the required dependencies:
./setup_venv.sh
Configure the database connection by creating a .env
file with the following content:
DB_HOST=db.weathered-shadow-70756968.us-east-2.aws.neon.tech
DB_NAME=shinedb
DB_USER=shine_user
DB_PASSWORD=Shine@123456#!
DB_PORT=5432
You can run the server using the wrapper script:
./run_mcp.sh
Or activate the virtual environment and use the MCP CLI:
source .venv/bin/activate
mcp run attendance_mcp_server.py
To use this server with Claude Desktop:
Install Claude Desktop from claude.ai/download
Run the installation script to configure Claude Desktop:
python install_claude_desktop.py
Restart Claude Desktop
If you encounter the "No module named 'mcp'" error:
Make sure the MCP package is installed in the Python environment that Claude Desktop is using:
./install_dependencies.sh
Check the Claude Desktop logs for more information:
~/Library/Logs/Claude/mcp*.log
%APPDATA%\Claude\Logs\mcp*.log
If the issue persists, try running the MCP server manually to see if there are any errors:
./run_attendance_mcp.sh
get_employee_info
: Get employee information by ID or employee numberlist_employees
: List employees with optional filteringlist_departments
: List all departmentsget_attendance_records
: Get attendance records with optional filteringsubmit_attendance_record
: Submit a new attendance record or update an existing oneget_leave_requests
: Get leave requests with optional filteringsubmit_leave_request
: Submit a new leave requestapprove_leave_request
: Approve or reject a leave requestget_overtime_requests
: Get overtime requests with optional filteringsubmit_overtime_request
: Submit a new overtime requestapprove_overtime_request
: Approve or reject an overtime requestget_employee_schedule
: Get employee schedule with optional filteringlist_shifts
: List all available shiftsassign_schedule
: Assign a schedule to an employeeget_monthly_attendance_stats
: Get monthly attendance statisticsget_holidays
: Get holidays with optional filteringemployee://{employee_id}
: Get employee information as a resourcedepartment://{department_id}
: Get department information as a resourceattendance://{employee_id}/{date}
: Get attendance information for a specific employee and daterequest_leave
: Create a leave request promptrequest_overtime
: Create an overtime request promptcheck_attendance
: Create an attendance check promptMIT
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!