Connect HR WORKS to ChatGPT: Automate HR Admin & Time Tracking
Learn how to connect HR WORKS to ChatGPT using an MCP server. Automate employee time tracking, absences, and HR administration with natural language.
If you need to connect HR WORKS to ChatGPT to automate time tracking, orchestrate employee onboarding, or manage complex absence requests, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's JSON-RPC tool calls and the highly specific architecture of the HR WORKS REST API. You can either spend weeks building, hosting, and maintaining this polling and routing logic yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL in seconds.
If your team uses Claude, check out our guide on connecting HR WORKS to Claude or explore our broader architectural overview on connecting HR WORKS to AI Agents.
Giving a Large Language Model (LLM) read and write access to an enterprise Human Resources Information System (HRIS) is a serious engineering challenge. HR WORKS has strict authentication patterns, highly nested response structures, and heavy reliance on asynchronous job polling.
This guide breaks down exactly how to use Truto to generate a secure MCP server for HR WORKS, connect it natively to ChatGPT, and execute complex HR workflows using natural language.
Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::
The Engineering Reality of the HR WORKS API
A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against the HR WORKS API is exceptionally complex. If you decide to build a custom MCP server for HR WORKS, you own the entire API lifecycle.
Here are the specific integration challenges that break standard CRUD assumptions when working with HR WORKS:
Asynchronous Write Jobs and Polling
Unlike most SaaS APIs where a POST request immediately returns the created object, nearly all write operations in HR WORKS (creating absences, updating permanent establishments, logging expenses) are asynchronous.
When you call POST /v2/absences, HR WORKS does not return the absence record. It returns a 202 Accepted response containing a jobId. To know if the absence was actually created, your system must repeatedly poll the /v2/absences/jobs/{jobId} endpoint until it returns a finished status. If you are building an MCP server, you must either build an artificial blocking mechanism into your server to wait for the job, or expose the polling mechanism as a separate tool to the LLM. Truto solves this by exposing specific get_single_hr_works_*_job_by_id tools, allowing ChatGPT to handle the polling loop natively.
Dynamic Person Identifiers
HR WORKS does not rely on a single user ID format. Depending on the endpoint, you might need a uuid, a personId, a personnelNumber, a personLicenseNumber, or a personIdentifierForKiosk. Many endpoints require you to explicitly pass a personIdentifierType parameter alongside the ID. If an LLM attempts to guess the ID type, the request will fail. Your MCP server must supply rigid JSON Schemas that explicitly define these identifier types so the LLM constructs the payload correctly.
Non-Standard Pagination Formats
Most APIs return lists of data as a flat JSON array (e.g., "data": [ { ... }, { ... } ]). HR WORKS often returns paginated data as a single object keyed by the person identifier.
For example, listing accumulated absences returns an object where the keys are UUIDs and the values are arrays of absence data. The LLM must be explicitly instructed on how to parse this dynamic key structure. Truto dynamically enhances the OpenAPI schemas derived from HR WORKS documentation to guide the LLM through parsing these responses.
Strict Rate Limits and HTTP 429s
HR WORKS enforces rate limits on API calls. It is critical to note that Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream HR WORKS API returns an HTTP 429 (Too Many Requests), Truto passes that error directly back to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. Your LLM agent framework (or ChatGPT itself) is strictly responsible for interpreting these headers and executing the retry backoff.
Step 1: Connect HR WORKS to Truto
Before ChatGPT can talk to HR WORKS, you must establish an authenticated connection. Truto manages the underlying credential exchange and securely stores the API keys.
- Log into your Truto dashboard.
- Navigate to Integrated Accounts and click New Integrated Account.
- Select HR WORKS from the integration list.
- Provide your HR WORKS API credentials (Access Key and Secret).
- Truto validates the credentials by calling the HR WORKS health check endpoint (
GET /v2/health-check). - Once connected, note your
integrated_account_id. This ID represents this specific HR WORKS tenant.
Step 2: Generate the HR WORKS MCP Server
Truto dynamically generates MCP tools from the underlying HR WORKS integration definitions. You can create an MCP server scoped to your HR WORKS account via the Truto UI or via API.
Method A: Via the Truto UI
- Navigate to the Integrated Account page for your HR WORKS connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Give your server a name (e.g., "HR WORKS Admin Agent").
- Select your configuration. You can filter tools by methods (e.g.,
read,write) or tags (e.g.,absences,persons). - Click Create and copy the generated MCP server URL (it will look like
https://api.truto.one/mcp/<secure-token>).
Method B: Via the API
You can dynamically provision an MCP server for HR WORKS using a single POST request. This is ideal if you are provisioning AI agents programmatically.
curl -X POST https://api.truto.one/integrated-account/<integrated_account_id>/mcp \
-H "Authorization: Bearer $TRUTO_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "ChatGPT HR WORKS Access",
"config": {
"methods": ["read", "write", "custom"],
"tags": ["absences", "persons", "working_times"]
}
}'The API validates the configuration, ensures tools exist for the requested tags, and returns a secure payload:
{
"id": "mcp_srv_8x9y0z",
"name": "ChatGPT HR WORKS Access",
"config": { "methods": ["read", "write", "custom"] },
"expires_at": null,
"url": "https://api.truto.one/mcp/a1b2c3d4e5f6g7h8..."
}Treat the url as a secret. It contains a cryptographic token that securely routes requests to your specific HR WORKS tenant.
Step 3: Connect the MCP Server to ChatGPT
Now that you have a secure MCP endpoint, you can connect it to ChatGPT. There are two primary ways to do this depending on how your team uses OpenAI.
Method A: Via the ChatGPT UI (Custom Connectors)
If you have a ChatGPT Pro, Plus, Business, Enterprise, or Education account, you can add the server directly into the interface.
- In ChatGPT, click your profile picture and navigate to Settings -> Apps -> Advanced settings.
- Toggle Developer mode on (this enables MCP support).
- Under MCP servers / Custom connectors, click Add new server.
- Name: Enter a recognizable name like "HR WORKS Agent".
- Server URL: Paste the Truto MCP URL (
https://api.truto.one/mcp/<token>). - Click Save. ChatGPT will immediately ping the endpoint, execute an
initializehandshake, and load the HR WORKS tools.
Method B: Via Manual Config File (SSE Transport)
If you are running a custom ChatGPT interface, LangChain architecture, or an enterprise agent framework, you can connect using the standard MCP SSE transport.
Create an mcp-config.json file:
{
"mcpServers": {
"hr_works": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/<token>"
]
}
}
}When your agent initializes, it will send a tools/list JSON-RPC request to the Truto edge server, which dynamically generates the HR WORKS tools based on your configuration.
Hero Tools for HR WORKS
Truto automatically exposes HR WORKS endpoints as LLM-ready tools. We combine query and body schemas into a single flat namespace, making it easy for ChatGPT to pass arguments.
Here are 6 high-leverage hero tools for automating HR WORKS tasks. (Note: This is a curated selection. For the complete tool inventory, visit the HR WORKS integration page).
1. list_all_hr_works_persons
Fetches employee base data (names and identifiers like personId, personnelNumber, and uuid) grouped by organization unit. This is critical for resolving human names to system IDs before executing other actions.
"Find the HR WORKS personnel number for John Doe in the Engineering organization unit."
2. list_all_hr_works_absences
Lists absences per person in a date range. It returns data on absence types, dates, half-days, and status. It requires a beginDate and endDate no more than one year apart.
"Get all approved absences for personnel number 10452 between June 1st and August 31st."
3. create_a_hr_works_absence
Initiates a bulk absence creation request. Because HR WORKS processes this asynchronously, this tool does not return the absence record. It returns a jobId that must be polled.
"Submit a sick leave request for personnel number 10452 starting tomorrow and ending on Friday."
4. get_single_hr_works_absence_job_by_id
Checks the status of an asynchronous absence write. ChatGPT uses this tool iteratively to poll HR WORKS until the job status changes from pending to finished.
"Check the status of absence write job ID 88392. If it's still pending, wait a moment and check again."
5. create_a_hr_works_person_working_time
Clocks a person in or out instantly. This tool operates synchronously and requires an action (either clockIn or clockOut) and a person_identifier.
"Clock out personnel number 10452 for the day. Note that they are leaving 30 minutes early."
6. create_a_hr_works_expense_report
Initiates an asynchronous request to create travel expense reports. This handles receipts, advances, and date ranges.
"Draft a new travel expense report for personnel number 10452 for their trip to Berlin from May 12th to May 15th."
For a full breakdown of all available endpoints and schemas, check the HR WORKS integration page.
Workflows in Action
Here is how ChatGPT uses these tools in sequence to accomplish complex HR administration tasks.
Scenario 1: Clocking In a Remote Employee
When a remote employee asks ChatGPT to clock them in, the LLM must first identify the user, execute the clock-in action, and verify the status.
"I just started my shift. Can you clock me in and tell me how many hours I'm scheduled for today? My name is Sarah Jenkins."
sequenceDiagram
participant User as User
participant ChatGPT as ChatGPT
participant Truto as Truto MCP
participant HRWorks as HR WORKS API
User->>ChatGPT: "Clock me in, I'm Sarah Jenkins"
ChatGPT->>Truto: call list_all_hr_works_persons
Truto->>HRWorks: GET /v2/persons
HRWorks-->>Truto: Return personnelNumber: 4921
Truto-->>ChatGPT: Return personnelNumber: 4921
ChatGPT->>Truto: call create_a_hr_works_person_working_time (action: clockIn)
Truto->>HRWorks: POST /v2/persons/working-times/clock-in
HRWorks-->>Truto: 200 OK (workingTime started)
Truto-->>ChatGPT: Return success
ChatGPT->>Truto: call list_all_hr_works_persons_today (personnelNumber: 4921)
Truto->>HRWorks: GET /v2/persons/today
HRWorks-->>Truto: Return target working time: 8 hours
Truto-->>ChatGPT: Return 8 hours
ChatGPT-->>User: "You are clocked in! You are scheduled for 8 hours today."What happens: ChatGPT looks up Sarah's personnelNumber, uses the working time tool to clock her in synchronously, and then queries her daily schedule to report her target hours back to her.
Scenario 2: Handling Asynchronous Absence Requests
HR WORKS handles absence requests asynchronously. ChatGPT must orchestrate the write request and subsequently poll the job status.
"I need to take next Monday and Tuesday off for a vacation. Please submit the request."
sequenceDiagram
participant User as User
participant ChatGPT as ChatGPT
participant Truto as Truto MCP
participant HRWorks as HR WORKS API
User->>ChatGPT: "Submit vacation for next Mon/Tue"
ChatGPT->>Truto: call create_a_hr_works_absence
Truto->>HRWorks: POST /v2/absences
HRWorks-->>Truto: 202 Accepted (jobId: 7748)
Truto-->>ChatGPT: Return jobId: 7748
Note over ChatGPT: LLM begins polling loop
ChatGPT->>Truto: call get_single_hr_works_absence_job_by_id (id: 7748)
Truto->>HRWorks: GET /v2/absences/jobs/7748
HRWorks-->>Truto: 200 OK (status: pending)
Truto-->>ChatGPT: Return status: pending
Note over ChatGPT: LLM waits, then retries
ChatGPT->>Truto: call get_single_hr_works_absence_job_by_id (id: 7748)
Truto->>HRWorks: GET /v2/absences/jobs/7748
HRWorks-->>Truto: 200 OK (status: finished)
Truto-->>ChatGPT: Return status: finished
ChatGPT-->>User: "Your vacation request has been successfully submitted to HR WORKS."What happens: ChatGPT understands that the initial creation merely returned a jobId. It autonomously calls the job polling tool, receives a pending status, waits, and polls again until HR WORKS confirms the absence is finished.
Security and Access Control
When connecting an AI agent to an HR system, security is paramount. Truto's globally distributed storage handles token validation securely, ensuring the actual raw MCP tokens are hashed before storage.
You can strictly control what ChatGPT can do in HR WORKS using four configuration layers:
- Method Filtering: By setting
methods: ["read"]during server creation, you completely disablecreate,update, anddeletetools. The LLM simply won't know those tools exist. - Tag Filtering: By passing
tags: ["absences", "working_times"], you restrict the server strictly to time-tracking functions, preventing the AI from accessing payroll or performance data. - Time-to-Live (TTL): By setting an
expires_atISO datetime when generating the server, Truto automatically schedules a cleanup alarm. Once the TTL hits, the server and all edge storage entries are wiped, instantly severing ChatGPT's access. - API Token Authentication: By enabling
require_api_token_auth: true, the MCP server URL alone is no longer enough. ChatGPT must also pass a valid Truto API token in theAuthorizationheader, adding a second factor of authentication for sensitive HR operations.
Connect ChatGPT to HR WORKS Today
Connecting ChatGPT to HR WORKS using a custom-built MCP server means dealing with undocumented rate limits, complex polling loops, and brittle pagination parsing. Every time the HR WORKS API evolves, your server code has to change.
Truto eliminates this overhead. By dynamically generating tools from documentation records, managing the secure token lifecycle, and formatting JSON Schemas specifically for LLM consumption, Truto lets you focus on building agent workflows instead of maintaining API infrastructure.
Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::
FAQ
- How does Truto handle HR WORKS API rate limits?
- Truto does not absorb, throttle, or automatically retry rate-limited requests. If the HR WORKS API returns an HTTP 429, Truto passes that error directly to ChatGPT along with standardized IETF rate limit headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller is responsible for implementing backoff and retries.
- How does Truto handle HR WORKS asynchronous write jobs?
- Many write operations in HR WORKS (like creating absences) are asynchronous and return a jobId. Truto exposes specific polling tools, such as `get_single_hr_works_absence_job_by_id`, so ChatGPT can check the status of the job until it completes.
- Can I restrict what data ChatGPT can access in HR WORKS?
- Yes. When generating the MCP server URL in Truto, you can pass configuration filters to restrict access. You can filter by HTTP method (e.g., read-only) or by specific resource tags (e.g., only exposing 'absences' or 'persons' tools).
- Does Truto store HR WORKS employee data?
- No. Truto's MCP servers act as a stateless proxy. Tool calls map directly to HR WORKS API endpoints in real-time. Employee data passes through the integration layer without being cached or stored in Truto's databases.