Worth Calculator MCP
基于开源项目 Zippland/worth-calculator 的核心公式,实现可在 MCP 中调用的「工作性价比(B班值不值)」计算工具。
项目结构(用于发布 PyPI)
worth-calculator-mcp/
├── worth_calculator_tool/
│ ├── __init__.py
│ └── main.py
├── worth_calculator_mcp.py
├── setup.py
├── README.md
├── requirements.txt
└── local_test_mcp.json
提供工具
calculate_job_worth
安装
pip install -r requirements.txt
启动
python worth_calculator_tool/main.py
参数说明(核心)
annual_salary: 年薪(必填)country_code: 国家代码(如CN/US/JP),用于 PPP 折算work_days_per_week,wfh_days_per_weekannual_leave,paid_sick_leave,public_holidayswork_hours,commute_hours,rest_timecity_factor,work_environment,leadership,teamworkhas_shuttle,shuttle_factorhas_canteen,canteen_factordegree_type,school_type,bachelor_typework_years,job_stability
返回结果
返回 JSON,包含:
job_value: 核心性价比分数rating_cn: 中文评级(如一般/很爽/人生巅峰)rating_key: 对应原项目评级键intermediate: 关键中间变量,便于审计公式
本地测试(步骤2)
你可以把 local_test_mcp.json 导入到 MCP 客户端进行本地测试。
也可直接在 Cursor 中保留当前 worth-calculator-mcp 配置并调用工具 calculate_job_worth 验证。
发布到 PyPI(步骤3)
- 安装构建工具:
pip install -r requirements.txt
- 构建:
python -m build
- (推荐)先传 TestPyPI:
twine upload --repository testpypi dist/*
- 正式上传 PyPI(使用 API Token):
twine upload dist/*
Token 使用方式(推荐)
- 用户名:
__token__ - 密码:
pypi-xxxx(你的 API Token)
⚠️ 注意:
- 包名必须唯一;若
worth-calculator-mcp已被占用,需要改setup.py的name - 每次发布需更新
version - 我不能替你注册账号或生成 token;你提供 token 后我可以继续代你执行上传命令
Metadata
Release files for worth-calculator-mcp-39532 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| worth_calculator_mcp_39532-0.1.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| worth_calculator_mcp_39532-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.4 kB
Release files / worth_calculator_mcp_39532-0.1.0.tar.gz
| Download URL | worth_calculator_mcp_39532-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25cd3804adbe31249f07b580a8a9305819c47ae8804978d77f04695795ea7c8a
|
|
BLAKE2b-256 checksum How to use checksums |
08fc5400a4e4ea651480f475b8a0c444d1b783eb72b7d1190624137853568f30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / worth_calculator_mcp_39532-0.1.0-py3-none-any.whl
| Download URL | worth_calculator_mcp_39532-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
231b7c48f3eb9d0a74a5651c927b625c3b6e3b543d4ae461543f36394c95543c
|
|
BLAKE2b-256 checksum How to use checksums |
c5b1125ef23c5209328733cb9c58f2f2bc29d7d3d2dc92996a47732f496adf86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|