@daobrew/wellness-mcp 0.1.0 โ 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -58
- package/dist/src/client.d.ts +4 -0
- package/dist/src/client.js +5 -0
- package/dist/src/tools.js +18 -1
- package/package.json +17 -3
package/README.md
CHANGED
|
@@ -1,98 +1,158 @@
|
|
|
1
|
-
# @daobrew/wellness-mcp
|
|
1
|
+
# ๐ต @daobrew/wellness-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Your coding agent just learned to read your body.**
|
|
4
4
|
|
|
5
|
-
Reads your
|
|
5
|
+
Reads your biometrics (Apple Watch, Oura Ring), detects stress patterns, and plays therapeutic breathing music with binaural beats โ all without leaving your editor.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
No popups. No app switching. Just music that fades in when you need it. ๐ง
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## โก Quick Start
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
14
|
npm install -g @daobrew/wellness-mcp
|
|
11
15
|
npx daobrew-wellness-setup
|
|
12
16
|
```
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
Two questions. 30 seconds. Done.
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
Works with **Claude Code**, **Cursor**, **Windsurf**, and any MCP-compatible agent.
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
- **Maps to TCM patterns**: Wood/Tension, Fire/Overdrive, Earth/Stagnation, Metal/Constriction, Water/Depletion
|
|
20
|
-
- **Plays breathing music** with binaural beats (4Hz theta) and breath-paced volume modulation
|
|
21
|
-
- **Works inside Claude Code** โ no app switching, no popups
|
|
22
|
+
---
|
|
22
23
|
|
|
23
|
-
##
|
|
24
|
+
## ๐ง What It Does
|
|
24
25
|
|
|
25
|
-
**On-demand** โ ask anytime:
|
|
26
26
|
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
You're coding. โ Agent detects stress. โ Music fades in. โ You keep coding.
|
|
28
|
+
(real biometric data) (binaural beats (stress goes down)
|
|
29
|
+
+ breath pacing)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- ๐ **Detects stress** from real biometrics โ HRV, heart rate, sleep, activity
|
|
33
|
+
- ๐ฟ **Maps to 5 stress patterns** โ Wood/Tension, Fire/Overdrive, Earth/Stagnation, Metal/Constriction, Water/Depletion
|
|
34
|
+
- ๐ต **Plays genre-matched music** with 4Hz theta binaural beats and breath-paced volume swells
|
|
35
|
+
- ๐ **Zero interruption** โ ambient mode works silently in the background
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## ๐ฎ Usage
|
|
40
|
+
|
|
41
|
+
### On-demand โ ask anytime
|
|
30
42
|
```
|
|
43
|
+
/stress โ "You're in Pushing It mode โ Fire ยท Heart Qi restlessness (score 72)"
|
|
44
|
+
/breathe โ Lo-fi jazz fades in through your headphones ๐ง
|
|
45
|
+
/stop โ Music stops, session result logged
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Ambient โ hands-free stress relief
|
|
49
|
+
Enable once: *"enable ambient mode"*
|
|
50
|
+
|
|
51
|
+
From then on, your agent monitors stress at natural breakpoints. When it detects a spike + you have headphones in, therapeutic music fades in silently. You keep coding. Your HRV recovers. One line at the end:
|
|
52
|
+
|
|
53
|
+
> โช Session ended. HRV 28ms โ 41ms (+46%), HR 82 โ 71bpm.
|
|
54
|
+
|
|
55
|
+
Say *"disable wellness"* anytime to turn it off.
|
|
56
|
+
|
|
57
|
+
---
|
|
31
58
|
|
|
32
|
-
|
|
33
|
-
- Enable with: `"enable ambient mode"` in Claude Code
|
|
34
|
-
- Requires headphones (binaural beats need stereo separation)
|
|
35
|
-
- 30-minute cooldown between sessions
|
|
36
|
-
- Say `"disable wellness"` to turn off
|
|
59
|
+
## ๐ฑ Data Sources
|
|
37
60
|
|
|
38
|
-
|
|
61
|
+
| Source | What You Get | How to Connect |
|
|
62
|
+
|--------|-------------|----------------|
|
|
63
|
+
| โ **Apple Watch** | HRV, HR, steps, sleep, respiratory | Install [DaoBrew Health Sync](https://testflight.apple.com/join/6XTNFvv5) on iPhone |
|
|
64
|
+
| ๐ **Oura Ring** | HRV, HR, sleep, readiness, temp | Say *"connect oura"* in your agent |
|
|
65
|
+
| ๐ถ **None** | Step count only (demo mode) | Works out of the box |
|
|
39
66
|
|
|
40
|
-
|
|
41
|
-
|--------|------|-------|
|
|
42
|
-
| **Apple Watch** | HRV, HR, steps, sleep | Install [DaoBrew Health Sync](https://testflight.apple.com/join/6XTNFvv5) on iPhone |
|
|
43
|
-
| **Oura Ring** | HRV, HR, sleep, readiness | Say `"connect oura"` in Claude Code |
|
|
67
|
+
---
|
|
44
68
|
|
|
45
|
-
|
|
69
|
+
## ๐ต The Five Sounds
|
|
46
70
|
|
|
47
|
-
|
|
71
|
+
Each stress pattern gets its own genre, breathing rate, and vibe:
|
|
48
72
|
|
|
49
|
-
|
|
|
73
|
+
| Pattern | When You Feel... | Genre | BPM | What It Does |
|
|
74
|
+
|---------|-----------------|-------|-----|-------------|
|
|
75
|
+
| ๐ฒ Wood | Tense, tight, clenching | Ambient Downtempo | 6 | Releases tension, restores flow |
|
|
76
|
+
| ๐ฅ Fire | Wired, restless, can't focus | Lo-fi Chill Jazz | 5 | Cools the mind, settles racing thoughts |
|
|
77
|
+
| ๐ Earth | Sluggish, foggy, unmotivated | Acoustic Folk | 6 | Grounds and centers, wakes you up gently |
|
|
78
|
+
| โ๏ธ Metal | Shallow breathing, constricted | Nature + Pads | 7 | Opens the chest, deepens your breath |
|
|
79
|
+
| ๐ Water | Drained, depleted, running on empty | Drone Ambient | 5 | Deep rest, replenishes your reserves |
|
|
80
|
+
|
|
81
|
+
Every track layers a **4Hz theta binaural beat** (requires headphones) plus **breath-paced volume modulation** โ the music rises and falls to gently guide your breathing.
|
|
82
|
+
|
|
83
|
+
> ๐ก On your first session, the agent tells you: *"Breathe in as the music rises, out as it fades."* After that, your body remembers โ no voice prompts, just music.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## ๐ 9 Tools
|
|
88
|
+
|
|
89
|
+
| Tool | What It Does |
|
|
50
90
|
|------|-------------|
|
|
51
|
-
| `daobrew_get_wellness_state` |
|
|
52
|
-
| `daobrew_get_element_detail` |
|
|
53
|
-
| `daobrew_start_breathing_session` | Start
|
|
54
|
-
| `daobrew_get_session_result` | Post-session HRV
|
|
55
|
-
| `daobrew_get_session_history` | Recent
|
|
56
|
-
| `daobrew_stop_session` | Stop current
|
|
57
|
-
| `daobrew_status` | Server mode, headphones, preferences
|
|
58
|
-
| `daobrew_set_monitoring` | Configure ambient
|
|
59
|
-
| `daobrew_connect_source` | Connect
|
|
60
|
-
|
|
61
|
-
|
|
91
|
+
| `daobrew_get_wellness_state` | Yin/Yang balance + Five Element stress scores |
|
|
92
|
+
| `daobrew_get_element_detail` | Evidence breakdown for a specific pattern |
|
|
93
|
+
| `daobrew_start_breathing_session` | Start session with audio/text |
|
|
94
|
+
| `daobrew_get_session_result` | Post-session HRV changes |
|
|
95
|
+
| `daobrew_get_session_history` | Recent sessions and trends |
|
|
96
|
+
| `daobrew_stop_session` | Stop current session |
|
|
97
|
+
| `daobrew_status` | Server mode, headphones, preferences |
|
|
98
|
+
| `daobrew_set_monitoring` | Configure ambient, volume, cooldown |
|
|
99
|
+
| `daobrew_connect_source` | Connect Apple Watch or Oura Ring |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## ๐ Privacy
|
|
104
|
+
|
|
105
|
+
- Agent only sees **wellness scores** โ never raw health records
|
|
106
|
+
- Health tokens stored locally at `~/.daobrew/`
|
|
107
|
+
- Speaker blocklist prevents accidental playback without headphones
|
|
108
|
+
- Ambient mode requires explicit opt-in
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## ๐ Architecture
|
|
62
113
|
|
|
63
114
|
```
|
|
64
|
-
Apple Watch
|
|
65
|
-
โ
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
115
|
+
โ Apple Watch โโโ iPhone SDK โโโ DaoBrew Cloud โโโ TCM Scoring Engine
|
|
116
|
+
๐ Oura Ring โโโโโ OAuth API โโโ โ
|
|
117
|
+
MCP Server (local)
|
|
118
|
+
โ
|
|
119
|
+
Your Coding Agent
|
|
120
|
+
โ
|
|
121
|
+
afplay / mpv ๐ง
|
|
122
|
+
(binaural + breath modulation)
|
|
71
123
|
```
|
|
72
124
|
|
|
73
|
-
|
|
125
|
+
---
|
|
74
126
|
|
|
75
|
-
|
|
76
|
-
- Health data stored locally (`~/.daobrew/`)
|
|
77
|
-
- Headphone detection prevents accidental speaker playback
|
|
78
|
-
- Ambient mode requires explicit opt-in
|
|
127
|
+
## โ๏ธ Configuration
|
|
79
128
|
|
|
80
|
-
|
|
129
|
+
Talk to your agent:
|
|
130
|
+
- *"set volume to 0.5"*
|
|
131
|
+
- *"change cooldown to 15 minutes"*
|
|
132
|
+
- *"trust headphones"* (skip detection)
|
|
133
|
+
- *"disable wellness"*
|
|
81
134
|
|
|
82
|
-
|
|
135
|
+
Or edit `~/.daobrew/prefs.json`.
|
|
83
136
|
|
|
84
|
-
|
|
137
|
+
---
|
|
85
138
|
|
|
86
|
-
## Development
|
|
139
|
+
## ๐งโ๐ป Development
|
|
87
140
|
|
|
88
141
|
```bash
|
|
142
|
+
git clone <repo>
|
|
89
143
|
cd daobrew-wellness-mcp
|
|
90
|
-
npm install
|
|
91
|
-
npm run build
|
|
144
|
+
npm install && npm run build
|
|
92
145
|
npm test # 74 tests
|
|
93
146
|
npm run setup # interactive setup
|
|
94
147
|
```
|
|
95
148
|
|
|
96
|
-
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## ๐ License
|
|
97
152
|
|
|
98
153
|
MIT
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
*Built with ๐ต by [DaoBrew](https://daobrew.com).*
|
|
158
|
+
*Take a breath. Your code can wait.*
|
package/dist/src/client.d.ts
CHANGED
package/dist/src/client.js
CHANGED
package/dist/src/tools.js
CHANGED
|
@@ -373,10 +373,27 @@ async function handleToolCall(name, args, isMock, _apiKey, isDemo = false, clien
|
|
|
373
373
|
case "daobrew_connect_source": {
|
|
374
374
|
const source = args.source;
|
|
375
375
|
if (source === "apple_watch") {
|
|
376
|
+
// Generate pairing code if connected to real backend
|
|
377
|
+
if (!isMock && client) {
|
|
378
|
+
try {
|
|
379
|
+
const pairing = await client.createPairingCode();
|
|
380
|
+
return {
|
|
381
|
+
status: "pairing_started",
|
|
382
|
+
source: "apple_watch",
|
|
383
|
+
pairing_code: pairing.code,
|
|
384
|
+
expires_in_seconds: pairing.expires_in_seconds,
|
|
385
|
+
install_url: "https://testflight.apple.com/join/6XTNFvv5",
|
|
386
|
+
instructions: `1. Install DaoBrew Health Sync on your iPhone (TestFlight link above)\n2. Open the app and tap "Pair with Claude Code"\n3. Enter code: ${pairing.code}\n4. Grant HealthKit permissions when prompted\n5. Health data will sync automatically within 1-2 minutes`,
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
catch {
|
|
390
|
+
// Fall through to static response if backend unavailable
|
|
391
|
+
}
|
|
392
|
+
}
|
|
376
393
|
return {
|
|
377
394
|
status: "install_required",
|
|
378
395
|
source: "apple_watch",
|
|
379
|
-
install_url: "https://
|
|
396
|
+
install_url: "https://testflight.apple.com/join/6XTNFvv5",
|
|
380
397
|
instructions: "Install DaoBrew Health Sync on your iPhone via TestFlight. It reads your Apple Watch data and syncs it to DaoBrew.",
|
|
381
398
|
};
|
|
382
399
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daobrew/wellness-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Wellness MCP server โ biometric stress detection & recovery for AI agents",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"daobrew-wellness-mcp": "dist/src/index.js",
|
|
8
8
|
"daobrew-wellness-setup": "dist/src/setup-cli.js"
|
|
9
9
|
},
|
|
10
|
-
"files": [
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/",
|
|
12
|
+
"audio/",
|
|
13
|
+
"SKILL.md",
|
|
14
|
+
"README.md",
|
|
15
|
+
"src/setup-cli.js"
|
|
16
|
+
],
|
|
11
17
|
"scripts": {
|
|
12
18
|
"build": "tsc",
|
|
13
19
|
"setup": "node dist/src/setup-cli.js",
|
|
@@ -16,7 +22,15 @@
|
|
|
16
22
|
"postinstall": "echo '\\n Run: npx daobrew-wellness-setup\\n to complete DaoBrew configuration.\\n'",
|
|
17
23
|
"test": "node --test --test-concurrency=1 dist/tests/mock.test.js dist/tests/preferences.test.js dist/tests/headphones.test.js dist/tests/session.test.js dist/tests/cooldown.test.js dist/tests/cache.test.js dist/tests/e2e.test.js dist/tests/audio.test.js dist/tests/guards.test.js dist/tests/client.test.js dist/tests/sync.test.js"
|
|
18
24
|
},
|
|
19
|
-
"keywords": [
|
|
25
|
+
"keywords": [
|
|
26
|
+
"mcp",
|
|
27
|
+
"wellness",
|
|
28
|
+
"health",
|
|
29
|
+
"biometrics",
|
|
30
|
+
"tcm",
|
|
31
|
+
"stress",
|
|
32
|
+
"breathing"
|
|
33
|
+
],
|
|
20
34
|
"license": "MIT",
|
|
21
35
|
"dependencies": {
|
|
22
36
|
"@modelcontextprotocol/sdk": "^1.29.0"
|