MCP cover image
See in Github
2025-03-31

MCP Server

1

Github Watches

1

Github Forks

0

Github Stars

HR MCP Server

A Model Context Protocol (MCP) server for HR operations built for use with Claude Desktop.

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

Overview

This server implements the Model Context Protocol to provide Claude with structured access to employee data and HR operations.

The HR MCP Server enables Claude to:

  • Look up detailed employee information
  • Search for employees by various criteria
  • Submit and manage global leave requests
  • Translate text with HR/HCM context awareness

For a detailed architectural overview, see ARCHITECTURE.md.

System Design

Tools

The server provides the following tools to Claude:

1. get_employee_info

Retrieves detailed information about a specific employee by ID, including personal details, employment information, skills, benefits, and more.

// Example usage:
get_employee_info({ employee_id: "E001" })

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

2. search_employees

Search for employees by various criteria with flexible matching options. Supports searching by name, department, skills, location, and many other fields.

// 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

Submit global leave requests for employees traveling to multiple countries, with approval chains and compliance reminders.

// 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. Translation Prompt: translate_text

Translates text from any language to a specified target language with automatic source language detection and special focus on HR/HCM terminology.

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

The translation system handles HR-specific terminology with contextual awareness, preserving the technical meaning of terms like "benefits," "period," "check," "position," etc., which have special meanings in Human Capital Management contexts.

Installation

# 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

Usage

  1. Start the server:
npm start
  1. Connect Claude Desktop to the server by selecting "Local Tool (via stdio)" as the tool type and using the path to the server's start script.

  2. Access employee data and HR tools through Claude's interface.

Development

  • Source code is in /src directory
  • Employee data is stored in /src/data/employees.ts
  • The server uses TypeScript with strict typing

To run in development mode:

npx ts-node-esm src/index.ts

Tech Stack

Code Structure

The server is organized with a focus on clean, maintainable code:

  • Centralized logging - Consistent JSON-RPC formatted logging
  • Tool-based architecture - Each tool has a clear responsibility
  • Schema validation - Strong typing with Zod for all inputs
  • Error handling - Comprehensive validation with clear error messages
  • Documentation - Inline comments explaining complex logic

License

MIT

Copyright (c) 2024

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • modelcontextprotocol
  • Model Context Protocol Servers

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • n8n-io
  • Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

  • open-webui
  • User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

    Reviews

    5 (1)
    Avatar
    user_ahdOTIDa
    2025-04-16

    As an avid user of hr-mcp-server, I've been thoroughly impressed with its seamless performance and intuitive design. Gabrielrojasnyc has created a highly functional server application that meets all my needs efficiently. The server is robust, reliable, and easy to set up. It's clear that a lot of thought and expertise went into developing this tool. Highly recommend checking it out!