Skip to content

Connect 7shifts to ChatGPT: Manage Staff, Payroll & Attendance

Learn how to connect 7shifts to ChatGPT using an auto-generated MCP server to automate staff scheduling, payroll, and restaurant operations.

Riya Sethi Riya Sethi · · 9 min read
Connect 7shifts to ChatGPT: Manage Staff, Payroll & Attendance

If you need to connect 7shifts to ChatGPT so your AI agents can manage restaurant staff, audit time punches, approve time off, and 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 7shifts REST API. You can either spend weeks building and maintaining this infrastructure yourself, 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 7shifts to Claude or explore our broader architectural overview on connecting 7shifts to AI Agents.

Giving a Large Language Model (LLM) read and write access to a highly specialized workforce management platform like 7shifts is a massive engineering challenge. You have to handle complex nested IDs, destructive payload updates, and strict API rate limits. Every time 7shifts adds a new labor compliance endpoint, your custom server code must be updated, redeployed, and tested.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for 7shifts, connect it natively to ChatGPT, and execute complex restaurant operations 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 7shifts 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 7shifts API is exceptionally painful.

If you decide to build a custom MCP server for 7shifts, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with 7shifts:

Mandatory Scoping by Company and Location

Unlike simpler APIs where you can just query /users or /shifts, almost every 7shifts operation is deeply nested within a specific company hierarchy. To get shifts, you don't just ask for shifts - you must provide the company_id and often the location_id. If an LLM needs to modify a time punch or pull a daily labor report, it must chain together multiple API calls just to resolve the correct IDs before making the actual request. Your MCP server must explicitly define these required parameters in the JSON schema, otherwise the LLM will hallucinate invalid top-level requests.

Destructive Updates on Time Punches

When updating records like time punches (update_a_7_shifts_time_punch_by_id), the 7shifts API behaves with strict replacement rules. Most notably, the breaks array must always be included in its correct, complete state. If an LLM decides to update a time punch's clock-out time but omits the existing breaks array from the payload, the 7shifts API will permanently delete all breaks associated with that punch. Building static MCP schemas for this requires injecting explicit prompt engineering into the tool descriptions, forcing the LLM to fetch the record first, merge the arrays, and send back the complete state.

Rate Limits and 429 Passthrough

Workforce APIs get hit hard during shift changes and payroll processing. The 7shifts API enforces strict rate limits. A critical architectural note when using Truto's MCP servers: Truto does not retry, throttle, or apply backoff on rate limit errors.

When the upstream 7shifts API returns an HTTP 429 (Too Many Requests), Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec, but the caller (your agent framework or ChatGPT client) is fully responsible for retry and exponential backoff logic. Do not assume the integration layer will absorb 429s for you.

Generating and Connecting the 7shifts MCP Server

Rather than hand-coding tool definitions to handle the quirks above, Truto dynamically derives them from the 7shifts integration documentation. Here is how you spin up the server and connect it to ChatGPT.

Step 1: Create the MCP Server

First, you need to connect a 7shifts account via OAuth in Truto to get an integrated_account_id. Once connected, you generate the MCP server. You can do this via the Truto UI or via the API.

Method 1: Via the Truto UI

  1. Navigate to the integrated account page for your 7shifts connection in the Truto dashboard.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration (e.g., allow read and write methods, or restrict to specific tags like shifts or users).
  5. Copy the generated MCP server URL (it will look like https://api.truto.one/mcp/<secure-token>).

Method 2: Via the API Make a single POST request to scope an MCP endpoint to the account. This allows you to programmatically filter the server to specific operations.

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 7shifts Manager",
    "config": {
      "methods": ["read", "write"],
      "tags": ["shifts", "time_punches", "users", "analytics"]
    }
  }'

The response returns the secure url. That single URL carries routing and authentication - treat it like a secret.

Step 2: Connect to ChatGPT

Now, connect the server to your ChatGPT client. You can do this via the UI or using a manual configuration file if you are running a local agent.

Method 1: Via the ChatGPT UI

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode (MCP support requires this flag).
  3. Under MCP servers / Custom connectors, click Add new server.
  4. Name it "7shifts (Truto)".
  5. Paste the Truto MCP URL into the Server URL field and click Save.

Method 2: Via manual config file If you are running a custom agent or want to define the connection via file, you can map the SSE transport using the @modelcontextprotocol/server-sse package.

{
  "mcpServers": {
    "7shifts_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<your-secure-token>"
      ]
    }
  }
}

Once connected, ChatGPT will automatically handshake with the server, negotiate protocol versions, and list all available 7shifts tools.

7shifts Hero Tools for AI Agents

Truto dynamically generates dozens of tools for 7shifts based on the underlying REST API. Here are the most powerful "hero tools" your ChatGPT agent will use to orchestrate restaurant operations.

List All 7shifts Locations

Tool: list_all_7_shifts_locations

Almost every other tool requires a location_id. This is the foundational read tool your agent will use to discover the operating hierarchy of the restaurant group.

"Get a list of all restaurant locations for this 7shifts company so we know which IDs to use for scheduling."

List All 7shifts Users

Tool: list_all_7_shifts_users

Retrieves the staff directory, including contact info, hire dates, wage types, and active status. The agent uses this to map employee names to their internal user_id.

"Find the 7shifts user ID for John Doe, and tell me if they are marked as an active employee."

List All 7shifts Shifts

Tool: list_all_7_shifts_shifts

Fetches scheduled shifts. It can be heavily filtered by location, department, role, user, and date range. Crucial for understanding coverage and schedule enforcement.

"Pull the scheduled shifts for the downtown location for this coming Friday evening."

Get Daily Sales and Labor Analytics

Tool: 7_shifts_analytics_get_daily_sales_and_labor

Retrieves critical operational metrics including projected vs. actual sales, projected vs. actual labor minutes, and labor cost percentages. This is the ultimate tool for restaurant managers querying ChatGPT for end-of-day reports.

"Get the daily sales and labor report for yesterday at the main location. Did we hit our labor target?"

Update a Time Punch

Tool: update_a_7_shifts_time_punch_by_id

Modifies a clock-in or clock-out event. Because of 7shifts API constraints, the agent must fetch the punch first, preserve the existing breaks array, and write it back along with the time modifications.

"Update Sarah's time punch from today to show she clocked out at 10:30 PM instead of 11:00 PM. Make sure to keep her breaks intact."

Get Detailed Tip Pool Reports

Tool: 7_shifts_tip_pool_reports_get_detailed

Retrieves granular tip pool calculations, showing per-date and per-employee tip breakdowns. Essential for payroll inquiries and transparency.

"Run the detailed tip pool report for the past week so I can see exactly how much each bartender was allocated."

For the complete tool inventory and schema definitions, visit the 7shifts integration page.

Workflows in Action

Once the MCP server is connected, ChatGPT can chain these tools together to execute multi-step workflows. Here are two real-world examples.

Workflow 1: End-of-Day Manager Audit

A general manager needs to quickly assess the daily performance and finalize staff timesheets.

"Run the end-of-day audit for yesterday at the Northside location. Check our actual sales against labor costs, then look at all the time punches to see if anyone hit overtime or forgot to clock out."

How the agent executes this:

  1. Calls list_all_7_shifts_locations to find the location_id for "Northside".
  2. Calls 7_shifts_analytics_get_daily_sales_and_labor using the location ID and yesterday's date to pull the financial performance.
  3. Calls list_all_7_shifts_time_punches for the same date and location, filtering for auto_clocked_out: true or excessive hours.
  4. Synthesizes the data into a clean text summary, flagging any missing punches and calculating the labor percentage variance.
sequenceDiagram
    participant User as Manager
    participant Agent as ChatGPT
    participant MCP as Truto MCP
    participant API as 7shifts API

    User->>Agent: "Run the end-of-day audit for Northside..."
    Agent->>MCP: Call list_all_7_shifts_locations
    MCP->>API: GET /v2/company/{id}/locations
    API-->>MCP: Returns locations
    MCP-->>Agent: JSON Response
    Agent->>MCP: Call 7_shifts_analytics_get_daily_sales_and_labor
    MCP->>API: GET /v2/company/{id}/locations/{id}/daily_sales_and_labor
    API-->>MCP: Returns labor metrics
    MCP-->>Agent: JSON Response
    Agent->>MCP: Call list_all_7_shifts_time_punches
    MCP->>API: GET /v2/company/{id}/time_punches
    API-->>MCP: Returns punches
    MCP-->>Agent: JSON Response
    Agent-->>User: Formatted daily recap and punch warnings

Workflow 2: Automated Time-Off Approval & Shift Reassignment

An HR admin needs to process a last-minute sick day and find coverage.

"Approve Mike's pending time-off request for tomorrow. Then, check his scheduled shift and give me a list of other front-of-house staff who aren't scheduled tomorrow so I can find a replacement."

How the agent executes this:

  1. Calls list_all_7_shifts_time_off filtering by Mike's name and status: pending to locate the time_off_id.
  2. Calls 7_shifts_time_off_approve to finalize the sick leave.
  3. Calls list_all_7_shifts_shifts for tomorrow to find the exact time and role Mike was supposed to work.
  4. Calls list_all_7_shifts_users (or list_all_7_shifts_availabilities) to cross-reference staff in the same department who do not have a conflicting shift, presenting the manager with a curated list of replacement candidates.

Security and Access Control

When connecting ChatGPT to a payroll and workforce system, security is paramount. Truto provides several mechanisms to lock down the MCP server:

  • Method Filtering: If you only want ChatGPT to analyze data and never modify it, pass "methods": ["read"] during server creation. This drops all POST, PUT, and DELETE tools from the server payload.
  • Tag Filtering: Restrict access to specific domains. Passing "tags": ["analytics", "shifts"] ensures ChatGPT cannot see or interact with sensitive wages or users endpoints.
  • Secondary API Auth: By enabling require_api_token_auth: true, the bare MCP URL is no longer sufficient. The ChatGPT client must also pass a valid Truto API token in the Authorization header to execute tools.
  • Auto-Expiring Servers: Use the expires_at field to grant temporary access. If you have an external auditor who needs to query 7shifts data via Claude or ChatGPT, you can generate an MCP server that self-destructs after 48 hours.
  • Direct Rate Limit Passthrough: Truto respects upstream constraints. If your agent spams the 7shifts API and triggers a 429, Truto safely passes the error and rate limit headers back to the agent without buffering or retrying dangerously.

Moving Past Integration Bottlenecks

Connecting 7shifts to ChatGPT transforms conversational AI into an active participant in your restaurant operations. Instead of logging into a dashboard, downloading CSVs, and cross-referencing spreadsheets, managers can simply ask their agent for answers.

Building this orchestration layer from scratch - mapping API schemas to JSON-RPC tools, handling dynamic token routing, and parsing complex entity relationships - takes months of engineering time. Truto eliminates that burden by dynamically generating documentation-driven MCP tools straight from the 7shifts REST API.

Stop fighting workforce management APIs. Generate your MCP server, paste the URL into ChatGPT, and let your AI agents get to work.

FAQ

How do I handle 7shifts API rate limits when using the MCP server?
Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream 7shifts API returns an HTTP 429, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec, but the caller is responsible for implementing retry and exponential backoff logic.
Can I restrict ChatGPT to read-only access for 7shifts data?
Yes. When generating the MCP server via Truto, you can pass a configuration object with `"methods": ["read"]`. This ensures the server only exposes safe GET and LIST operations, preventing ChatGPT from accidentally modifying shifts, time punches, or employee records.
Do I have to build a custom backend to connect 7shifts to ChatGPT?
No. Truto automatically generates a production-ready MCP server derived directly from the 7shifts API documentation and schema. You simply authenticate the 7shifts account via OAuth, generate the MCP server URL, and paste it into ChatGPT.

More from our Blog