Check shifts, time clock entries, time-off requests, swaps and availability, and manage shifts. Hosted by usefulapi — connect from Claude, ChatGPT, Cursor, or any MCP client.
Team and Enterprise: an Owner adds the connector for the organization first.
Run this command, then run /mcp in Claude Code to log in:
Add to Cursor or add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"when-i-work": {
"url": "https://when-i-work.usefulapi.io/mcp"
}
}
}Add to VS Code or add this to .vscode/mcp.json:
{
"servers": {
"when-i-work": {
"type": "http",
"url": "https://when-i-work.usefulapi.io/mcp"
}
}
}No Add custom MCP server option? It depends on your account or workspace settings: see OpenAI's guide.
Run these commands. The second one opens the login page:
Other MCP clients (Windsurf, Cline, Zed and more): add the URL as a remote MCP server (Streamable HTTP). The client then opens the login page in your browser. Do not add an Authorization header: see Before you connect.
The login page asks for your Developer key (W-Key), When I Work email and When I Work password.
Optional: Workplace user id (W-UserId).
When I Work issues the developer key (W-Key). If you do not have one, ask When I Work support for an API developer key. Then use the email and password that you use at app.wheniwork.com.
Your developer key, email and password are stored encrypted in this connection's authorization grant and used only to log in to When I Work and call the When I Work API on your behalf. They are never shown to anyone; the key and email are also hashed into a private account id for usage metering.
Add only the URL. Do not add an Authorization header or an API key to the client config. The server signs you in with OAuth: the login page asks for your Developer key (W-Key), When I Work email and When I Work password. If the config has such a header, remove it: some clients then send that header instead of the login token, and every call fails with 401.
Turn on the When I Work connector, then ask in plain words. The AI picks the tools.
| Tool | Type | What it does |
|---|---|---|
wheniwork_get_account | read | Get the account Fetch the When I Work account (workplace) the token acts on — company name, plan and settings; for a parent account also its child accounts. A cheap way to confirm the credentials work. When I Work: GET /2/account. |
wheniwork_list_users | read | List users List the employees, supervisors, managers and admins in the account, optionally limited to some schedules or searched by name/email. Role codes: 1 admin, 2 manager, 3 employee, 5 supervisor. When I Work: GET /2/users. |
wheniwork_get_user | read | Get one user Fetch one user by id — name, email, role, positions, schedules, wage. When I Work: GET /2/users/{id}. |
wheniwork_list_locations | read | List schedules (locations) List the schedules in the account. The API calls a schedule a "location"; its id is the location_id every shift belongs to. When I Work: GET /2/locations. |
wheniwork_list_positions | read | List positions List the positions (job roles such as Cashier or Dishwasher) in the account. When I Work: GET /2/positions. |
wheniwork_list_shifts | read | List shifts List scheduled shifts in a time window — who works when, where and in which position — optionally including open shifts and unpublished drafts. Answers "who is on on Friday?" and "what open shifts are left?". When I Work: GET /2/shifts. |
wheniwork_get_shift | read | Get one shift Fetch one shift by id, including its breaks and publish state. When I Work: GET /2/shifts/{id}. |
wheniwork_list_eligible_users_for_shift | read | List users eligible for an open shift Find who could take an open shift — either an existing shift (shift_id) or a hypothetical one (start, end, position_id and location_id all required). When I Work: GET /2/shifts/eligible. |
wheniwork_list_times | read | List clocked times (timesheets) List clocked time entries — actual hours worked, clock-in/out times, length and approval state. Use only_open to see who is clocked in right now. When I Work: GET /2/times. |
wheniwork_list_time_off_requests | read | List time-off requests List time-off requests in a date range, with the requesting users. Status: 0 pending, 1 canceled, 2 accepted, 3 expired, 4 denied. When I Work: GET /2/requests. |
wheniwork_get_time_off_request | read | Get one time-off request Fetch one time-off request by id, with its message thread and users. When I Work: GET /2/requests/{request_id}. |
wheniwork_list_time_off_types | read | List time-off types List the time-off types (e.g. Personal, Sick, Holiday) and whether each allows paid time. Their ids are the type_id for a new request. When I Work: GET /2/requesttypes. |
wheniwork_list_shift_swaps | read | List shift swaps and drops List shift requests: swaps, drops and alerts, with the shifts and users involved. Status: 0 pending, 1 approved, 2 declined, 3 completed, 4 canceled, 5 expired. Type: 1 swap, 2 drop, 3 alert. start and end must be given together. When I Work: GET /2/swaps. |
wheniwork_list_availability | read | List availability List availability events — when people said they can or cannot work, including recurring patterns that fall in the window. Defaults to the caller, from now to two weeks out. When I Work: GET /2/availabilityevents. |
wheniwork_list_annotations | read | List schedule annotations List schedule annotations — announcements, business-closed days and blackout dates when time off is not allowed. Defaults to today through one year out. When I Work: GET /2/annotations. |
wheniwork_create_shift | write | Create a shift Create one shift on a schedule — assigned to a user, or open (user_id 0). Created as a draft unless published is true. Undo by editing it or unpublishing. When I Work: POST /2/shifts. |
wheniwork_update_shift | write | Update a shift Change a shift — reassign it, move it, change position or notes. When I Work requires start_time, end_time and location_id on every update, so fetch the shift first and pass them back. This tool never sends a breaks array; When I Work documents that breaks omitted from an update's breaks list are removed, so re-check the shift's breaks afterwards. When I Work: PUT /2/shifts/{id}. |
wheniwork_publish_shifts | write | Publish shifts Publish draft shifts so employees can see them. Publishing does not itself send notifications. Undo with wheniwork_unpublish_shifts. When I Work: POST /2/shifts/publish. |
wheniwork_unpublish_shifts | write | Unpublish shifts Return published shifts to draft, hiding them from employees. Undo with wheniwork_publish_shifts. When I Work: POST /2/shifts/unpublish. |
wheniwork_create_time_off_request | write | Create a time-off request Create a time-off request for a user (default the calling user). It starts pending; cancel it with wheniwork_update_time_off_request (status 1). Get type ids from wheniwork_list_time_off_types. When I Work: POST /2/requests. |
wheniwork_update_time_off_request | write | Approve, deny or change a time-off request Change a time-off request: set its status (0 pending, 1 canceled, 2 accepted/approved, 3 expired, 4 denied) and/or its dates or hours. Reversible — set the status back. start_time and end_time must be given together. When I Work: PUT /2/requests/{request_id}. |
wheniwork_usage_status | Usage status (free-tier meter) Report the caller's current usage: the plan, calls used this month, the limit of the plan (the free monthly cap or the Pro fair use limit), remaining, and whether the limit is reached. Read-only; does not count against the meter. | |
wheniwork_request_feature | Request a missing feature Tell usefulapi that the user needs something the When I Work tools cannot do yet (a missing tool, field or filter). Call it only when the user asks for something none of the tools can do, and tell the user that you send the request. Do not call it for errors or for normal requests. Do not include personal data, credentials or customer records. Stored with the product name and the client type (for example Claude or Cursor), without the user's account. At most 5 requests per day. Does not count against the meter. | |
wheniwork_upgrade | Upgrade to Pro (unlimited*) Get Pro: unlimited tool calls (fair use limit: 10,000 a month) on When I Work (the free tier caps monthly usage). Plans: "monthly" — $9/month; "yearly" — $90/year (2 months free). Cancel any time: Pro then runs to the end of the paid period, so it also suits a one-time job. *A fair use limit applies. For heavy use (near Pro's limit): "plus" or "plus_yearly" — Pro+, $19/month or $190/year, unlimited tool calls (fair use limit: 100,000 a month); an existing Pro subscription changes to Pro+ in place (needs confirm: true; the price difference for the rest of the period is charged at once). Otherwise returns a short link to open in your browser (it opens Stripe Checkout); after payment the account upgrades automatically. Does not count against the meter. | |
wheniwork_cancel_subscription | Cancel the Pro subscription Cancel the caller's When I Work Pro subscription at the end of the paid period (no refund for the current period; Pro continues until then, then the free tier applies). Requires confirm: true. Run wheniwork_upgrade later to undo the cancel before the period ends. Does not count against the meter. |
| Plan | Price | Limit |
|---|---|---|
| Free | $0 | 50 tool calls / month |
| Proper user | $9/mo · $90/yr | Unlimited* |
*Pro fair use limit: 10,000 tool calls a month on this server. For more, write to [email protected].
Pro covers this When I Work server only. Subscribe with wheniwork_upgrade (it returns a Stripe Checkout link). Cancel any time with wheniwork_cancel_subscription: Pro continues to the end of the paid period, with no refund for the current period, and running wheniwork_upgrade before then undoes the cancel. Or write to [email protected].
No. usefulapi is an independent service. It is not affiliated with or endorsed by When I Work. The server calls the When I Work API with your own When I Work access, so it sees only the data that your account can see.
Yes. In Claude, add this server's URL as a custom connector. In ChatGPT, add it as a custom MCP server in Plugins. Then log in once. Cursor, VS Code, Claude Code and Codex work too. See the setup steps.
The login page asks for your Developer key (W-Key), When I Work email and When I Work password. See Before you connect for where to find them.
No. Add only the URL. Do not add an Authorization header or an API key to the client config. The server signs you in with OAuth: the login page asks for your Developer key (W-Key), When I Work email and When I Work password. If the config has such a header, remove it: some clients then send that header instead of the login token, and every call fails with 401.
The login stores them encrypted in the authorization grant of your connection. The server uses them to call the When I Work API for you and to derive a private account id for usage metering. usefulapi does not show them on any page or in any reply. To stop all access, remove the connector and change or delete these credentials in When I Work.
Yes, if you approve it. 6 of the 21 When I Work tools can create or change data. The other 15 are marked read-only. Most MCP clients ask you to approve a tool call before it runs.
The Free plan gives 50 tool calls / month. Pro costs $9/mo or $90/yr, with unlimited tool calls (fair use limit: 10,000 tool calls a month), for this When I Work server only. Cancel any time: Pro then runs to the end of the paid period. Run wheniwork_usage_status to see how many calls you used.
Ask the AI to run wheniwork_upgrade: it returns a Stripe Checkout link. To cancel, run wheniwork_cancel_subscription. Pro continues to the end of the paid period.
Tell the AI what you wanted to do. It can send the request with wheniwork_request_feature. We store the text with the server name, the type of AI client and the tool you tried, not with your account, and read every request when we plan new tools. You can send up to 5 requests per day.
Any client that supports remote MCP servers (Streamable HTTP) with OAuth login: Claude (web and desktop), Claude Code, ChatGPT, Codex, Cursor, VS Code, Windsurf and others.
This is a Model Context Protocol endpoint — meant to be connected from an AI client, not opened in a browser. An invalid_token response at the URL is the auth gate working as designed; clients authenticate automatically.