kasra-mcp-server
# Kasra Lite Attendance & Personnel MCP Server
[](https://pypi.org/project/kasra-mcp-server/)
[](https://www.python.org/downloads/)
[](https://modelcontextprotocol.io/)
[](https://opensource.org/licenses/MIT)
A Model Context Protocol (MCP) server for the **Kasra Lite Attendance, Personnel, Cartable, and Leave Management System** ([app.kasralite.com](https://app.kasralite.com)).
Connect your AI agents (Claude Desktop, OpenCode, Cursor, Windsurf, etc.) directly to Kasra Lite to view attendance, punches, leaves, cardex, cartable requests, work periods, and submit leave/mission requests autonomously.
> ๐ **Published on PyPI & 100% Pure HTTP / Async API โ No Headless Browser Required!**
> Runs via standard HTTP/2 APIs and AES-128-CBC encryption without downloading Chromium or running Playwright/Puppeteer. Automatically detects and routes Iranian enterprise traffic even when a foreign VPN (like Surfshark/v2ray) is active. Works on Linux, Docker, macOS, and Windows.
---
## โก Quick Start (Zero-Install with `uvx`)
You don't need to clone this repository or install Python dependencies manually. Just configure your agent:
### Claude Desktop (`claude_desktop_config.json`)
```json
{
"mcpServers": {
"kasra": {
"command": "uvx",
"args": ["kasra-mcp-server@latest"],
"env": {
"KASRA_BASE_URL": "https://app.kasralite.com",
"KASRA_USERNAME": "your_username",
"KASRA_PASSWORD": "your_password"
}
}
}
}
```
### OpenCode (`~/.config/opencode/opencode.jsonc` or `opencode.json`)
```json
{
"mcp": {
"kasra": {
"type": "local",
"command": [
"uvx",
"kasra-mcp-server@latest"
],
"environment": {
"KASRA_BASE_URL": "https://app.kasralite.com",
"KASRA_USERNAME": "your_username",
"KASRA_PASSWORD": "your_password"
},
"enabled": true
}
}
}
```
### Cursor (`.cursor/mcp.json`)
```json
{
"mcpServers": {
"kasra": {
"command": "uvx kasra-mcp-server@latest",
"env": {
"KASRA_BASE_URL": "https://app.kasralite.com",
"KASRA_USERNAME": "your_username",
"KASRA_PASSWORD": "your_password"
}
}
}
}
```
---
## ๐ฆ Traditional Installation (`pip`)
```bash
pip install kasra-mcp-server
```
Then configure your agent using `kasra-mcp-server`:
```json
{
"mcpServers": {
"kasra": {
"command": "kasra-mcp-server",
"env": {
"KASRA_BASE_URL": "https://app.kasralite.com",
"KASRA_USERNAME": "your_username",
"KASRA_PASSWORD": "your_password"
}
}
}
}
```
---
### Option C: From Local Source
```bash
git clone https://github.com/razavioo/kasra-mcp-server.git
cd kasra-mcp-server
pip install -r requirements.txt
```
```json
{
"mcpServers": {
"kasra": {
"command": "python3",
"args": [
"/path/to/kasra-mcp-server/main.py"
],
"env": {
"KASRA_BASE_URL": "https://app.kasralite.com",
"KASRA_USERNAME": "your_username",
"KASRA_PASSWORD": "your_password"
}
}
}
}
```
---
## ๐งช Testing
Test all tools directly in python:
```bash
python3 test_tools.py
```
---
## ๐ License
This project is licensed under the [MIT License](LICENSE).
TDQS
Scored across 18 tools
Each tool targets a distinct resource or action: reporting tools separate daily, monthly, and dashboard views; request tools distinguish types, submitted requests, and submission/deletion; system data tools cover shifts, groups, holidays, and menus without overlap. Even related tools like punch gaps and daily report are clearly differentiated by output purpose.
All tools follow a consistent 'kasra_' prefix with snake_case verb_noun structure, e.g., kasra_get_profile, kasra_submit_credit_request, kasra_delete_credit_request. The few non-get verbs (submit, delete, export) are still in the same style, making the naming pattern predictable and reliable.
At 18 tools, the set is slightly above the typical 3-15 sweet spot but still reasonable for a broad attendance/HR system covering reports, requests, workflow, and configuration data. Some peripheral tools like get_desktop_shortcuts and get_user_menu could be considered expendable, which prevents a perfect score.
The core employee workflow is well covered: profile, dashboard, daily/monthly reports, punch gap analysis, submitting and deleting credit requests, and viewing submitted requests and cartable items. However, there is no update or approval action for cartable items, no request detail tool, and only daily report export is available, leaving minor workflow gaps.