Skip to main content
Glama
svijayingle

employee-leave-management-mcp

by svijayingle
README.md
# Leave Management MCP Server

This project provides a simple MCP server for an employee leave-management system built with UV and Python.

## Features

- Add employees
- List all employees
- Add leave entries for an employee
- List leave entries for an employee
- Delete leave entries
- Startup and tool logging for troubleshooting

## Project structure

- `src/leave_management_mcp/server.py` – MCP tool definitions and in-memory leave data store
- `src/leave_management_mcp/__init__.py` – package exports and entry point
- `tests/test_leave_management.py` – regression tests for the core behavior
- `leave_management_mcp.log` – runtime log file generated by the server

## Run locally

From the project root:

```powershell
cd C:\Users\VIJAY\Codebase\mcp\leave-management
uv run leave-management-mcp
```

The server uses stdio transport, which is the recommended transport for Claude Desktop.

## Claude Desktop config

Create or edit this file:

```text
%APPDATA%\Claude\claude_desktop_config.json
```

Use this exact config:

```json
{
  "mcpServers": {
    "leave-management": {
      "command": "C:\\Users\\VIJAY\\AppData\\Local\\Programs\\Python\\Python314\\Scripts\\uv.exe",
      "args": [
        "--directory",
        "C:\\Users\\VIJAY\\Codebase\\mcp\\leave-management",
        "run",
        "leave-management-mcp"
      ]
    }
  }
}
```

Important:
- The earlier path `C:\Users\VIJAY\.local\bin\uv.exe` was invalid on this machine.
- The actual installed UV path is under the Python Scripts folder.
- Restart Claude Desktop after saving the file.

## Example prompts in Claude

- "Add employee E001, Alice Johnson"
- "List all employees"
- "Add leave for E001 from 2026-08-20 to 2026-08-22 as annual"
- "Show leave records for E001"
- "Delete leave for E001 from 2026-08-20 to 2026-08-22"

## Logging

The server writes logs to:

- stderr for immediate output
- `leave_management_mcp.log` in the project root for persisted troubleshooting

This helps confirm whether the MCP server is starting correctly when Claude Desktop launches it.

## Validation

Run the test suite:

```powershell
cd C:\Users\VIJAY\Codebase\mcp\leave-management
uv run pytest -q
```

Verified result:

```text
2 passed in 2.85s
```

The project passes the current regression tests and the server launch path has been verified.

TDQS

B3.4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct resource and action: employee creation/listing versus leave creation/listing/deletion. No two tools appear to do the same thing.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (add_, list_, delete_). The slightly longer list_leaves_for_employee still fits the convention clearly.

Tool Count5/5

Five tools is well-scoped for a focused employee leave management server. Each tool covers a meaningful core operation without unnecessary bloat.

Completeness3/5

The tool set covers basic employee creation/listing and leave creation/listing/deletion, but lacks employee update/delete and leave update operations. Agents can manage core workflows but will hit dead ends for modifications.

Maintenance

ActivityStale
ResponsivenessNo issues