个人健康追踪器
STDIO个人健康跟踪与AI辅助分析服务器
个人健康跟踪与AI辅助分析服务器
A Model Context Protocol server for personal health and well-being tracking. This server provides tools and resources for tracking workouts, nutrition, and daily journal entries, with AI-assisted analysis through Claude integration.
To install Personal Health Tracker for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install personal-mcp --client claude
pip install -e .
git clone https://github.com/yourusername/personal-mcp.git cd personal-mcp uv pip install -e ".[dev]"
Run the server with default settings:
personal-mcp run
Run with hot reloading for development:
personal-mcp dev
Debug with the MCP Inspector:
personal-mcp inspect
Install to Claude Desktop:
personal-mcp install --claude-desktop
personal-mcp --help
Available options:
--name
: Set server name (default: "Personal Assistant")--db-path
: Specify database location--dev
: Enable development mode--inspect
: Run with MCP Inspector-v, --verbose
: Enable verbose logging# Log a workout workout = { "date": "2024-01-07", "exercises": [ { "name": "Bench Press", "sets": [ {"weight": 135, "reps": 10, "rpe": 7} ] } ], "perceived_effort": 8 } # Calculate training weights params = { "exercise": "Bench Press", "base_weight": 200, "days_since_surgery": 90, "recent_pain_level": 2, "recent_rpe": 7 }
# Log a meal meal = { "meal_type": "lunch", "foods": [ { "name": "Chicken Breast", "amount": 200, "unit": "g", "protein": 46, "calories": 330 } ], "hunger_level": 7, "satisfaction_level": 8 } # Check nutrition targets targets = await mcp.call_tool("check_nutrition_targets", {"date": "2024-01-07"})
# Create a journal entry entry = { "entry_type": "daily", "content": "Great workout today...", "mood": 8, "energy": 7, "sleep_quality": 8, "stress_level": 3, "tags": ["workout", "recovery"] } # Analyze entries analysis = await mcp.call_tool("analyze_journal_entries", { "start_date": "2024-01-01", "end_date": "2024-01-07" })
# Run all tests pytest # Run with coverage pytest --cov=personal_mcp # Run specific test file pytest tests/test_database.py
# Format code black src/personal_mcp # Lint code ruff check src/personal_mcp # Type checking 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
This project is licensed under the MIT License - see the LICENSE file for details.