Skip to main content

MCP tool for calculating job worth (B班值不值)

Project description

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_week
  • annual_leave, paid_sick_leave, public_holidays
  • work_hours, commute_hours, rest_time
  • city_factor, work_environment, leadership, teamwork
  • has_shuttle, shuttle_factor
  • has_canteen, canteen_factor
  • degree_type, school_type, bachelor_type
  • work_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)

  1. 安装构建工具:
    • pip install -r requirements.txt
  2. 构建:
    • python -m build
  3. (推荐)先传 TestPyPI:
    • twine upload --repository testpypi dist/*
  4. 正式上传 PyPI(使用 API Token):
    • twine upload dist/*

Token 使用方式(推荐)

  • 用户名:__token__
  • 密码:pypi-xxxx(你的 API Token)

⚠️ 注意:

  • 包名必须唯一;若 worth-calculator-mcp 已被占用,需要改 setup.pyname
  • 每次发布需更新 version
  • 我不能替你注册账号或生成 token;你提供 token 后我可以继续代你执行上传命令

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

worth_calculator_mcp_39532-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

worth_calculator_mcp_39532-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file worth_calculator_mcp_39532-0.1.0.tar.gz.

File metadata

File hashes

Hashes for worth_calculator_mcp_39532-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25cd3804adbe31249f07b580a8a9305819c47ae8804978d77f04695795ea7c8a
MD5 2b5e06465a76d80eb6317e58464a8360
BLAKE2b-256 08fc5400a4e4ea651480f475b8a0c444d1b783eb72b7d1190624137853568f30

See more details on using hashes here.

File details

Details for the file worth_calculator_mcp_39532-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for worth_calculator_mcp_39532-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 231b7c48f3eb9d0a74a5651c927b625c3b6e3b543d4ae461543f36394c95543c
MD5 b3c13a7a26f8188357efcea7fa8da493
BLAKE2b-256 c5b1125ef23c5209328733cb9c58f2f2bc29d7d3d2dc92996a47732f496adf86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page