payroll-normalizer-mcp
Allows Windsurf (powered by Codeium) to normalize payroll data from various formats into a standard template
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@payroll-normalizer-mcpNormalize payroll spreadsheets in ~/Downloads/payrolls"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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)
工具 | 作用 |
| 返回标准 10 列定义、身份类型可选值、应发≠实发等口径(映射前先读) |
| 逐文件返回表头、前 3 行样本、自动识别的字段映射、应发口径与问题 |
| 整理为标准模板 xlsx + 报告 md; |
| 生成带下拉+说明的空白标准模板 |
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-mcpClaude 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 toolsgenerate_blank_templateA
生成空白的『社保测算标准工资模板』(xlsx):含顶部填表说明、身份类型/是否缴公积金下拉、示例行。 output_path: 输出文件绝对路径(默认当前目录下 社保测算-标准工资模板.xlsx)。返回实际路径。
| Name | Required | Description | Default |
|---|---|---|---|
| output_path | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the output format and contents, but does not mention whether the tool overwrites existing files at the default path, which is a key behavioral trait for a file generation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences plus a parameter note, front-loading the core purpose and providing necessary details without extraneous text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one optional parameter) and the presence of an output schema, the description covers the essential aspects: what it generates, file contents, and parameter behavior. Minor gaps exist (e.g., overwrite) but overall sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter (output_path) has 0% schema description coverage, but the description explains its purpose, default behavior, and return value clearly, adding significant value beyond the schema's minimal definition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool generates a blank Excel template for social security calculation, specifying file format (xlsx), contents (instructions, dropdowns, example row), and distinguishes from sibling tools (inspect, normalize, standardize) which handle existing data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The context is clear that this tool is for generating a blank template, implying it should be used when starting from scratch rather than processing existing files. However, no explicit guidance on when not to use it or alternatives is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_payrollA
检查文件夹内每个工资表(.xlsx/.xls/.csv):返回表头、前3行样本、自动识别到的字段映射、应发口径与问题。 当某文件无法自动映射时,模型据此判断每列含义,再在 normalize_payroll 的 overrides 里给出 column_map/entity/ym。
folder: 存放工资表的文件夹绝对路径。
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the transparency burden. It discloses the tool's outputs and handling of unmapped files, but does not explicitly state side effects, auth needs, or confirm read-only nature, leaving some ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loading the action and outputs, with no fluff. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers key outputs and fallback behavior, sufficient for the tool's complexity. Given an output schema exists, it does not need to detail return values, but could mention the output schema structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description clarifies 'folder' as an absolute path, which adds meaning beyond the name. The single parameter is adequately explained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool inspects payroll files in a folder and returns headers, sample rows, field mapping, and issues. It also ties into the workflow with sibling tool normalize_payroll, establishing its distinct role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing to inspect payroll files and map columns, and mentions fallback behavior for unmapped files. It does not explicitly state when not to use it, but the context with siblings is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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。
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | ||
| output_dir | No | ||
| overrides_json | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It describes the transformation (merge by person cross-entity/month), output types, and the overrides mechanism. However, it does not mention side effects (e.g., does it modify original files?) or permissions required, but the disclosed behavior is sufficient for most use cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a compact paragraph that covers purpose, parameters, and output. It is front-loaded with the main function. The overrides_json description is detailed but necessary. Slightly verbose for the parameter descriptions, but overall efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (3 parameters, one required, no enums, output schema exists), the description provides sufficient context: what it does, how to use each parameter, and what the return JSON contains. It lacks details on error scenarios or file format expectations, but is adequate for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It does so thoroughly: defines folder, output_dir with default, and overrides_json with a detailed format example including the structure of column_map and standard field names. This adds significant meaning beyond the schema's property names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'normalize' and the resource 'payroll files in a folder', specifies the outputs (standard template xlsx and report md), and distinguishes from siblings like generate_blank_template by focusing on processing existing files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what the tool does but does not explicitly state when to use it over siblings or when not to use it. It includes hints about optional overrides for problematic files, but lacks exclusion criteria or alternative tool references.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
standard_columnsA
返回社保测算标准模板的 10 列定义、身份类型可选值与关键口径(应发≠实发等)。 模型在做列映射前应先读这个。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It correctly indicates this is a read-only retrieval tool returning definitions and options. No side effects are described, which is appropriate. The output schema likely covers return format, so no contradiction or gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences that get straight to the point, front-loaded with purpose and usage timing. Every word adds value, no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters, presence of output schema, and the tool's simple nature as a static reference, the description is complete. It covers purpose, usage context, and key content.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters in the schema. The rubric sets baseline 4 for 0 parameters. The description adds value by explaining what the tool returns, but no parameter-specific info is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it returns definitions of 10 columns, identity type options, and key concepts like 应发≠实发, specifying it is a reference for column mapping. This distinguishes it from sibling tools that generate templates, inspect payroll, or normalize payroll.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says '模型在做列映射前应先读这个' (the model should read this before doing column mapping), providing clear guidance on when to use this tool relative to other operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
generate_blank_template - First observed
inspect_payroll - First observed
normalize_payroll - First observed
standard_columns
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: template generation, folder inspection, normalization with overrides, and column reference. No overlaps.
All tools use consistent snake_case verb_noun pattern (generate_blank_template, inspect_payroll, normalize_payroll, standard_columns).
4 tools cover the core workflow (template, inspect, normalize, reference) without being excessive or insufficient for the payroll normalization domain.
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
Related MCP Connectors
Standardize, reshape, and normalize messy data — CSV, Excel, Parquet, S3, databases.
Extract verified data from CRE rent rolls and T12 operating statements (PDF, Excel, CSV, scans)
Malaysian SME accounting, e-Invoice and payroll for your AI. 64 tools; writes are approved drafts.
Invoices and other financial documents to rows: upload, say what to extract, read the rows.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered employee data management in Excel files, automatically classifying employees by department, designation, and salary band based on experience and role, with automatic data validation and backup capabilities.-
- AlicenseCqualityBmaintenanceEnables 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.3530 npm36MIT
- AlicenseNot gradedqualityBmaintenanceEnables 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
- AlicenseNot gradedqualityAmaintenanceEnables 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.1MIT