jayvadolkar/my-mcp-server
If you are the rightful owner of my-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The KekaHR MCP Server is a Model Context Protocol server designed to integrate Keka HRIS API with AI systems, enabling seamless HR operations through a standardized interface.
KekaHR MCP Server š
A Model Context Protocol (MCP) server for Keka HRIS API integration. This project enables powerful AI-assisted HR operations by exposing Keka's comprehensive HR APIs through a clean, standardized MCP interface.
Table of Contents
- Overview
- Why This Project Exists
- Features
- Project Structure
- Getting Started
- Available Tools
- Changelog
- Future Scope
- Contributing
- About KekaHR
- About MCP
- License
Overview
This project implements a Model Context Protocol (MCP) server for the Keka HRIS API, enabling seamless integration between Large Language Models (LLMs) and Keka's HR management system. By leveraging Cloudflare Workers and the MCP framework, this server provides a standardized interface for accessing various HR functionalities like employee management, leave tracking, attendance management, document handling, and payroll processing.
The server acts as a bridge between AI assistants and the Keka HR platform, allowing AI models to perform complex HR operations through natural language instructions.
Why This Project Exists
As organizations increasingly adopt AI assistants in their workflows, there's a growing need to connect these assistants to enterprise systems. HR management is one area where AI can significantly reduce administrative burden and improve employee experience.
Traditional integrations require custom code for each AI assistant and HR system combination. The Model Context Protocol (MCP) solves this by defining a standard way for AI models to interact with external systems.
This project specifically targets Keka HRIS, a comprehensive human resources management system, making its features accessible to AI assistants through the MCP standard. With this integration, AI assistants can:
- Look up employee information
- Process leave requests
- Manage documents
- Track attendance
- Handle payroll inquiries
- And much more!
All this without requiring custom integrations for each AI assistant vendor.
Features
- Authentication Handling: Secure token-based authentication with Keka API
- MCP Server Implementation: Fully compliant MCP server implementation using Cloudflare Workers
- Comprehensive API Coverage: Access to all major Keka HRIS modules:
- Core HR (employee management)
- Document management
- Leave management
- Attendance tracking
- Payroll processing
- Professional Services Automation (PSA)
- Schema Registry: Built-in schema registry for providing information about data structures
- Error Handling: Robust error reporting and propagation
- Scalable Architecture: Built on Cloudflare's edge computing platform for global scalability
Project Structure
my-mcp-server/
āāā .gitignore
āāā package.json
āāā tsconfig.json
āāā wrangler.jsonc
āāā src/
āāā index.ts # Main entry point
āāā auth.ts # Authentication handling
āāā tools/
āāā common/ # Common utilities and schema registry
ā āāā schemaRegistry.ts
ā āāā schemaRegistry_index.ts
āāā corehr/ # Core HR API tools
ā āāā corehrResponseSchemas.ts
ā āāā corehr_index.ts
ā āāā ...
āāā document/ # Document management tools
ā āāā documentResponseSchemas.ts
ā āāā document_index.ts
ā āāā ...
āāā leave/ # Leave management tools
ā āāā leaveresponseschemas.ts
ā āāā leave_index.ts
ā āāā ...
āāā attendance/ # Attendance tracking tools
ā āāā attendanceResponseSchemas.ts
ā āāā attendance_index.ts
ā āāā ...
āāā payroll/ # Payroll processing tools
ā āāā payrollResponseSchemas.ts
ā āāā payroll_index.ts
ā āāā ...
āāā psa/ # PSA tools
āāā psaResponseSchema.ts
āāā psa_index.ts
āāā ...
Getting Started
Prerequisites
- Node.js (v16 or newer)
- npm or yarn
- Wrangler CLI (Cloudflare Workers CLI)
- A Cloudflare account
- Keka HRIS API credentials
Installation
-
Clone the repository:
git clone https://github.com/yourusername/kekahr-mcp.git cd kekahr-mcp
-
Install dependencies:
npm install
-
Create a local development
.dev.vars
file:COMPANY=your-subdomain-here ENVIRONMENT=your-domain-here KEKA_API_KEY=your-apikey-here KEKA_CLIENT_ID=your-client-id KEKA_CLIENT_SECRET=your-secret KEKA_GRANT_TYPE=kekaapi KEKA_SCOPE=kekaapi
Configuration
The main configuration is managed through Wrangler. You need to edit the wrangler.jsonc
file to set up your environment variables:
"vars": {
"COMPANY": "your-subdomain-here",
"ENVIRONMENT": "your-domain-here",
"KEKA_API_KEY": "your-apikey-here",
"KEKA_CLIENT_ID": "your-client-id",
"KEKA_CLIENT_SECRET": "your-secret",
"KEKA_GRANT_TYPE": "kekaapi",
"KEKA_SCOPE": "kekaapi"
}
Replace these placeholder values with your actual Keka API credentials.
Important: For production deployments, use Cloudflare's secret management rather than storing sensitive values in
wrangler.jsonc
.
Deployment
-
Login to Cloudflare (if not already logged in):
wrangler login
-
Deploy to Cloudflare Workers:
npm run deploy # or wrangler deploy
-
Once deployed, you'll receive a URL for your MCP server, which can be used to connect AI assistants to your Keka HRIS system.
Available Tools
The MCP server provides tools across multiple Keka modules. Here's an overview of the available tools:
Core HR Tools
getAllEmployees
: Fetch employee data with filtering optionscreateAnEmployee
: Create a new employee recordgetAnEmployee
: Get details for a specific employee by IDupdateEmployeePersonalDetails
: Update personal details of an employeeupdateEmployeeJobDetails
: Update job-related details of an employeegetUpdateFields
: Get available fields for employee updatesgetGroups
: Get organizational groups (departments, teams, etc.)getAllGroupTypes
: Get all group types in the organizationgetAllDepartments
: Get all departmentsgetAllLocations
: Get all office locationsgetAllJobTitles
: Get all job titlesgetAllNoticePeriods
: Get all notice periodsgetAllCurrencies
: Get all currenciesgetAllContingentTypes
: Get all contingent worker typesdeactivateAnEmployee
: Update the exit request for an employeedeactivateEmployee
: Request an exit for an employeegetAllExitReasons
: Get all exit reasons
Document Tools
getAllDocumentTypes
: Get all document typesgetEmployeeAttachmentDownloadURL
: Get download URL for employee documentsgetEmployeeDocuments
: Get all documents for an employeeuploadEmployeeDocuments
: Upload documents for an employee
Leave Management Tools
getLeaveTypes
: Get all leave typesgetLeaveBalance
: Get leave balance for employeesgetLeaveRequests
: Get leave requests with filteringcreateLeaveRequest
: Create a new leave requestgetLeavePlans
: Get all leave plans
Attendance Tools
getAllAttendanceRecords
: Fetch attendance recordsgetCaptureScheme
: Get attendance capture schemesgetShiftPolicies
: Get shift policiesgetPenalisationPolicies
: Get attendance tracking policiesgetWeeklyOffPolicies
: Get weekly-off policiesgetHolidaysCalendar
: Get holiday calendarsgetHolidays
: Get holidays list for a calendarcreateOd
: Create an On-Duty requestcreateWfh
: Create a Work-From-Home requestcreateTimeEntry
: Create a manual attendance entry
Payroll Tools
getAllEmployeesSalaries
: Fetch employee salary detailsgetSalaryComponents
: Get all salary componentsgetPayGroups
: Get all pay groupsgetPayCycles
: Get pay cycles for a paygroupgetPayRegister
: Get pay register for a cyclegetPayBatches
: Get pay batchesgetPaymentsBatches
: Get payments for a batchupdatePaymentsStatus
: Update payment statusesgetPayBands
: Get pay bandsgetPayGrades
: Get pay gradesgetFnf
: Get full and final settlement detailsgetBonusTypes
: Get bonus typesgetFinancialDetails
: Get financial details for employeesgetSalaryStructures
: Get salary structuresaddEmployeeSalary
: Add a salary record for an employeeupdateEmployeeSalary
: Update an employee's salarygetForm16
: Get Form 16 for an employee
PSA (Professional Services Automation) Tools
getClients
: Fetch PSA clientscreateClient
: Create a new PSA clientgetClient
: Get a specific PSA clientupdateClient
: Update a PSA clientgetBillingRoles
: Get billing roles for a clientcreateCreditNote
: Create a credit notegetInvoices
: Get invoices for a clientpost_receivePayment
: Record a payment receiptgetTaxes
: Get taxes for a legal entitygetTaxGroups
: Get tax groupsgetProjectPhases
: Get phases for a projectcreateProjectPhase
: Create a new project phasegetProjects
: Get all projectscreateProject
: Create a new projectgetProjectById
: Get a specific projectupdateProject
: Update a projectgetProjectAllocations
: Get resource allocations for a projectcreateProjectAllocations
: Create a resource allocationgetProjectTimesheetEntries
: Get timesheet entriesgetProjectResources
: Get project resourcesgetProjectTasks
: Get tasks for a projectcreateProjectTask
: Create a new project taskupdateProjectTask
: Update a project taskgetProjectTaskTimeEntries
: Get time entries for a taskaddEmployeeTimeEntries
: Add timesheet entries for an employee
Changelog
v1.0.0 (Initial Release)
- Implemented MCP server architecture
- Added authentication with Keka API
- Integrated Core HR module tools
- Integrated Document module tools
- Integrated Leave Management module tools
- Integrated Attendance module tools
- Integrated Payroll module tools
- Integrated PSA module tools
- Added schema registry
Future Scope
- Real-time Updates: Implement webhooks for real-time synchronization
- Advanced Analytics: Add tools for HR analytics and reporting
- Performance Management: Add tools for performance reviews and goal tracking
- Enhanced Security: Implement more granular access controls
- Recruitment Module: Extend to cover Keka's recruitment features
- Multi-tenant Support: Support for multiple Keka instances
- Customizable Schemas: Allow customization of data schemas
- AI-driven Insights: Integrate with Cloudflare AI for HR insights
- Integration with Other Enterprise Systems: Expand beyond HR to other enterprise systems
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
About KekaHR
Keka is a comprehensive HR and payroll software designed for modern businesses. It offers a wide range of features including:
- Employee management
- Leave and attendance tracking
- Payroll processing
- Performance management
- Recruitment
- Document management
- Employee self-service
This MCP server connects to Keka's robust API to make these features accessible to AI assistants.
About MCP
The Model Context Protocol (MCP) is an open standard that enables AI agents (like large language models) to interact with external systems through a standardized interface. It defines a common way for AI models to discover, understand, and use the capabilities of external systems.
This project implements an MCP server for Keka HRIS, allowing any MCP-compatible AI assistant to work with Keka's HR functions.
Project Creation
This project was created using Claude-3.7-Sonnet's filesystem support, allowing for rapid development by analyzing and understanding complex directory structures and code patterns. The development approach followed "vibe coding" principles - understanding the essence of the desired functionality and replicating the style, patterns, and best practices across multiple modules.
The MCP server architecture was developed to be extensible, with each module (Core HR, Leave, Attendance, etc.) following consistent patterns for maximum code reuse and maintainability.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ā¤ļø by Jay Vadolkar using Claude-3.7-Sonnet filesystem support and "vibe coding" principles.