Skip to main content
Glama
smarthr-member-mcp

smarthr-member-mcp

by tunagohan

smarthr-member-mcp-tools

SmartHR を 従業員として 使っている人向けの MCP サーバーです。 自分の給与明細・賞与明細をまとめて取得し、年末調整で入力する「給与の収入金額(見込額)」を計算します。

  • 管理者用の公式 API トークンは使いません。自分のアカウントでログインしたブラウザ(手元の Google Chrome)を Playwright で操作します。

  • SmartHR 社の公式ツールではありません。画面構成が変わると動かなくなることがあります。

  • 計算結果は見込額です。最終的な申告内容はご自身で確認してください。

できること

tool

内容

list_payslips(year)

指定した年(支給日基準)の明細を取得し、勤怠・支給・控除・その他の項目を返す

estimate_income(year?)

指定した年(省略時は今年)の給与の収入金額の見込額を返す

estimate_income の計算方法:

  • 給与の収入金額 = 課税対象額 + 社会保険合計。立替精算や通勤手当などの非課税分を除くためです。これらの行がない明細では 支給 合計 を使います。

  • 発行済みの明細は実額を使います。

  • 最後の給与明細より後の月は、最新の給与明細の額で推計します(昇給を反映)。

  • まだ支給されていない賞与は、前年同月の賞与の額で推計します。

  • 推計分は rows の中で estimated: true になっています。賞与額の変更などが分かっている場合は、それをもとに補正してください。

Related MCP server: JP Invoice & Tax MCP

セットアップ

uv と Google Chrome が必要です。

git clone https://github.com/tunagohan/smarthr-member-mcp-tools.git
cd smarthr-member-mcp-tools
uv sync

Claude Code

claude mcp add smarthr-member \
  -e SMARTHR_URL=https://<your-tenant>.smarthr.jp \
  -- uv run --directory /path/to/smarthr-member-mcp-tools smarthr-member-mcp

Claude Desktop など

{
  "mcpServers": {
    "smarthr-member": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/smarthr-member-mcp-tools", "smarthr-member-mcp"],
      "env": { "SMARTHR_URL": "https://<your-tenant>.smarthr.jp" }
    }
  }
}

使い方

「今年の給与収入の見込額を出して」のように頼んでください。

初回やログインが切れているときは Chrome が開きます。5 分以内にログインすると、そのまま取得を続けます(SSO や 2 段階認証もそのまま使えます)。

データの扱い

  • ログイン状態は ~/.smarthr-member-mcp/profile に保存されます(SMARTHR_PROFILE_DIR で変更可)。このリポジトリの中には保存されません。

  • 取得した明細は MCP サーバーのメモリ上にだけ保持し、ファイルには書き出しません。

  • 明細の内容は、MCP クライアント(AI アシスタント)に送られます。

画面構成が変わって動かなくなったとき

数字を伏せた状態で画面の構造を出力するスクリプトがあります。

SMARTHR_URL=https://<your-tenant>.smarthr.jp uv run smarthr-member-recon

出力先は recon-output/recon.json です(git の管理外)。氏名や会社名がページ本文に残るので、共有する前に中身を確認してください。

開発

uv run pytest

License

MIT

Available Tools

2 tools
estimate_incomeA

年末調整用に、指定した年(省略時は今年)の「給与の収入金額(見込額)」を計算する。

発行済みの明細は実額、最後の給与明細より後の月は最新の給与明細(昇給を反映)と前年同月の賞与で推計する。 rows の estimated=true が推計分。賞与額の変更などが分かっていれば rows を見て補正すること。

Inputs: year.

list_payslipsA

指定した年(支給日基準)の給与明細・賞与明細を取得し、勤怠・支給・控除・その他の項目を返す。

初回やログインが切れているときは Chrome が開くので、そこで手動ログインする。

Inputs: year (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct roles: list_payslips is a data-retrieval tool for a given year, while estimate_income is a computation tool for year-end adjustment income projection. An agent can easily decide which to call based on whether it needs raw slips or an annual estimate.

    Naming Consistency5/5

    Both names follow the same snake_case verb_noun convention (list_payslips, estimate_income), with verbs that accurately reflect the operation type. No mixing of conventions or vague names.

    Tool Count3/5

    Two tools is thin for a payslip/income domain; there is no way to fetch a single month's detail, check login/session status, or list bonuses independently. The scope is narrow enough that it isn't egregious, but the surface feels minimal.

    Completeness3/5

    Core retrieval and estimation are covered, but notable gaps exist: no per-month detail lookup, no session/auth status tool despite the manual-login flow, and no way to correct or annotate estimated rows beyond reading them. Agents can work around these only by parsing the year-level rows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables managing freee HR operations like employee data, attendance, leave, and approvals through natural language in MCP-compatible clients such as Claude Desktop.
      1
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to perform Japanese invoice and tax calculations, including consumption tax, withholding tax, invoice number validation, and invoice data generation, all locally without external APIs.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables Dutch income tax calculations: converts gross to net salary, net to gross, compares multiple salary scenarios, and provides tax bracket data for supported years. Every result includes a detailed breakdown and a thetax.nl permalink.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables local-first HR payroll computation with statutory social insurance, housing fund, and cumulative IIT calculations, adaptable to arbitrary spreadsheet headers via import adapters and company profiles. Supports safe performance formula evaluation and keeps PII on-device.
      MIT