Attendance Management MCP Server

by shineliang

考勤管理MCP服务器

这是一个用于考勤信息查询和表单应用的模型上下文协议 (MCP) 服务器。它提供用于管理员工考勤、休假申请、加班申请和排班表的工具和资源。

特征

  • 员工信息管理
  • 出勤记录追踪
  • 请假申请管理
  • 加班申请管理
  • 日程管理
  • 统计和报告

先决条件

  • Python 3.10 或更高版本
  • Neon PostgreSQL 数据库

安装

  1. 克隆此存储库:
    git clone https://github.com/yourusername/attendance-mcp-server.git cd attendance-mcp-server
  2. 设置虚拟环境并安装所需的依赖项:
    ./setup_venv.sh
  3. 通过创建具有以下内容的.env文件来配置数据库连接:
    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

运行服务器

您可以使用包装脚本运行服务器:

./run_mcp.sh

或者激活虚拟环境并使用 MCP CLI:

source .venv/bin/activate mcp run attendance_mcp_server.py

与 Claude Desktop 一起使用

要将此服务器与 Claude Desktop 一起使用:

  1. claude.ai/download安装 Claude Desktop
  2. 运行安装脚本来配置Claude Desktop:
    python install_claude_desktop.py
  3. 重启Claude桌面

故障排除

如果遇到“没有名为‘mcp’的模块”错误:

  1. 确保 Claude Desktop 使用的 Python 环境中安装了 MCP 包:
    ./install_dependencies.sh
  2. 查看 Claude Desktop 日志以获取更多信息:
    • 在 macOS 上: ~/Library/Logs/Claude/mcp*.log
    • 在 Windows 上: %APPDATA%\Claude\Logs\mcp*.log
  3. 如果问题仍然存在,请尝试手动运行 MCP 服务器以查看是否存在任何错误:
    ./run_attendance_mcp.sh

可用工具

员工信息

  • get_employee_info :通过 ID 或员工编号获取员工信息
  • list_employees :列出员工,并可选择过滤
  • list_departments :列出所有部门

出勤记录

  • get_attendance_records :获取带有可选过滤的出勤记录
  • submit_attendance_record :提交新的出勤记录或更新现有记录

休假管理

  • get_leave_requests :获取休假请求,并可选择过滤
  • submit_leave_request :提交新的休假申请
  • approve_leave_request :批准或拒绝休假请求

加班管理

  • get_overtime_requests :获取加班请求,并可选择过滤
  • submit_overtime_request :提交新的加班申请
  • approve_overtime_request :批准或拒绝加班请求

日程管理

  • get_employee_schedule :获取员工日程安排,并可选择过滤
  • list_shifts :列出所有可用的班次
  • assign_schedule :为员工分配时间表

统计和报告

  • get_monthly_attendance_stats :获取每月出勤统计数据
  • get_holidays :通过可选过滤获取假期

可用资源

  • employee://{employee_id} :获取员工信息作为资源
  • department://{department_id} :获取部门信息作为资源
  • attendance://{employee_id}/{date} :获取特定员工和日期的出勤信息

可用提示

  • request_leave :创建休假请求提示
  • request_overtime :创建加班请求提示
  • check_attendance :创建出勤检查提示

执照

麻省理工学院

-
security - not tested
-
license - not tested
-
quality - not tested

模型上下文协议服务器,可查询考勤信息并管理员工休假申请、加班申请和日程安排。

  1. 特征
    1. 先决条件
      1. 安装
        1. 运行服务器
          1. 与 Claude Desktop 一起使用
            1. 故障排除
          2. 可用工具
            1. 员工信息
            2. 出勤记录
            3. 休假管理
            4. 加班管理
            5. 日程管理
            6. 统计和报告
          3. 可用资源
            1. 可用提示
              1. 执照

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that provides a standardized interface for interacting with Notion's API, enabling users to list databases, create pages, and search across their Notion workspace.
                  Last updated -
                  95
                  Python
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that helps track expenses and calculate reimbursements for social events, making it easy to settle balances between friends.
                  Last updated -
                  Python
                  Apache 2.0
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server providing utility tools for development and testing, offering functionalities like personalized greetings, random card drawing, and datetime formatting with an extensible architecture.
                  Last updated -
                  19
                  167
                  2
                  TypeScript
                  MIT License
                  • Apple
                  • Linux
                • -
                  security
                  -
                  license
                  -
                  quality
                  A Model Context Protocol (MCP) server that interacts with system APIs, allowing users to check connections, search employees, register breakfast, and update chemical information by shifts.
                  Last updated -
                  2

                View all related MCP servers

                ID: h01i17s6kb