Skip to main content
Glama

HR MCP Server

HR MCP 服务器

为配合 Claude Desktop 使用而构建的人力资源操作模型上下文协议 (MCP) 服务器。

https://github.com/user-attachments/assets/4cb89115-daf2-4647-81d2-aadd9e0dd29e

概述

该服务器实现了模型上下文协议,为 Claude 提供对员工数据和人力资源操作的结构化访问。

HR MCP 服务器使 Claude 能够:

  • 查找详细的员工信息
  • 按各种条件搜索员工
  • 提交和管理全球休假申请
  • 利用 HR/HCM 语境感知功能翻译文本

有关详细的架构概述,请参阅ARCHITECTURE.md

系统设计

工具

服务器为Claude提供了以下工具:

1. get_employee_info

通过 ID 检索特定员工的详细信息,包括个人信息、就业信息、技能、福利等。

// Example usage: get_employee_info({ employee_id: "E001" }) // With sensitive information: get_employee_info({ employee_id: "E001", include_sensitive: true })

2. search_employees

灵活匹配,按多种条件搜索员工。支持按姓名、部门、技能、地点等字段搜索。

// Basic search: search_employees({ query: { department: "Engineering" } }) // Advanced search: search_employees({ query: { location: "Seattle", performance_rating: 5 }, options: { sort_by: "hireDate", output_format: "detailed" } }) // Search with sensitive information: search_employees({ query: { salary_min: 100000 }, options: { include_sensitive: true } })

3. request_global_leave

为前往多个国家出差的员工提交全球休假申请,并提供审批链和合规提醒。

// Basic request: request_global_leave({ employee_id: "E002", start_date: "2025-05-01", end_date: "2025-05-15", reason: "Family vacation", countries: ["USA", "UK"] }) // With custom contact info: request_global_leave({ employee_id: "E002", start_date: "2025-05-01", end_date: "2025-05-15", reason: "Family vacation", countries: ["USA", "UK"], contact_info: { email: "bob.vacation@example.com", phone: "+1-555-123-4567" } })

4. 翻译提示: translate_text

将文本从任何语言翻译成指定的目标语言,并自动检测源语言,特别关注 HR/HCM 术语。

// Basic translation: translate_text({ text: "Les employés doivent soumettre leurs feuilles de temps avant la fin de la période.", target_language: "English" })

该翻译系统通过语境感知来处理人力资源特定术语,保留“福利”、“时期”、“检查”、“职位”等在人力资本管理语境中具有特殊含义的术语的技术含义。

安装

# Clone the repository git clone https://github.com/yourusername/hr-mcp-server.git cd hr-mcp-server # Install dependencies npm install # Build the project npm run build

用法

  1. 启动服务器:
npm start
  1. 通过选择“本地工具(通过 stdio)”作为工具类型并使用服务器启动脚本的路径将 Claude Desktop 连接到服务器。
  2. 通过 Claude 的界面访问员工数据和人力资源工具。

发展

  • 源代码位于/src目录中
  • 员工数据存储在/src/data/employees.ts
  • 服务器使用 TypeScript 并进行严格类型设置

要在开发模式下运行:

npx ts-node-esm src/index.ts

技术栈

代码结构

该服务器的组织重点是干净、可维护的代码:

  • 集中日志记录- 一致的 JSON-RPC 格式日志记录
  • 基于工具的架构——每个工具都有明确的职责
  • 模式验证- 使用 Zod 对所有输入进行强类型验证
  • 错误处理——通过清晰的错误消息进行全面验证
  • 文档- 解释复杂逻辑的内联注释

执照

麻省理工学院

版权所有 (c) 2024

特此授予获得此软件和相关文档文件(“软件”)副本的任何人免费许可,以无限制方式处理软件,包括但不限于使用、复制、修改、合并、发布、分发、再授权和/或销售软件副本的权利,并允许向其提供软件的人员这样做,但须遵守以下条件:

上述版权声明和本许可声明均应包含在软件的所有副本或实质性部分中。

本软件按“原样”提供,不附带任何形式的明示或暗示保证,包括但不限于适销性、适用于特定用途和非侵权性的保证。在任何情况下,作者或版权所有者均不对因本软件或使用或以其他方式处理本软件而引起的或与之相关的任何索赔、损害或其他责任承担责任,无论是合同、侵权或其他诉讼。

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

模型上下文协议服务器使 Claude Desktop 能够访问结构化员工数据并执行人力资源操作,包括员工查找、搜索和全局休假请求。

  1. 概述
    1. 工具
      1. 1. get_employee_info
      2. 2. search_employees
      3. 3. request_global_leave
      4. 4. 翻译提示: translate_text
    2. 安装
      1. 用法
        1. 发展
          1. 技术栈
            1. 代码结构
              1. 执照

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server for Claude Desktop that provides structured memory management across chat sessions, allowing Claude to maintain context and build a knowledge base within project directories.
                  Last updated -
                  2
                  TypeScript
                • -
                  security
                  A
                  license
                  -
                  quality
                  A custom Model Context Protocol server that gives Claude Desktop and other LLMs access to file system operations and command execution capabilities through standardized tool interfaces.
                  Last updated -
                  23
                  Python
                  Apache 2.0
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that allows Claude Desktop to manage and execute tasks in a queue-based system, supporting planning, execution, and completion phases.
                  Last updated -
                  10
                  1,147
                  5
                  TypeScript
                  MIT License
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  A Model Context Protocol server that allows integration with Claude Desktop by creating and managing custom tools that can be executed through the MCP framework.
                  Last updated -
                  340
                  TypeScript
                  • Apple

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/gabrielrojasnyc/hr-mcp-server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server