跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Deputy,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
单个 Deputy 实例的劳动力管理:员工、地点和区域、可复制和发布的排班(rosters)、带上下班打卡和审批的工时表、休假和不可用时间、备忘、经理笔记,以及通过资源查询 API 访问的任何其他记录。使用永久令牌连接。
试试这样问
Deputy 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Deputy、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Deputy
单个 Deputy 实例的劳动力管理:员工、地点和区域、可复制和发布的排班(rosters)、带上下班打卡和审批的工时表、休假和不可用时间、备忘、经理笔记,以及通过资源查询 API 访问的任何其他记录。使用永久令牌连接。
设置
设置大约需要 5 分钟,需要一位 Deputy 系统管理员。
- 登录后从浏览器地址栏记下你的实例地址,例如
mycompany.au.deputy.com(区域有au、eu、uk,美国为na)。不带https://和路径填入DEPUTY_HOST。 - 打开
https://<你的实例地址>/exec/devapp/oauth_clients,添加一个 OAuth 客户端(名称和描述随意;客户端 ID 本身不会用到),然后点击 Get an Access Token。 - 永久令牌只显示一次,请立即复制到
DEPUTY_ACCESS_TOKEN。安装连接器:deputy_get_me用于安装检查。
令牌只在签发它的实例上有效,并以创建它的用户身份、按该用户的权限执行操作。系统管理员能看到所有地点。
个人数据:员工记录包含姓名、出生日期、联系方式、地址和薪资数据。只请求任务需要的内容。
Deputy 的术语:地点(工作场所)叫 Company,区域(部门)叫 OperationalUnit,班次叫 Roster,实际工作时间叫 Timesheet,休假类型是 LeaveRules 记录。
读取内容:
- 令牌用户:
deputy_get_me以及本人的班次、工时表、休假、不可用时间、地点和同事(deputy_get_my_rosters、deputy_get_my_timesheets、deputy_get_my_leave、deputy_get_my_unavailability、deputy_get_my_locations、deputy_get_my_colleagues)。 - 结构和人员:
deputy_list_locations、deputy_list_areas(每个区域属于一个地点;班次和工时表使用区域 ID)、deputy_list_employees、deputy_get_employee、用于筛选的deputy_query_employees,以及查看谁正在上班的deputy_get_employee_shift_status。 - 排班:
deputy_list_rosters覆盖过去 12 小时到未来 36 小时;deputy_query_rosters可查任意时段、员工或区域(按Date、Employee、OperationalUnit筛选)。 - 工时:
deputy_query_timesheets和deputy_get_timesheet(时段、休息、工资明细行、备注和审批状态)。 - 休假和可用时间:
deputy_query_leave、deputy_get_employee_leave、deputy_get_employee_unavailability和deputy_query_availability。休假类型用deputy_query_resource并把object设为LeaveRules获取。 - 其他一切(团队、公共假期、活动、培训、自定义字段、销售数据、工资周期等):
deputy_get_resource_info列出对象的字段,deputy_query_resource搜索,deputy_get_resource读取单条记录。
写入内容:
- 排班:
deputy_save_shift新增班次,带roster_id时更新班次;deputy_copy_rosters把部分区域某个日期范围的班次向后复制(例如把上周复制到本周);deputy_publish_rosters以所选通知方式发布班次(notify1 短信和邮件,2 短信,3 邮件,4 不通知,5 要求员工确认)。 - 工时:
deputy_start_timesheet、deputy_pause_timesheet(再次调用结束休息)和deputy_end_timesheet为员工上下班打卡;deputy_save_timesheet新增或修正已结束的工时表;deputy_approve_timesheet审批工时,以便导出到薪资系统。 - 休假和可用时间:
deputy_add_leave(状态 0 等待经理审批,1 记录已批准的休假,会影响工时表和余额)、deputy_update_leave(用status1、2 或 3 批准、拒绝或取消)以及deputy_add_unavailability(一次性或重复,例如每隔一个周一)。 - 员工:
deputy_add_employee、deputy_update_employee、deputy_invite_employee(通过邮件发送登录邀请)、deputy_terminate_employee(员工无法再登录或被排班;可恢复)和deputy_reactivate_employee。 - 笔记和通知:
deputy_post_journal在员工档案中添加仅经理可见的笔记;deputy_post_memo发布到某个地点的新闻动态,可只发给选定用户,并可要求确认已读。
发布的班次、邀请和备忘会送达真实员工,所以在请求之前先核对班次和通知方式。
安装时关闭:deputy_delete_employee、deputy_discard_rosters 和 deputy_discard_timesheet。它们无法撤销;团队需要时由工作区管理员开启。用 deputy_terminate_employee 停用员工是可恢复的替代做法。
查询工具:deputy_query_* 和 deputy_query_resource 发送 POST,但只读取数据。search 请求体中的条件必须全部满足,例如 {"s1":{"field":"Date","type":"ge","data":"2026-11-01"},"s2":{"field":"Date","type":"le","data":"2026-11-07"}},运算符有 eq、ne、gt、ge、lt、le、in、not in、starts、contains、is 和 is not。sort({"Date":"asc"})和 join(["EmployeeObject"])为可选。
数据格式:ID 为整数。StartTime、EndTime 以及输入参数 start 和 end 是以秒为单位的 Unix 时间戳;Date 字段是地点的本地日期(2026-11-03T00:00:00+11:00),因此时间要按地点的时区换算。Employee 为 0 的排班是空缺班次,Published 为 false 是草稿。工时表状态见 TimeApproved、PayRuleApproved、Discarded 和 IsInProgress;TotalTime 以小时计。休假 Status:0 等待审批,1 已批准,2 已拒绝,3 已取消,4 工资已批准。新增或更新班次返回 200 且响应体为空;AI 会用 deputy_query_rosters 核对结果。
分页:每次响应最多 500 条记录。查询工具接受 max(最多 500)和 start(偏移量);页面已满时,AI 把 start 增加 max 后再次调用。没有分页的列表工具会在一次响应中返回 Deputy 允许的全部内容。
常见错误:401 表示令牌错误或属于其他实例,403 表示令牌用户缺少权限,404 表示实例地址或记录 ID 错误,400 表示筛选中的字段名有误(用 deputy_get_resource_info 核对)。
连接器不会自行把工时表导出到薪资系统,不会创建地点或区域,在删除类工具关闭期间也不会删除任何内容。
前提条件: DEPUTY_HOST, DEPUTY_ACCESS_TOKEN
本地安装连接器
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
打开 http://localhost:3000/connectors/store,选择 Deputy 并填入前提条件中列出的环境变量。
可用工具
| Tool | What it does |
|---|---|
deputy_get_me | Who the token belongs to: user and employee id, name, company (location) ids, permissions and the install's settings |
deputy_get_my_rosters | Upcoming shifts of the token's own user (when am I next working), with times, area and location |
deputy_get_my_timesheets | Timesheets of the token's own user, newest first, with start and end times, breaks and approval state |
deputy_get_my_leave | Leave requests of the token's own user, with dates, leave type, hours and status |
deputy_get_my_unavailability | Unavailability periods the token's own user has entered (when am I unavailable) |
deputy_get_my_locations | Locations (workplaces) the token's own user can work in, with their areas |
deputy_get_my_colleagues | Colleagues of the token's own user (who do I work with): names, photos and contact details shared in Deputy |
deputy_list_employees | All employees the token may see, with id, name, main location (Company), role, active flag, start date, contact and payroll id |
deputy_get_employee | One employee by id: name, locations, role, contact details, start and termination date, payroll id |
deputy_query_employees | Search employees with filters, sorting and paging, e.g. active staff of one location: search… |
deputy_get_employee_shift_status | Whether an employee is working right now: current or next shift, open timesheet and break state |
deputy_list_locations | All locations (Deputy calls them Company records: workplaces with name, code, address id, time zone and active flag) |
deputy_list_areas | All areas (operational units / departments) with name, location (Company), colour and active flag |
deputy_list_rosters | Shifts (rosters) from 12 hours ago to 36 hours ahead across the install: employee, area, start and end (Unix seconds), published flag |
deputy_query_rosters | Search shifts (rosters) for any period, employee or area, e.g. one day: search {"s1":{"field":"Date","type":"eq","data":"2026-11-03"}}; a… |
deputy_query_timesheets | Search timesheets (actual worked time): employee, area, start and end (Unix seconds), total hours, cost, TimeApproved, PayRuleApproved… |
deputy_get_timesheet | One timesheet with its full details: slots, breaks, pay lines, comments and approval state |
deputy_query_leave | Search leave requests: employee, leave rule (type), location, DateStart, DateEnd, Days, TotalHours, Status (0 awaiting approval, 1… |
deputy_get_employee_leave | Leave requests of one employee with dates, type, hours and status |
deputy_get_employee_unavailability | Unavailability periods of one employee (one-off and recurring), with start, end and comment |
deputy_query_availability | Search availability and unavailability records of employees (EmployeeAvailability): employee, start and end (Unix seconds), type and… |
deputy_query_resource | Search any other Deputy resource with the same filter body as the other query tools: leave rules, teams, public holidays, events, memos… |
deputy_get_resource | Read one record of any Deputy resource by id, e.g. a Roster, Leave, LeaveRules or Company record |
deputy_get_resource_info | Field list of a Deputy resource: field names and types, and the joinable related objects |
deputy_add_employee | Add an employee to a location |
deputy_update_employee | Change fields of an employee record through the resource API |
deputy_invite_employee | Email the employee an invitation to log in to Deputy and use the app (sends a message) |
deputy_terminate_employee | Terminate an employee: they can no longer log in or be rostered |
deputy_reactivate_employee | Re-activate a terminated employee so they can be rostered again |
deputy_delete_employee | Delete an employee's account and data from Deputy |
deputy_post_journal | Add a journal entry (a private manager note) to an employee's profile |
deputy_add_leave | Create a leave request for an employee |
deputy_update_leave | Approve, decline or cancel a leave request (Status), or change its dates and comment |
deputy_add_unavailability | Record when an employee cannot work, once or repeating (e.g. every second Monday) |
deputy_save_shift | Add a shift, or update one when roster_id is given |
deputy_publish_rosters | Publish shifts so employees see them, with the chosen notification |
deputy_copy_rosters | Copy the shifts of a date range of some areas forward (e.g. last week to this week) |
deputy_discard_rosters | Discard (remove) shifts from the schedule |
deputy_start_timesheet | Clock an employee on in an area now: starts a running timesheet for them |
deputy_end_timesheet | Clock an employee off (ends a running timesheet), with an optional unscheduled meal break |
deputy_pause_timesheet | Start or end a break on a running timesheet (calling it again ends the break) |
deputy_save_timesheet | Create a finished timesheet, or update one when timesheet_id is given: times, area, breaks and comment, optionally approved at once |
deputy_approve_timesheet | Approve a timesheet (time approval) so it can be exported to payroll |
deputy_discard_timesheet | Discard a timesheet so it is not paid |
deputy_post_memo | Post a memo to the news feed of a location, optionally to selected locations or users, and optionally asking them to confirm they read it |
示例提示
- “悉尼门店现在谁在上班,下一个上班的是谁?”
- “给我看厨房区域下周的排班,包括空缺班次。”
- “列出上周还没审批的工时表,附上员工和总工时。”
- “把吧台区域上周的班次复制到本周,发布前先给我看草稿。”
- “本月有哪些休假申请在等待审批?”
下一步
这份指南对你有帮助吗?