Wellness Planner

Wellness Planner

Integrates simulated health data and task management to provide energy-aware scheduling based on calculated readiness scores. It allows users to query health summaries, manage tasks, and generate optimized daily schedules through a local SQLite database.

Category
Visit Server

README

Wellness Planner

A local MCP agent that queries personal health data and provides energy-aware task scheduling.

Data Note

This project uses simulated data. Health data is seeded from data/seed_db.py into a SQLite database. There is no Apple Health integration — real health data is not imported or synced.

Running the Code

Prerequisites

  • Python 3.14+
  • uv for dependency management

Standalone Agent (no MCP server required)

Run the Plan-and-Execute agent loop locally:

uv run python mcp_server/agent.py [YYYY-MM-DD]
  • Uses yesterday's date if no date is given.
  • Reads from data/health.db and data/todo.json.
  • Prints a daily brief: sleep, activity, heart rate, readiness score, and proposed schedule.

MCP Server (for Cursor)

The MCP server is spawned by Cursor when needed — you do not start it manually in a separate terminal.

  1. Configure Cursor to use the local MCP server (e.g. .cursor/mcp.json):
{
  "mcpServers": {
    "wellness-planner": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/wellness_planner", "python", "mcp_server/server.py"]
    }
  }
}
  1. Replace /path/to/wellness_planner with your actual project path.
  2. Cursor will spawn the server and communicate over stdio.

Other Commands

Command Purpose
uv run python main.py Placeholder entry point
uv run python data/seed_db.py Seed data/health.db with simulated data

MCP Tools

When the server is connected, these tools are available:

  • get_health_summary — Aggregated sleep, activity, and heart rate for a date
  • calculate_readiness_score — 1–10 readiness score for task timing
  • query_raw_logs — Run read-only SQL against the health DB
  • get_tasks — Load tasks from todo.json
  • propose_schedule — Energy-aware schedule based on readiness and tasks
  • get_data_dictionary — Schema introspection: column names, types, and sample values
  • run_analysis — Execute a pandas/sqlite analysis script locally; returns stdout
  • generate_chart — Produce a self-contained Observable Plot HTML chart
  • get_insights — Retrieve previously saved findings from the Fact Store
  • save_insight — Persist a discovered insight so it isn't re-computed next session

Testing

There are two layers to test: the skills directly, and the MCP tools through Cursor chat.

1. Test skills directly (fast, no Cursor needed)

Phase 1 — Sandbox execution:

uv run python -c "
from skills.sandbox import run_python_analysis
r = run_python_analysis('''
df = pd.read_sql('SELECT date, total_hours FROM sleep_logs ORDER BY date DESC LIMIT 7', __import__('sqlite3').connect(DB_PATH))
print(df.to_string(index=False))
''')
print(r['output'])
"

Phase 2 — Schema discovery:

uv run python -c "
from skills.schema import get_data_dictionary
import json
print(json.dumps(get_data_dictionary(), indent=2))
"

Phase 3 — Chart generation:

uv run python -c "
import sqlite3
from skills.visualization import generate_chart
rows = sqlite3.connect('data/health.db').execute('SELECT date, total_hours FROM sleep_logs ORDER BY date').fetchall()
r = generate_chart([{'date': r[0], 'total_hours': r[1]} for r in rows], 'Sleep Trend', 'date', 'total_hours')
print(r)
"

Then open the url value in a browser to see the chart.

Phase 4 — Fact Store:

uv run python -c "
from skills.memory import save_insight, get_insights, clear_insights
save_insight('test_key', 'test value', 'manual test')
print(get_insights())
clear_insights()
"

2. Test end-to-end through Cursor (the real agentic loop)

Ask the agent questions in chat and watch the MCP tool calls fire in sequence:

  • Schema discovery: "What tables and columns are in the health database?"
  • Analysis: "What's the correlation between my step count and sleep quality over the last 30 days?"
    • Should trigger: get_insightsget_data_dictionaryrun_analysissave_insight
  • Chart: "Show me my resting heart rate trend as a chart."
    • Should trigger: run_analysisgenerate_chart → returns a file path
  • Memory: "What do you already know about my health patterns?"
    • Should trigger: get_insights and return stored findings without re-running anything

3. Standalone agent CLI

uv run python mcp_server/agent.py 2026-02-18

Tests the non-MCP path (summarizer + readiness + scheduling) and confirms nothing broke during the Phase 1–4 additions.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured