HR System MCP Server
HR 系统 MCP 服务器
这是一个非官方的 MCP 服务器原型,提供具备 Okta 令牌验证功能的 HR 系统功能。仅供评估和测试使用。
📚 文档
完整文档可在 docs/ 文件夹中找到:
docs/RAILWAY_README.md - 部署到 Railway.com (3 个步骤) 🚀
docs/DOCKER_QUICK_START.md - 使用 Docker 本地运行 🐳
docs/README_INTEGRATION.md - 使用已部署的服务器 🔌
docs/CLAUDE.md - 开发者指南与架构 💻
docs/INDEX.md - 完整文档索引 📖
Related MCP server: Keka MCP Server
概览
HR 系统 MCP 服务器提供:
✅ 员工信息查询
✅ 员工目录列表
✅ 薪资信息访问
✅ 休假申请管理
✅ 所有工具调用的 Okta OAuth 2.0 令牌验证
✅ HTTP/NDJSON 流式传输支持 (FastMCP)
✅ 支持 Railway 部署 🚀
身份验证
此服务器对所有工具调用(initialize 除外)进行 Okta 访问令牌验证:
令牌来源:Okta 授权服务器
验证:JWT 签名、过期时间、受众声明
授权请求头:
Authorization: Bearer <access_token>
快速入门
# Setup
cp env.example .env
# Edit .env with your Okta credentials
# Install dependencies
pip install -r requirements.txt
# Run in HTTP mode (for Okta MCP Adapter)
python main.py --http 8001配置
.env (环境变量)
OKTA_DOMAIN=ijtestcustom.oktapreview.com
OKTA_AUTHORIZATION_SERVER_ID=auss2fth0mcIXHzVO1d7
OKTA_AUDIENCE=
OKTA_REQUIRED_SCOPES=
# When true (default), tools/list without auth returns 401. When false, allows unauthenticated tools/list (e.g. for gateway registration).
# PROTECTED_DISCOVERY=true可用工具
工具 | 描述 | 参数 |
| 通过 ID 获取员工 |
|
| 列出所有员工 | 无 |
| 获取薪资信息 |
|
| 获取休假申请 |
|
使用示例
通过 VS Code/Copilot 直接使用
# Endpoint
http://localhost:8001/mcp
# Authorization
Authorization: Bearer <okta_access_token>通过 Okta MCP 适配器网关使用
# Gateway will:
# 1. Receive request from client
# 2. Validate Okta token
# 3. Forward to HR System MCP
# 4. Attach authorization header实现细节
框架:FastMCP 3.0.0b1
服务器:Uvicorn (异步 HTTP)
协议:MCP (模型上下文协议),支持 NDJSON 流式传输
令牌验证:基于 JWKS 的 JWT 验证,包含签名校验
缓存:带有 TTL 的 JWKS 密钥缓存
请求流程
Client Request
↓
Authorization Header (Okta token)
↓
Initialize (no token needed)
↓
tools/list (validate token)
↓
tools/call (validate token)
↓
Response🚀 部署选项
Vercel (无服务器)
部署为无服务器函数 - 自动扩缩容,按使用量付费
✅ 适用场景:零星使用,自动缩容至零
✅ 免费层级:100GB 带宽/月
⚠️ 限制:10 秒超时(免费版),5 分钟(Pro 版)
Railway.com (传统服务器)
部署为长驻服务器 - 始终在线,无超时限制
✅ 适用场景:持续流量,持久连接
✅ 免费层级:500 小时/月(之后为 $5/月)
✅ 无超时:请求持续时间无限制
Docker (本地开发)
使用 Docker 本地运行 - 完全控制,便于测试
docker-compose up -d建议:
对于零星/不可预测的使用场景,请使用 Vercel(更便宜,自动扩缩容)
对于持续流量或需要长超时的场景,请使用 Railway
故障排除
请参阅 docs/RAILWAY_DEPLOYMENT.md 获取完整的故障排除指南。
快速修复:
令牌验证失败:检查
.env中的OKTA_DOMAIN和OKTA_AUTHORIZATION_SERVER_ID端口已被占用:在启动命令中更改端口:
python main.py --http 8002缺少环境变量:复制
.env示例并填入值JWKS 获取错误:验证 Okta 域名和授权服务器 ID 是否正确
项目结构
hr-mcp-server/
├── main.py # FastMCP server with HTTP handler
├── requirements.txt # Python dependencies
├── Dockerfile # Docker container definition
├── docker-compose.yml # Docker Compose configuration
├── railway.json # Railway deployment config
├── deploy-railway.sh # Deployment helper script
├── test_server.sh # Server test script
├── auth/ # Authentication module
│ ├── __init__.py
│ └── okta_validator.py # Okta token validation
└── docs/ # Documentation
├── INDEX.md # Documentation index
├── RAILWAY_README.md # Railway quick start
├── RAILWAY_DEPLOYMENT.md # Complete deployment guide
├── DOCKER_QUICK_START.md # Docker reference
├── README_INTEGRATION.md # Usage guide
├── CLAUDE_CODE_SETUP.md # Claude Code setup
├── CLAUDE.md # Developer documentation
└── ...more docs请参阅 docs/INDEX.md 获取完整的文档指南。
测试
# Using curl with Okta token
curl -X POST http://localhost:8001/mcp \
-H "Authorization: Bearer <your_okta_token>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'📖 文档
如需完整文档,请查看 docs/ 文件夹:
入门指南 - 文档索引
部署到 Railway - 云部署指南
使用 Docker 运行 - 本地开发
集成指南 - 如何使用服务器
开发者指南 - 架构与开发
参考资料
状态
⚠️ 非官方原型 - 仅供评估和测试使用。不适用于生产环境。
许可证:Apache 2.0
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables interaction with employee management systems through a standardized MCP interface. Supports comprehensive employee operations including CRUD operations, search, filtering by level/status, and data synchronization.
- AlicenseNot gradedqualityDmaintenanceIntegrates with Keka HR platform to manage employee profiles, attendance, leave applications, payslips, and holidays through OAuth2-authenticated API tools.1,2841MIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Insperity's REST API to access employee data, including employee lists, check details, and profile information for HR management tasks.
- FlicenseNot gradedqualityBmaintenanceEnables querying HR data like recent hires, employee details, departments, and PTO balances through natural language in an MCP client.
Related MCP Connectors
Search, document and execute authenticated API calls across 700+ apps via one MCP server
Apideck Unified API MCP — 330 tools across 200+ SaaS connectors (accounting, CRM, HRIS, ATS).
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/BalaGanaparthi/hr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server