# evangstav
## 基本信息
- Slug: `evangstav-personal-mcp`
- Source: modelscope
- Publisher: @evangstav/personal-mcp
- Categories: health-and-wellness / fitness-tracking / note-taking
- Hosted: No
- License: Unknown
- Source URL: https://www.modelscope.cn/mcp/servers/@evangstav/personal-mcp
## 简介
暂无描述。
## MCP Server 详情

# 个人MCP服务器

[![smithery 徽章](https://smithery.ai/badge/personal-mcp)](https://smithery.ai/server/personal-mcp)

这是一个用于个人健康和福祉跟踪的模型上下文协议（Model Context Protocol, MCP）服务器。该服务器提供了工具和资源，用于跟踪锻炼、营养和日常日志条目，并通过Claude集成提供AI辅助分析。

## 功能

### 锻炼跟踪
- 记录练习、组数和次数
- 跟踪感知努力程度和锻炼后的感受
- 考虑康复因素计算安全训练重量
- 历史锻炼分析
- 肩部康复支持
- 基于RPE（主观疲劳度评分）的负荷管理

### 营养管理
- 记录餐食和个人食物项目
- 跟踪蛋白质和卡路里摄入量
- 监测饥饿感和满足感水平
- 每日营养目标及进度
- 锻炼前后营养跟踪
- 餐时分析

### 日记系统
- 每日条目，包括心情和能量跟踪
- 睡眠质量和压力水平监测
- 基于标签的组织
- 趋势分析和洞察
- 锻炼、营养与福祉之间的相关性分析
- 心情和能量水平模式识别

## 安装

### 通过Smithery安装

要通过[Smithery](https://smithery.ai/server/personal-mcp)自动为Claude Desktop安装个人健康追踪器：

bash
npx -y @smithery/cli install personal-mcp --client claude


### 先决条件
- Python 3.10或更高版本
- pip 或 uv 包管理器

### 使用pip
bash
pip install -e .


### 开发环境安装
bash
git clone https://github.com/yourusername/personal-mcp.git
cd personal-mcp
uv pip install -e ".[dev]"


## 使用

### 基本服务器
使用默认设置运行服务器：
bash
personal-mcp run


### 开发模式
开发时启用热重载运行：
bash
personal-mcp dev


### MCP检查器
使用MCP检查器进行调试：
bash
personal-mcp inspect


### Claude Desktop集成
安装到Claude Desktop：
bash
personal-mcp install --claude-desktop


### 配置选项
bash
personal-mcp --help


可用选项：
- `--name`: 设置服务器名称 (默认: "Personal Assistant")
- `--db-path`: 指定数据库位置
- `--dev`: 启用开发模式
- `--inspect`: 使用MCP Inspector运行
- `-v, --verbose`: 启用详细日志记录

## MCP工具

### 锻炼工具
python
# 记录一次锻炼
workout = {
    "date": "2024-01-07",
    "exercises": [
        {
            "name": "卧推",
            "sets": [
                {"weight": 135, "reps": 10, "rpe": 7}
            ]
        }
    ],
    "perceived_effort": 8
}

# 计算训练重量
params = {
    "exercise": "卧推",
    "base_weight": 200,
    "days_since_surgery": 90,
    "recent_pain_level": 2,
    "recent_rpe": 7
}


### 营养工具
python
# 记录一餐
meal = {
    "meal_type": "午餐",
    "foods": [
        {
            "name": "鸡胸肉",
            "amount": 200,
            "unit": "g",
            "protein": 46,
            "calories": 330
        }
    ],
    "hunger_level": 7,
    "satisfaction_level": 8
}

# 检查营养目标
targets = await mcp.call_tool("check_nutrition_targets", {"date": "2024-01-07"})


### 日记工具
python
# 创建日记条目
entry = {
    "entry_type": "daily",
    "content": "今天锻炼很棒...",
    "mood": 8,
    "energy": 7,
    "sleep_quality": 8,
    "stress_level": 3,
    "tags": ["锻炼", "恢复"]
}

# 分析条目
analysis = await mcp.call_tool("analyze_journal_entries", {
    "start_date": "2024-01-01",
    "end_date": "2024-01-07"
})


## 开发

### 运行测试
bash
# 运行所有测试
pytest

# 带覆盖率运行
pytest --cov=personal_mcp

# 运行特定测试文件
pytest tests/test_database.py


### 代码质量
bash
# 格式化代码
black src/personal_mcp

# 代码检查
ruff check src/personal_mcp

# 类型检查
mypy src/personal_mcp


## 项目结构

personal-mcp/
├── src/
│   └── personal_mcp/
│       ├── tools/
│       │   ├── workout.py
│       │   ├── nutrition.py
│       │   └── journal.py
│       ├── database.py
│       ├── models.py
│       ├── resources.py
│       ├── prompts.py
│       └── server.py
├── tests/
│   ├── test_database.py
│   ├── test_server.py
│   └── test_cli.py
├── pyproject.toml
└── mcp.json## 贡献
1. Fork 仓库
2. 创建一个功能分支
3. 提交你的更改
4. 推送到该分支
5. 创建一个 Pull Request

## 许可证
本项目采用 MIT 许可证 - 详情请参阅 LICENSE 文件。

