Connect 7shifts to Claude: Optimize Shifts, Tasks & Log Books
Learn how to connect 7shifts to Claude using a managed MCP server. Automate scheduling, log books, and labor forecasts with secure AI tool calling.
If your team uses ChatGPT, check out our guide on connecting 7shifts to ChatGPT or explore our broader architectural overview on connecting 7shifts to AI Agents.
If you need to connect 7shifts to Claude to automate scheduling, parse log book entries, approve time-off requests, or oversee daily labor forecasts, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's JSON-RPC tool calls and 7shifts's REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.
Giving a Large Language Model (LLM) read and write access to a sprawling workforce management system like 7shifts is a serious engineering challenge. You must handle OAuth 2.0 token lifecycles, map massive JSON schemas to MCP tool definitions, and deal with 7shifts's strict relational API quotas. Every time 7shifts updates an endpoint or deprecates a legacy resource, you have to update your server code, redeploy, and test the integration.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for 7shifts, connect it natively to Claude Desktop, and execute complex workforce management workflows using natural language.
The Engineering Reality of the 7shifts 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, the reality of implementing it against specialized B2B APIs is painful. 7shifts is built to manage complex hierarchical org charts (companies, locations, departments, roles), strict labor compliance, and dynamic scheduling. Its API reflects that complexity.
If you decide to build a custom 7shifts MCP server, here are the specific integration challenges you will face:
Destructive Partial Updates on Time Punches
In the 7shifts API, time punches contain nested break objects. When you call the update_a_7_shifts_time_punch_by_id endpoint, any existing breaks must always be included in their correct state. If an LLM attempts a partial update - for instance, just modifying the clocked_out time - and omits the breaks array, 7shifts interprets this as a command to delete all breaks for that shift. An LLM cannot simply guess this constraint. A managed MCP server provides heavily typed tool descriptions that explicitly instruct the LLM on how to safely mutate complex nested arrays without wiping out compliance data.
Multi-Layered Relational Hierarchy Constraints
Virtually every endpoint in 7shifts requires a company_id. However, creating a shift or assigning a user requires matching a specific location_id, department_id, and role_id that must be valid relative to one another. An LLM cannot hallucinate a role ID; it has to traverse the hierarchy to fetch the allowed roles for a specific department and location first. Your MCP server must present these nested relationships logically, ensuring the LLM knows to look up the location ID before attempting to assign a user to a specific shift.
Complex Identifier Overloading
The 7shifts API often overloads parameter definitions to reduce endpoint bloat. For example, when fetching external user mappings or specific time-off settings, the ID parameter accepts a native 7shifts user ID, an external user ID prefixed with ext:, or an email address prefixed with email:, and sometimes even a 7punches ID prefixed with punch:. A naive MCP implementation will simply map this to a generic string, resulting in the LLM sending raw external IDs and receiving 404 errors. Managed MCPs parse the API documentation to inject these exact prefixing rules into the tool's JSON schema description.
How to Generate a Managed MCP Server for 7shifts
Instead of building your own JSON-RPC router, you can use Truto to generate an MCP server directly from your connected 7shifts account. This MCP server dynamically builds tool definitions based on the 7shifts API documentation, meaning no manual schema mapping is required.
You can generate the MCP server via the Truto UI or programmatically via the API.
Method 1: Via the Truto UI
- Log into your Truto dashboard and navigate to the integrated account page for your 7shifts connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Configure the server name, filter by specific methods (e.g., read-only), and set an optional expiration date.
- Copy the generated MCP server URL (e.g.,
https://api.truto.one/mcp/abc123def456).
Method 2: Via the API
For developer workflows, you can create the MCP server programmatically by sending a POST request to Truto. This is useful for automatically provisioning MCP access for individual users or automated agents.
curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
-H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Claude 7shifts Agent",
"config": {
"methods": ["read", "write"],
"tags": ["shifts", "users"]
}
}'The API responds with a secure, hash-backed URL that you will use to connect Claude.
{
"id": "mcp_8a9b0c1d",
"name": "Claude 7shifts Agent",
"url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}How to Connect the 7shifts MCP Server to Claude
Once you have your Truto MCP server URL, connecting it to Claude is straightforward. You can configure this via the Claude Desktop UI or manually through the configuration file.
Option A: Via the Claude UI
- Open Claude Desktop.
- Navigate to Settings -> Integrations -> Add MCP Server.
- Name the connection (e.g., "7shifts (Truto)").
- Paste the URL provided by Truto and click Add.
- Claude will instantly handshake with the server, retrieve the 7shifts API tools, and list them as available capabilities.
(Note: If you are using ChatGPT Developer Mode, the path is Settings -> Apps -> Advanced settings -> Add Custom Connector.)
Option B: Via the Manual Configuration File
If you prefer to configure Claude Desktop manually or are managing dotfiles across a team, you can add the server directly to the Claude config JSON file (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows).
{
"mcpServers": {
"truto_7shifts": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/a1b2c3d4e5f6..."
]
}
}
}Restart Claude Desktop. The agent will read the config, initialize the SSE connection, and dynamically load the 7shifts toolset.
Security and Access Control
Giving an LLM access to your company's workforce data requires strict boundaries. Truto provides several built-in mechanisms to constrain what the MCP server (and therefore Claude) can do.
- Method Filtering: Limit the server to specific operations via
config.methods. Passing["read"]ensures the LLM can only execute GET or LIST operations, preventing accidental shift deletions or data mutation. - Tag Filtering: Limit access by functional area. Passing
config.tags: ["users", "roles"]ensures the LLM can only see tools related to employee management, hiding sensitive financial or forecasting endpoints. - Automatic Expiry: Set
expires_atduring creation to generate a time-bound server. After the ISO datetime passes, the server URL automatically expires and tools are immediately revoked. - Two-Layer Authentication: Enable
require_api_token_auth: trueto mandate that the client passes a valid Truto API token in the Authorization header. This ensures that even if the MCP URL is leaked, the caller must still be an authenticated user.
Hero Tools for 7shifts
The 7shifts MCP server generated by Truto exposes dozens of endpoints as individual tools. Below are the highest-leverage tools for automating workforce operations with Claude.
list_all_7_shifts_users
Retrieves the roster of all employees in a 7shifts company. This is foundational for resolving natural language names to strict UUIDs for downstream assignments.
"Get a list of all active employees in our 7shifts account, including their notification preferences and current skill levels."
create_a_7_shifts_shift
Creates a new shift with location, start/end times, and optional job-network settings. Claude can use this to rapidly translate conversational scheduling requests into structured shifts.
"Schedule John Doe for a shift tomorrow from 9 AM to 5 PM at the Downtown location in the Kitchen department. Make sure to assign him the Line Cook role."
update_a_7_shifts_time_punch_by_id
Updates a time punch. Because of 7shifts API constraints, Claude uses the enriched schema description to ensure any existing breaks are passed back in their correct state to avoid deletion.
"Update Sarah's time punch from yesterday to show she clocked out at 6:30 PM instead of 6:00 PM. Retain her 30-minute unpaid break in the payload."
7_shifts_time_off_approve
Approves an existing time off request. Claude can filter time-off data and act on manager intent to bulk-approve clean requests.
"Find the pending time off request for Mike Smith next week and approve it."
7_shifts_forecast_overrides_bulk_create
Creates bulk daily projected forecast overrides for a specific location. Claude can analyze unstructured events (like a local festival schedule) and use this tool to bump labor forecasts accordingly.
"There is a major parade happening next weekend. Apply a forecast override for the Uptown location, bumping projected sales by 25 percent for Saturday and Sunday."
list_all_7_shifts_log_book_posts
Retrieves log book posts across categories. Claude can use this to aggregate manager notes and summarize daily operations across multiple venues.
"Pull all log book posts from the past 48 hours for the Northside location and summarize any recurring complaints about equipment maintenance."
To view the complete inventory of 7shifts tools, schemas, and required parameters, visit the Truto 7shifts Integration Page.
Workflows in Action
When Claude is equipped with the 7shifts MCP server, it can execute multi-step operational tasks that previously required human intervention. Here is how Claude handles two common workforce scenarios.
Scenario 1: Managing Shift Call-Outs and Log Books
When an employee calls out sick via SMS or email, a manager can ask Claude to handle the administrative fallout.
"Sarah called out sick for her shift tomorrow at the Uptown location. Delete her shift, search for available users in her department who can cover it, and write a log book post explaining the absence."
Step-by-step execution:
list_all_7_shifts_users: Claude looks up Sarah'suser_id.list_all_7_shifts_shifts: Claude searches for Sarah's upcoming shifts tomorrow and extracts theshift_id,location_id, anddepartment_id.delete_a_7_shifts_shift_by_id: Claude removes Sarah's shift from the roster.list_all_7_shifts_availabilities: Claude checks which other employees in that department are available tomorrow and outputs a suggested replacement list.list_all_7_shifts_log_book_categories: Claude looks up the ID for the "Manager Notes" category.create_a_7_shifts_log_book_post: Claude authors a post noting the call-out and the pending gap in the schedule.
Result: The manager receives a confirmation that the shift is cleared, a list of three available staff members to call, and verification that the operations log is updated - all from a single prompt.
sequenceDiagram
participant Claude
participant TrutoMCP as Truto MCP
participant SevenShifts as 7shifts API
Claude->>TrutoMCP: Call list_all_7_shifts_shifts (user_id=Sarah)
TrutoMCP->>SevenShifts: GET /v2/company/{id}/shifts
SevenShifts-->>TrutoMCP: Return shift data
TrutoMCP-->>Claude: Shift ID 89012
Claude->>TrutoMCP: Call delete_a_7_shifts_shift_by_id
TrutoMCP->>SevenShifts: DELETE /v2/company/{id}/shifts/89012
SevenShifts-->>TrutoMCP: 204 No Content
Claude->>TrutoMCP: Call create_a_7_shifts_log_book_post
TrutoMCP->>SevenShifts: POST /v2/company/{id}/log_book_posts
SevenShifts-->>TrutoMCP: 201 CreatedScenario 2: Adjusting Labor Forecasts Based on Events
General Managers often need to manually tweak automated sales forecasts to account for local variables. Claude can orchestrate this programmatically.
"We just booked a 50-person private event at the Downtown location for next Thursday. Pull the current labor forecast and override it by adding $2000 to the projected sales for that day."
Step-by-step execution:
list_all_7_shifts_locations: Claude resolves "Downtown" to the specificlocation_id.7_shifts_analytics_get_daily_sales_and_labor: Claude fetches the current baseline projected sales for next Thursday.create_a_7_shifts_forecast_override: Claude calculates the new total (baseline + 2000) and submits the override payload.
Result: The daily forecast is updated immediately, ensuring the scheduling engine prompts managers to add the appropriate amount of labor hours to support the private event.
Handling Rate Limits in 7shifts
The 7shifts API enforces rate limiting to protect system stability, especially during complex analytical queries or bulk workforce updates. When connecting Claude via Truto, it is important to understand how these limits surface.
Truto does not absorb, throttle, or automatically retry requests that hit 429 Too Many Requests errors. Instead, Truto acts as a transparent proxy. When 7shifts rate-limits a request, Truto passes the HTTP 429 error directly back to Claude. Truto normalizes the upstream rate limit information into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset).
Because the MCP server relays the exact state of the API, the caller - whether that is the LLM orchestrator or a custom client wrapper - is responsible for implementing any necessary retry or backoff logic. When Claude encounters a 429, you can instruct it in your system prompt to pause and retry based on the ratelimit-reset value returned in the error payload.
Strategic Wrap-Up
Managing a high-turnover shift workforce requires constant micro-adjustments - covering sick calls, auditing time punches, and tweaking forecasts. Moving these administrative tasks into a conversational interface unlocks massive operational speed.
By deploying a managed MCP server for 7shifts via Truto, you bypass the friction of OAuth token management, pagination logic, and undocumented schema quirks. You provide Claude with a secure, highly typed, and well-governed window into your 7shifts environment, empowering your team to manage their operations through natural language rather than clicking through ten different dashboard screens.
FAQ
- Can I limit Claude to only reading 7shifts data?
- Yes. When creating the 7shifts MCP server via Truto, you can pass `methods: ["read"]` in the configuration. This ensures the server only exposes GET and LIST operations, blocking Claude from creating or deleting shifts.
- How does the MCP server handle 7shifts rate limits?
- Truto acts as a transparent proxy. It does not automatically retry or absorb rate limits. If 7shifts returns an HTTP 429 error, Truto passes it to the client with standard IETF headers (ratelimit-reset, etc.), and the caller must handle the backoff.
- How do I connect the 7shifts MCP server to Claude Desktop?
- Generate the MCP server URL in Truto, then add it to Claude Desktop's settings under Integrations -> Add MCP Server, or manually add it to your `claude_desktop_config.json` using the SSE transport.
- Does Truto support updating 7shifts time punches safely?
- Yes. Truto's auto-generated tool descriptions include strict schema constraints that instruct the LLM on how to update a time punch correctly (e.g., passing back existing breaks to prevent destructive deletion).