Skip to main content
Glama
payroll-normalizer-mcp

payroll-normalizer-mcp

by dingxiang-me

payroll-normalizer-mcp

让任意支持 MCP 的 AI 工具(Claude Code / Claude Desktop / Cursor / Windsurf / Cline / Zed / 支持 MCP 的 ChatGPT 等)都能把五花八门的工资表一键整理成「社保测算标准模板」。

把企业各种格式的工资表(.xlsx/.xls/.csv,多主体多月份)按"自然人跨主体跨月"归并,自动识别列名、把实发换算回应发(税前),输出 10 列标准模板 + 整理报告。遇到非标表头时,AI 客户端可先 inspect_payroll 看表头样本、判断列含义,再带 overrides 调 normalize_payroll。

工具(MCP tools)

工具

作用

standard_columns

返回标准 10 列定义、身份类型可选值、应发≠实发等口径(映射前先读)

inspect_payroll(folder)

逐文件返回表头、前 3 行样本、自动识别的字段映射、应发口径与问题

normalize_payroll(folder, output_dir?, overrides_json?)

整理为标准模板 xlsx + 报告 md;overrides 修正非标表

generate_blank_template(output_path?)

生成带下拉+说明的空白标准模板

Related MCP server: Excel MCP Server

安装:在各家工具里加这个 MCP server

无需先发布到 PyPI——用 uvx 直接从 GitHub 运行(需本机有 uv)。通用配置:

{
  "mcpServers": {
    "payroll-normalizer": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/dingxiang-me/payroll-normalizer-mcp", "payroll-normalizer-mcp"]
    }
  }
}

放到对应位置即可:

  • Claude Code(一条命令):

    claude mcp add payroll-normalizer -- uvx --from git+https://github.com/dingxiang-me/payroll-normalizer-mcp payroll-normalizer-mcp
  • Claude Desktop:claude_desktop_config.json → mcpServers(路径见 Settings › Developer)。

  • Cursor:项目根 .cursor/mcp.json(或全局 ~/.cursor/mcp.json)→ 同上 mcpServers。

  • Windsurf:~/.codeium/windsurf/mcp_config.json → 同上。

  • Cline / Zed / 其他:填到各自的 MCP 配置里,command/args 一致。

想更快启动可先发布到 PyPI,再把 args 换成 ["payroll-normalizer-mcp"]。

用法

配置好后,直接对 AI 说:

「把 /path/to/工资表文件夹 里的工资表整理成社保测算标准模板」

AI 会自动调用 inspect_payroll →(必要时)判断非标列 → normalize_payroll,在该文件夹产出 社保测算标准模板_整理结果.xlsx 和 整理报告.md。

依赖

  • uv(提供 uvx)

  • 运行时自动拉取 mcp、openpyxl;旧版 .xls 另需 xlrd(或先另存为 .xlsx)

配套

产出的标准模板可直接导入「社保公积金薪酬优化测算工具」做测算。本服务只做数据整理,不做社保/个税计算。

许可

MIT

Available Tools

4 tools
generate_blank_templateA

生成空白的『社保测算标准工资模板』(xlsx):含顶部填表说明、身份类型/是否缴公积金下拉、示例行。 output_path: 输出文件绝对路径(默认当前目录下 社保测算-标准工资模板.xlsx)。返回实际路径。

Inputs: output_path. Returns: result

inspect_payrollA

检查文件夹内每个工资表(.xlsx/.xls/.csv):返回表头、前3行样本、自动识别到的字段映射、应发口径与问题。 当某文件无法自动映射时,模型据此判断每列含义,再在 normalize_payroll 的 overrides 里给出 column_map/entity/ym。

folder: 存放工资表的文件夹绝对路径。

Inputs: folder (required). Returns: result

normalize_payrollA

把文件夹内所有工资表整理成『社保测算标准模板』(xlsx) + 整理报告(md),按自然人跨主体跨月归并。

folder: 存放工资表的文件夹绝对路径。 output_dir: 产出目录(默认与 folder 相同)。 overrides_json: 可选 JSON 字符串,用于修正自动识别不了的文件,形如: {"某文件.xlsx": {"entity": "甲公司", "ym": "2025-03", "column_map": {"name": "员工", "gross": "税前总额", "id": 0}}} column_map 的值可为"表头文字"或列序号(从0起);字段名取标准字段: name/id/entity/ym/gross/total/unit_ss/net/stype/gjj_paid/gjj_base/gjj_ratio。

返回 JSON:产出路径、记录数、应发口径分布、需人工接管的文件清单、报告 markdown。

Inputs: folder (required), output_dir, overrides_json. Returns: result

standard_columnsA

返回社保测算标准模板的 10 列定义、身份类型可选值与关键口径(应发≠实发等)。 模型在做列映射前应先读这个。

Inputs: no named parameters. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: template generation, folder inspection, normalization with overrides, and column reference. No overlaps.

    Naming Consistency5/5

    All tools use consistent snake_case verb_noun pattern (generate_blank_template, inspect_payroll, normalize_payroll, standard_columns).

    Tool Count5/5

    4 tools cover the core workflow (template, inspect, normalize, reference) without being excessive or insufficient for the payroll normalization domain.

    Completeness4/5

    The tool surface provides a complete workflow from inspection to normalization with overrides. Minor gap: no separate tool for post-normalization validation, but overrides handle corrections.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      C
      maintenance
      Enables conversational data analysis of Excel/CSV files through natural language queries, powered by 395 Excel functions via HyperFormula and multi-provider AI. Supports advanced analytics, bulk operations, financial modeling, and large file processing with intelligent chunking.
      35
      29 npm
      38
      MIT
    • 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
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables normalizing arbitrary Excel spreadsheets with varied headers into 19 canonical fields and clean JSON, with optional LLM disambiguation and offline fallback. Exposes MCP tools for use in Claude, Cursor, and Windsurf.
      1
      MIT