MCP server for Sleepon sleep tracker – provides sleep data analysis tools for AI assistants like Claude
Project description
Sleepon MCP Server
An MCP (Model Context Protocol) server that connects AI assistants like Claude to your Sleepon sleep tracker data. Ask your AI to analyze your sleep quality, compare nights, generate reports, and get personalized improvement tips — all powered by your real sleep data.
Features
- 🛏️ Daily Sleep Summary — sleep score, efficiency, duration, and stage breakdown
- 📊 Detailed Segments — per-segment heart rate, blood oxygen (SpO2), HRV, movement, and ODI
- 📅 Sleep Calendar — see which days have data over a date range
- 📈 Trend Analysis — track how your sleep metrics change over time
- 🏷️ Sleep Labels — view user-added tags (e.g. "exercised", "drank coffee") and notes
- 🤖 Built-in Prompts — one-click deep analysis, comparison, reports, and improvement tips
Quick Start
1. Install
# Using uvx (recommended, auto-downloads without install)
uvx sleepon-mcp
# Or install via pip
pip install sleepon-mcp
2. Configure Claude Desktop
Add the following to your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"sleepon": {
"command": "uvx",
"args": ["sleepon-mcp"],
"env": {
"SLEEPON_USERNAME": "your-sleepon-email@example.com",
"SLEEPON_PASSWORD": "your-password"
}
}
}
}
3. Restart Claude Desktop
After saving the config, restart Claude Desktop. You'll see the Sleepon tools available in the MCP tools menu (🔨 icon).
Available Tools
| Tool | Description |
|---|---|
login_and_check_status |
Verify that your credentials are correct and the API is reachable |
get_user_profile |
Get your Sleepon user profile information |
get_daily_sleep_summary |
Get complete sleep summary for a specific date |
get_detailed_sleep_segments |
Get detailed segment data (heart rate, SpO2, HRV, sleep stages) |
get_sleep_calendar |
View which days have data in a date range |
get_sleep_trend |
Get sleep metric trends over a date range |
get_sleep_labels |
Get user-added sleep labels and notes for a date |
get_latest_data_time |
Find the most recent data sync timestamp |
Built-in Prompts
These prompts guide the AI through multi-step analysis workflows:
| Prompt | Description |
|---|---|
analyze_sleep |
Comprehensive analysis of a single night (summary + segments + labels) |
compare_sleep |
Side-by-side comparison of two nights with tables |
sleep_report |
Full report for a date range (trends, best/worst days, health alerts) |
sleep_improvement_tips |
Personalized recommendations based on your recent data |
Example Conversations
- "Analyze my sleep from last night"
- "Compare my sleep on Monday vs Friday"
- "Generate a sleep report for the past month"
- "How can I improve my sleep quality?"
Development
# Clone the repo
git clone https://github.com/sleepon-official/sleepon_mcp.git
cd sleepon_mcp
# Install in development mode
pip install -e .
# Test with MCP Inspector
npx -y @modelcontextprotocol/inspector sleepon-mcp
Environment Variables
| Variable | Required | Description |
|---|---|---|
SLEEPON_USERNAME |
Yes | Your Sleepon account email |
SLEEPON_PASSWORD |
Yes | Your Sleepon account password |
Requirements
- Python >= 3.10
- A Sleepon account with a paired sleep tracker
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sleepon_mcp-0.1.0.tar.gz.
File metadata
- Download URL: sleepon_mcp-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3931b79baf43935452bec28f78dff3bc253145dc7d167cc4790119e3bcc9ba76
|
|
| MD5 |
2b1f0d27098e12f492739da9da13e8e0
|
|
| BLAKE2b-256 |
6a7d5a188589c411d52a3583a8e12b5846dbfe2f7475caede8408461524c8066
|
File details
Details for the file sleepon_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sleepon_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
358ccedf078f86889db824fd883d78a8dfcf588a13e20a42e05e14fb2ae2b8ae
|
|
| MD5 |
76a0ef509ceea0f8a581add392b8e99c
|
|
| BLAKE2b-256 |
c20e865fd566ad16cce67ba166cdef68cee5d7b8a78a61067cfc9ec5e1ac172d
|