Connect Homebase to ChatGPT: Manage Labor Costs and Staff Schedules
Learn how to build a secure MCP server for Homebase, connect it to ChatGPT, and automate shift scheduling and labor cost analysis using natural language.
If you need to connect Homebase to ChatGPT to automate workforce management, orchestrate shift scheduling, or analyze labor costs, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's tool calls and the Homebase REST API. You can either build and maintain this infrastructure in-house, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.
If your team uses Claude, check out our guide on connecting Homebase to Claude or explore our broader architectural overview on connecting Homebase to AI Agents.
Giving a Large Language Model (LLM) read and write access to an operational HR and shift-planning platform is a complex engineering challenge. You must handle strict location-based scoping, manage complex cursor pagination, and deal with deleted state reconciliation. Every time you want to expose a new endpoint to ChatGPT, you traditionally have to write custom JSON-RPC tool schemas, parse arguments, and handle the API execution.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Homebase, connect it natively to ChatGPT, and execute complex scheduling and labor workflows using natural language.
The Engineering Reality of the Homebase API
A custom MCP server is essentially a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against the Homebase API introduces domain-specific quirks that will immediately break generic CRUD assumptions.
If you decide to build a custom MCP server for Homebase, you own the entire API lifecycle. Here are the specific integration challenges you will face:
Strict Location Scoping
Unlike APIs that return a flat graph of users or tasks, Homebase is highly hierarchical. Almost every operational endpoint - shifts, timecards, employees - requires a location_uuid. If an LLM simply asks "show me all employees," it will fail unless the LLM is explicitly trained or prompted to fetch the available locations first, extract the location_uuid, and pass it into the subsequent call. Your MCP tool schemas must strictly enforce location_uuid as a required parameter, and your agent prompt must enforce the two-step retrieval workflow.
State Reconciliation via Deleted Endpoints
Homebase does not rely purely on webhooks or a simple boolean is_deleted flag on standard GET requests to manage removed shifts or timecards. Instead, keeping an accurate schedule requires querying specific state-reconciliation endpoints like /deleted_shifts and /deleted_timecards. If your LLM attempts to generate an accurate schedule by only calling the /shifts endpoint, it will hallucinate data that no longer exists. Your MCP server must expose these discrete deletion endpoints so the agent can accurately compute the delta.
Header-Based Pagination vs LLM Context
The Homebase API pages through results using standard HTTP Link headers. Exposing raw HTTP headers to an LLM is a reliable way to break agentic loops. A custom MCP server must abstract these headers, parse the limit and offset parameters, and inject explicit next_cursor or limit properties directly into the JSON Schema of the tool response. This ensures the LLM receives explicit instructions to pass the exact cursor back unchanged in the next tool call.
Homebase to ChatGPT Quickstart Guide
If you just want the fastest path from a fresh Truto account to ChatGPT calling the Homebase API, follow these steps. Truto handles the OAuth flows, token refreshes, and dynamic tool generation out of the box.
What you need:
- A Truto account with API access.
- A Homebase admin account to approve the OAuth consent.
- A ChatGPT Pro, Plus, Business, Enterprise, or Education seat with Developer mode available.
Step 1: Connect Homebase as an Integrated Account
In the Truto dashboard, navigate to Integrated Accounts -> New Integrated Account, select Homebase, and run the connection flow. Truto securely stores the refresh token and automatically refreshes access tokens before they expire. ChatGPT never sees an expired credential.
Step 2: Grab your Integrated Account ID
You can copy the integrated_account_id from the account detail page in the UI, or list your connections via the API:
curl https://api.truto.one/integrated-account \
-H "Authorization: Bearer $TRUTO_API_TOKEN"Step 3: Generate a Homebase MCP Server
You must scope an MCP endpoint to this specific connected account. You can do this via the UI or the API.
Option A: Via the Truto UI
- Navigate to the integrated account page for the Homebase connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (name, allowed methods, tags).
- Copy the generated MCP server URL.
Option B: Via the Truto API
Make a POST call to dynamically generate the server, optionally filtering by methods or tags to strictly constrain what ChatGPT is allowed to execute:
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": "Homebase MCP for ChatGPT",
"config": {
"methods": ["read", "write"],
"tags": ["employees", "shifts", "labor"]
}
}'The response returns a single url field structured as https://api.truto.one/mcp/<token>. This URL handles both routing and authentication. Treat it like a production secret.
Step 4: Connect the Server to ChatGPT
You can connect this server to ChatGPT via the UI or via a local configuration if using a proxy.
Option A: Via the ChatGPT UI
- In ChatGPT, navigate to Settings -> Apps -> Advanced settings.
- Enable Developer mode.
- Under MCP servers / Custom connectors, add a new server.
- Name it "Homebase (Truto)" and paste your Truto MCP URL.
- Save. ChatGPT will immediately connect, negotiate the JSON-RPC handshake, and list the available Homebase tools.
Option B: Via Manual Config File (for local agents or proxies) If you are wrapping ChatGPT in a custom agent framework (like LangChain) or running a local proxy, you can add the server using the SSE transport:
{
"mcpServers": {
"homebase": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/<your_token>"
]
}
}
}Security and Access Control
Giving an AI agent access to employee schedules and payroll data requires rigid access control. Truto enforces boundaries at the server level, meaning the LLM cannot bypass them regardless of the prompt.
- Method Filtering: Pass
"methods": ["read"]during server creation to ensure ChatGPT can only executeGETorLISToperations. The server will silently dropPOST,PATCH, orDELETEtools during the generation phase. - Tag Filtering: Pass
"tags": ["shifts"]to restrict the server exclusively to schedule management, completely isolating it fromlaborortimecardsdata. - Extra Authentication (
require_api_token_auth): Set this flag totrueto force the MCP client to pass a valid Truto API token in theAuthorizationheader. Possession of the MCP URL alone will no longer grant access. - Auto-Expiration (
expires_at): Pass an ISO datetime string to create an ephemeral MCP server. Truto uses Cloudflare KV and Durable Objects to guarantee the server is destroyed at the exact timestamp, making it perfect for temporary audit workflows.
Handling Rate Limits
When writing automated agent loops, you must anticipate rate limits. Truto does not retry, throttle, or apply backoff on rate limit errors.
When the upstream Homebase API returns an HTTP 429, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers per the IETF specification (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller (your agent framework) is completely responsible for implementing retry logic and exponential backoff.
Hero Tools for Homebase
When you connect Homebase to Truto, you gain access to dozens of dynamically generated tools. Here are the highest-leverage operations for AI agents.
list_all_homebase_locations
Because Homebase requires a location_uuid for almost all operations, this tool is the mandatory first step for any agentic workflow. It returns the locations tied to the current account.
"Fetch all available locations in the Homebase account and give me their UUIDs."
list_all_homebase_employees
Retrieves the employee roster for a specific location. Agents use this to map natural language names to strict job_id and employee identifiers required for timecard operations.
"Get the list of employees for the location UUID 1234-abcd. Note their job IDs."
list_all_homebase_shifts
Retrieves all scheduled shifts for a given location within a strict start_date and end_date window. It utilizes the standardized limit parameter for safe pagination handling.
"Pull the shift schedule for the Downtown location for the week of October 10th to October 17th."
list_all_homebase_deleted_shifts
Critical for keeping external systems or AI summaries accurate. Instead of inferring deletions, the agent explicitly checks this tool for shift IDs that were removed since the last sync.
"Check for any deleted shifts at the Downtown location between October 10th and October 17th so we can update the active roster."
list_all_homebase_labor_by_employee
Retrieves aggregated labor data for a location, grouped by employee. This is vastly superior to iterating through individual timecards, as individual timecards often report zero for PTO/sick leave, whereas this aggregate tool returns accurate totals.
"Calculate the total aggregated labor, including paid time off, for all employees at the Downtown location last month."
To see the full schema definitions, required fields, and the complete inventory of available tools, view the Homebase integration page.
Workflows in Action
Once ChatGPT has access to the Homebase MCP server, you can orchestrate multi-step data pipelines through standard chat interactions.
Scenario 1: Labor Cost Analysis
Persona: Regional Store Manager
"Calculate the total labor cost for the 'Uptown Branch' for the past two weeks, grouped by employee."
- ChatGPT calls
list_all_homebase_locationsto map the string "Uptown Branch" to its exactlocation_uuid. - ChatGPT calculates the ISO-8601 date strings for the past 14 days.
- ChatGPT calls
list_all_homebase_labor_by_employeepassing thelocation_uuid,start_date, andend_date. - ChatGPT processes the returned JSON, aggregates the totals, and formats a markdown table showing the exact labor costs per employee.
sequenceDiagram
participant User
participant ChatGPT
participant Truto as Truto MCP
participant Upstream as Homebase API
User->>ChatGPT: "Calculate labor cost for Uptown Branch..."
ChatGPT->>Truto: call tool (list_all_homebase_locations)
Truto->>Upstream: GET /locations
Upstream-->>Truto: { locations: [{ id: "uuid-123", name: "Uptown Branch" }] }
Truto-->>ChatGPT: Tool response
ChatGPT->>Truto: call tool (list_all_homebase_labor_by_employee, uuid-123)
Truto->>Upstream: GET /labor/employee
Upstream-->>Truto: { labor_data: [...] }
Truto-->>ChatGPT: Tool response
ChatGPT-->>User: Markdown table of labor costsScenario 2: Shift Schedule Reconciliation
Persona: Payroll Administrator
"Compare the scheduled shifts against any deleted shifts for the past week at the Main Warehouse, and tell me who had shifts cancelled."
- ChatGPT calls
list_all_homebase_locationsto resolve "Main Warehouse" to alocation_uuid. - ChatGPT calls
list_all_homebase_shiftsto get the baseline schedule for the target week. - ChatGPT calls
list_all_homebase_deleted_shiftsusing the same location and date parameters. - ChatGPT cross-references the shift IDs from the deleted endpoint against the active schedule, calls
list_all_homebase_employeesto map user IDs to names, and outputs a list of staff whose shifts were cancelled.
The Strategic Advantage of Managed Infrastructure
Writing custom code to handle Homebase's location requirements, deletion endpoints, and header pagination is a significant technical burden. Maintaining that code as the Homebase API evolves is even worse.
By leveraging Truto's dynamic tool generation, you shift the burden of API mapping, OAuth lifecycle management, and JSON-RPC protocol handling entirely to the infrastructure layer. You simply define the permissions, generate the MCP server URL, and let ChatGPT handle the workforce orchestration.
Ready to stop building boilerplate connectors? Let Truto handle the integration layer while you focus on building exceptional AI capabilities.
FAQ
- How do I securely authenticate ChatGPT with the Homebase API?
- Use a managed MCP server via Truto. Truto securely handles the OAuth 2.0 connection, refresh tokens, and exposes a single JSON-RPC URL that ChatGPT can use to access Homebase tools securely.
- Can I prevent ChatGPT from modifying schedules in Homebase?
- Yes. When creating the MCP server in Truto, you can pass a configuration object like `"methods": ["read"]`. This filters the available tools to only include GET and LIST operations, preventing ChatGPT from making any destructive changes.
- How does Truto handle Homebase API rate limits?
- Truto does not retry, throttle, or apply backoff logic. If the Homebase API returns an HTTP 429, Truto passes the error back to the caller and normalizes the rate limit headers per the IETF specification. Your AI agent framework must handle the retry and backoff logic.