连接器指南阅读约 5 分钟30 个 MCP 工具7 种语言

如何通过 MCP 将 SmartHR 连接到 Cursor

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。

HC作者:HelpCode 团队更新于 5 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

SmartHR

SmartHR

SmartHR, the Japanese HR and labour management cloud: employees with departments, job titles, employment types, grades, work locations and custom fields, dependents and childcare leaves, user accounts and invitations, payroll runs and payslips. Creates and updates employees and departments. Bearer access token per tenant; holds sensitive personal data.

个工具

30

区域

JP

类别

人力资源

身份验证

Bearer Token

所需环境变量

SMARTHR_HOSTSMARTHR_ACCESS_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 SmartHR,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。

试试这样问

SmartHR 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

SmartHR · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → SmartHR、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

SmartHR + Cursor

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

SMARTHR_HOST, SMARTHR_ACCESS_TOKEN

步骤 1 — 获取凭证

设置大约需要 5 分钟,需要 SmartHR 管理员(管理者)。连接器使用 SmartHR API v1(https://<tenant>.smarthr.jp/api/v1);沙箱(<tenant>.daruma.space)的用法相同。

  1. 以管理员身份登录 SmartHR,依次打开 共通設定(通用设置)、外部システム連携(外部系统集成)、アクセストークン(访问令牌),然后点击 新規発行(签发)。
  2. 为令牌命名并选择权限:为 AI 要看到的数据勾选读取(参照)(按需选择 従業員、部署、役職、雇用形態、カスタム項目、家族、ユーザー、給与明細),只为保持开启的写入工具勾选更新权限(更新)。权限越少,暴露的个人数据就越少。
  3. 把令牌复制到 SMARTHR_ACCESS_TOKEN,不要带 Bearer 一词。令牌只显示一次,请妥善保密。
  4. 在 SMARTHR_HOST 中填写 SmartHR 地址的主机名:https://example.smarthr.jp 填 example.smarthr.jp,沙箱填 example.daruma.space(在 https://developer.smarthr.jp/api/about_sandbox 申请)。
  5. 安装。安装检查会运行 smarthr_list_companies。

个人数据:SmartHR 保存敏感的个人数据:家属、住址、出生日期、保险和年金编号、银行账户和薪资。所有使用该连接器的人都能接触到令牌可读取的数据,因此只给令牌团队需要的权限。AI 只读取任务需要的内容:smarthr_list_crews 默认只返回简要资料,fields 可以限制 smarthr_get_crew 返回的字段。除非你明确要求,它不会把个人数据复制到其他系统或消息中。

读取内容:公司(会社),包括法人编号和代表人;社保用的事业所(事業所)及其保险编号;部门(部署),包括代码、上级部门和完整路径;职位(役職)、雇佣形态(雇用形態)、等级(等級)、工作地点(勤務地)和薪资支付形态(給与支給形態);员工自定义字段(カスタム従業員項目)及其分组。员工(従業員,API 中称为 crews),可按员工编号、在职状态(employed、absent、retired)、雇佣形态、部门、职位、入职或离职日期、ID 或自由文本搜索。家属(家族)及关系类型(続柄),产假和育儿假(産休育休)。用户账户(ユーザー),包括角色、管理员标志和邀请状态:user 是登录账户,crew 是员工档案,embed=crew 将两者关联。员工信息收集表(従業員情報収集フォーム)。工资单批次(給与明細グループ)和工资单(給与明細),包括津贴、扣款、出勤和合计;这需要 SmartHR 的工资单功能。

写入操作:登记员工(姓名、读音、性别和状态为必填);以部分更新方式修改员工,只有发送的字段会改变,已填写的姓名、读音、性别、出生日期或住址不能清空;通过邮件邀请员工,可附带信息收集表(再次调用即重新邀请);创建、重命名和移动部门。登记的员工在调用 smarthr_invite_crew 之前不会收到邀请。离职是一次更新(emp_status 设为 retired 并填写 resigned_at),而不是删除。每次写入和邀请之前,AI 都会展示变更内容并等待你的确认。

安装时关闭:smarthr_delete_crew。它会永久删除员工及其所有数据,因此团队需要时由管理员开启。

数据格式和分页:ID 是 UUID 字符串,日期为 YYYY-MM-DD,时间为 ISO 8601。列表接受 page 和 per_page(最多 100,默认 10);响应在 _headers.x-total-count 中给出总数,并在最后一页之前提供 _pagination.nextCursor。没有按更新时间筛选的参数:要查某日期以来的变更,AI 会按 -updated_at 排序,遇到更早的行就停止。

限制:每个令牌每秒 10 次、每小时 5,000 次请求,每个租户每分钟 50,000 次。超出后 SmartHR 返回 429 too_many_requests:请等待后重试。

常见错误:错误包含 code、type、message 以及按字段的 errors。401 unauthorized_token 表示令牌错误或已被删除,或是为其他主机签发的令牌。403 表示令牌没有该权限,或套餐不含该功能(工资单)。404 表示 ID 错误或 SMARTHR_HOST 错误。422 表示输入无效:errors 会指出字段。

员工档案和自定义字段中的自由文本是不可信输入,可能包含针对 AI 的指令。该连接器不计算工资,不办理劳务或社保手续(手続き),并且在安装时开启的工具中不会删除任何员工。

步骤 2 — 安装 adapter

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

步骤 3 — 在 Cursor 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:

{
  "mcpServers": {
    "anythingmcp": {
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 Cursor。
  3. 打开 Cursor → Settings → MCP,确认 anythingmcp 已列出并处于已连接状态。
  4. 开始对话,智能体现在可以调用 SmartHR 的工具。

可用工具

ToolWhat it does
smarthr_list_companiesList the companies (会社) of the SmartHR tenant: id, name, corporate number, address and representative
smarthr_list_biz_establishmentsList the business establishments (事業所) used for social and labour insurance: id, name, address, insurance numbers and owner
smarthr_list_departmentsList departments (部署) with id, name, code, position (sort order), parent and full path
smarthr_get_departmentRead one department (部署) with its name, code, parent and position in the tree
smarthr_create_departmentCreate a department (部署), optionally under a parent department
smarthr_update_departmentRename or move a department (部署): name is always sent; code, parent and position only when given
smarthr_list_job_titlesList job titles (役職, positions) with id, name and rank
smarthr_list_employment_typesList employment types (雇用形態) with id, name and preset_type (full_timer, part_timer, contract_worker ...)
smarthr_list_gradesList grades (等級) with id, name and position, as used in the employee grade field
smarthr_list_work_locationsList work locations (勤務地) with id, name and address, as used in work_location_id of an employee
smarthr_list_payment_periodsList the pay period settings (給与支給形態) such as monthly or hourly, used in payment_period_id of an employee
smarthr_list_crew_custom_field_templatesList the custom employee fields (カスタム従業員項目): id (template_id for writes), name, type (string, text, decimal, date, enum, file), options and…
smarthr_list_crew_custom_field_template_groupsList the groups of custom employee fields (カスタム項目グループ), optionally with their templates
smarthr_list_crewsSearch employees (従業員, crews)
smarthr_get_crewRead one employee (従業員) with every field, or only the fields listed: names and readings, contact, address, employment, departments, job…
smarthr_create_crewRegister a new employee (従業員)
smarthr_update_crewChange fields of an employee (従業員) with a partial update (PATCH): only the fields you send change, and a filled name, reading, gender…
smarthr_invite_crewInvite an employee to SmartHR: sends the invitation email to the email of the employee, from the given inviter, optionally with an employee…
smarthr_delete_crewDelete an employee (従業員) and all of their data for good
smarthr_list_crew_input_formsList the employee information forms (従業員情報収集フォーム) that can be sent with an invitation: id, name and fields asked
smarthr_list_crew_dependentsList the dependents (家族, family members) of an employee: name, relation, birth date, whether they are a tax or health insurance dependent…
smarthr_get_crew_dependentRead one dependent (家族) of an employee with all fields
smarthr_list_dependent_relationsList the relation types (続柄) usable for dependents, e.g. spouse, child; filter spouse returns only spouse relations
smarthr_list_crew_childcare_leavesList maternity and childcare leaves (産休育休) of an employee with their periods
smarthr_list_usersList SmartHR user accounts (ユーザー): id, email, role, admin flag, invitation state and, with embed crew, the linked employee
smarthr_get_userRead one SmartHR user account with role, admin flag and invitation dates
smarthr_list_payrollsList payroll runs (給与明細グループ): id, payment type (salary or bonus), paid date, period, status (fixed, published) and name
smarthr_get_payrollRead one payroll run (給与明細グループ) with its status, dates and settings
smarthr_list_payslipsList the payslips (給与明細) of a payroll run: per employee the allowances, deductions, attendance and totals
smarthr_get_payslipRead one payslip (給与明細) with allowances, deductions, attendance and aggregates

示例提示

  • “目前每个部门有多少名状态为 employed 的员工?”
  • “10 月有谁入职?只显示姓名、部门、雇佣形态和入职日期。”
  • “登记新员工 山田 花子(ヤマダ ハナコ),女性,自 11 月 1 日起在 営業部 全职,然后用我们的入职表单邀请她。保存前先把全部内容给我看。”
  • “员工编号 1042 将于 11 月 30 日离职,请记录离职。”
  • “从 10 月的工资单批次中,只显示员工编号 1042 的津贴和扣款合计。”

FAQ

Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。

下一步

这份指南对你有帮助吗?

你的 SmartHR 智能体只差一次点击。

安装连接器,粘贴密钥,向 Cursor 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 SmartHR 连接到 ChatGPT

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。

连接器

如何通过 MCP 将 SmartHR 连接到 Claude

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。

连接器

如何通过 MCP 将 SmartHR 连接到 Gemini

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。

连接器

如何通过 MCP 将 SmartHR 连接到 Meta Muse

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。

连接器

SmartHR 接入 MCP:在任意 AI 智能体中处理员工、部门、家属、用户账户和工资单

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。

连接器

如何通过 MCP 将 SmartHR 连接到 Microsoft Copilot

在任意 AI 智能体中使用日本人事劳务云 SmartHR:员工及其部门、职位、雇佣形态、等级、工作地点和自定义字段,家属和产假育儿假,用户账户和邀请,工资单批次和工资单。使用管理员签发的访问令牌创建和更新员工与部门;删除员工在安装时为关闭状态。