{
  "markdown": "<!-- delx-wellness header v2 -->\n<h1 align=\"center\">Eight Sleep MCP</h1>\n\n<h3 align=\"center\">\n  Give your AI agent your Eight Sleep sleep trends, temperature program and alarms &mdash; and optionally let it tune the pod overnight.<br>\n  Local-first MCP server &mdash; <strong>credentials never leave your machine</strong>.\n</h3>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/eight-sleep-mcp-unofficial\"><img src=\"https://img.shields.io/npm/v/eight-sleep-mcp-unofficial?style=for-the-badge&labelColor=0F172A&color=10B981&logo=npm&logoColor=white\" alt=\"npm version\" /></a>\n  <a href=\"https://www.npmjs.com/package/eight-sleep-mcp-unofficial\"><img src=\"https://img.shields.io/npm/dm/eight-sleep-mcp-unofficial?style=for-the-badge&labelColor=0F172A&color=0EA5A3&logo=npm&logoColor=white\" alt=\"npm downloads\" /></a>\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/LICENSE-MIT-22C55E?style=for-the-badge&labelColor=0F172A\" alt=\"License MIT\" /></a>\n  <a href=\"https://wellness.delx.ai/connectors/eight-sleep\"><img src=\"https://img.shields.io/badge/SITE-wellness.delx.ai-0EA5A3?style=for-the-badge&labelColor=0F172A\" alt=\"Site\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/davidmosiah/eight-sleep-mcp/stargazers\"><img src=\"https://img.shields.io/github/stars/davidmosiah/eight-sleep-mcp?style=for-the-badge&labelColor=0F172A&color=FBBF24&logo=github\" alt=\"GitHub stars\" /></a>\n  <a href=\"https://modelcontextprotocol.io\"><img src=\"https://img.shields.io/badge/BUILT_FOR-MCP-7C3AED?style=for-the-badge&labelColor=0F172A\" alt=\"Built for MCP\" /></a>\n  <a href=\"https://github.com/davidmosiah/delx-wellness-hermes\"><img src=\"https://img.shields.io/badge/HERMES-one--command_setup-10B981?style=for-the-badge&labelColor=0F172A\" alt=\"Hermes one-command setup\" /></a>\n  <a href=\"https://www.eightsleep.com/\"><img src=\"https://img.shields.io/badge/EIGHT_SLEEP-1B1B1B?style=for-the-badge&labelColor=0F172A&logoColor=white\" alt=\"Eight Sleep\" /></a>\n</p>\n\n> ⚡ **One-command install** with [Delx Wellness for Hermes](https://github.com/davidmosiah/delx-wellness-hermes):\n> `npx -y delx-wellness-hermes setup` &mdash; preconfigures this connector alongside the rest of the wellness catalog.\n>\n> Or wire it standalone into Claude Desktop / Cursor / OpenClaw / any MCP client &mdash; see the install section below.\n\n---\n\n## HTTP (v2 stateless)\n\nDefault is **stdio**. Optional Streamable HTTP — no session id, JSON responses, loopback only:\n\n```bash\nnpx -y eight-sleep-mcp-unofficial --http\n# GET  http://127.0.0.1:3000/health\n# POST http://127.0.0.1:3000/mcp   (sessionless)\n```\n\nEnv: `EIGHT_SLEEP_MCP_HOST`, `EIGHT_SLEEP_MCP_PORT`, `EIGHT_SLEEP_MCP_TRANSPORT=http`.\n\n\n<!-- /delx-wellness header v2 -->\n\n**Local-first MCP server that connects AI agents to your Eight Sleep pod &mdash; sleep sessions, temperature program, alarms, adjustable base &mdash; with an explicit mutation gate for write actions.**\n\n> **Unofficial project.** Not affiliated with, endorsed by, or supported by Eight Sleep, Inc. Eight Sleep is a trademark of its respective owner. Use this only with your own Eight Sleep account.\n\nEight Sleep does not publish a stable public API. This package talks to the same private endpoints (`auth-api.8slp.net`, `client-api.8slp.net`, `app-api.8slp.net`) the mobile app uses, following the path well documented by upstream community projects ([`lukas-clarke/eight_sleep`](https://github.com/lukas-clarke/eight_sleep), [`mezz64/pyEight`](https://github.com/mezz64/pyEight), [`steipete/eightctl`](https://github.com/steipete/eightctl)).\n\nPart of [Delx Wellness](https://github.com/davidmosiah/delx-wellness) &mdash; a registry of local-first wellness MCP connectors.\n\n> If this connector helps your agent workflow, please star the repo. Stars make the project easier for other AI builders to discover and help Delx keep shipping local-first wellness infrastructure.\n\n## Why this exists\n\nEight Sleep ships great sleep telemetry &mdash; nightly score, presence intervals, tnt, smart-temperature schedule &mdash; but it lives inside a closed iOS/Android app with no public API. Bringing it into your agent today means reverse-engineering OAuth, juggling token refresh, normalizing endpoint shapes, and handling timezone quirks.\n\nThis package does all of that locally, exposes Eight Sleep through the Model Context Protocol, and lets any MCP-compatible agent read your sleep context (and write pod commands, if you opt in) with one config snippet. Credentials and tokens stay on your machine.\n\n## Setup in 60 seconds\n\n```bash\nnpx -y eight-sleep-mcp-unofficial setup   # interactive: email + password\nnpx -y eight-sleep-mcp-unofficial login   # persists the auth token\nnpx -y eight-sleep-mcp-unofficial doctor  # verifies you're ready\n```\n\nThen add this to your MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"eight_sleep\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"eight-sleep-mcp-unofficial\"]\n    }\n  }\n}\n```\n\nFor Claude Desktop, run `setup --client claude` and the snippet is written for you.\n\n## Try it with your agent\n\nThree things to ask first:\n\n```text\nUse eight_sleep_connection_status to check setup, then run eight_sleep_get_me.\nTell me what device you find.\n```\n\n```text\nCall eight_sleep_get_trends for the last 7 days, response_format=json.\nWhat's my best night and worst night, and why?\n```\n\n```text\nCall eight_sleep_get_temperature. Summarize the current smart schedule\n(bedtime, initial sleep, final sleep) and tell me if I should tune it.\n```\n\n## Data availability\n\nThis package talks to the Eight Sleep mobile-app API. It does **not** access continuous biometric sensor streams or BLE.\n\n| Data | Tool | Source |\n|------|------|--------|\n| User & device | `eight_sleep_get_me`, `eight_sleep_get_user`, `eight_sleep_get_current_device` | `client-api.8slp.net /users/...` |\n| Temperature program | `eight_sleep_get_temperature` | `app-api.8slp.net /v1/users/{id}/temperature` |\n| Sleep trends | `eight_sleep_get_trends` | `client-api.8slp.net /users/{id}/trends` |\n| Alarms | `eight_sleep_get_alarms` | `app-api.8slp.net /v2/users/{id}/alarms` |\n| Adjustable base | `eight_sleep_get_base` | `app-api.8slp.net /v1/users/{id}/base` |\n\n### Workflow tools\n\n| Tool | What it does |\n|------|------|\n| `eight_sleep_nightly_summary` | Multi-night summary: best night, worst night, mean score, nights under 70 / over 85 — one call instead of post-processing raw `get_trends`. |\n| `eight_sleep_wellness_context` | Returns a normalized `delx-wellness-context/v1` payload so other Delx Wellness tools (Nourish, Exercise Catalog, Telegram coaches) can read sleep context without knowing the Eight Sleep API. |\n\n## Mutation tools (write gate)\n\nOff by default. To enable, re-run setup with `--allow-mutations` or enable `EIGHT_SLEEP_ALLOW_MUTATIONS`. Do not put the assignment in default MCP snippets.\n\n| Action | Tool |\n|------|------|\n| Set heating level | `eight_sleep_set_temperature` |\n| Turn side on/off | `eight_sleep_set_side` |\n| Toggle away mode | `eight_sleep_set_away_mode` |\n| Snooze alarm | `eight_sleep_snooze_alarm` |\n| Dismiss alarm | `eight_sleep_dismiss_alarm` |\n\nWhen the gate is off, mutation tools return an explicit `mutations disabled` error so agents can detect it and ask the user to opt in.\n\n## Privacy\n\n- Credentials stored in `~/.eight-sleep-mcp/config.json` with `chmod 600`.\n- Auth tokens stored in `~/.eight-sleep-mcp/tokens.json` with `chmod 600`.\n- Sensitive fields (email, device serial, shipping address, payment last-four) are redacted from tool responses by default.\n- `EIGHT_SLEEP_PRIVACY_MODE`:\n  - `summary` — minimal fields only.\n  - `structured` (default) — preserves complete nested sleep fields and future upstream additions while redacting identifiers.\n  - `raw` — full upstream payload (debugging only).\n\nTrend requests validate real `YYYY-MM-DD` dates, range order and IANA timezone names before any network call.\n\nCall `eight_sleep_privacy_audit` at any time to inspect the current posture without exposing secrets.\n\n## Environment variables\n\n| Var | Purpose |\n|-----|---------|\n| `EIGHT_SLEEP_EMAIL` | Account email. |\n| `EIGHT_SLEEP_PASSWORD` | Account password. |\n| `EIGHT_SLEEP_ALLOW_MUTATIONS` | Enable write tools (keep unset in default snippets). |\n| `EIGHT_SLEEP_PRIVACY_MODE` | `summary` / `structured` / `raw`. |\n| `EIGHT_SLEEP_CACHE` | `sqlite` to enable on-disk response cache. |\n| `EIGHT_SLEEP_TOKEN_PATH` | Override token storage path. |\n| `EIGHT_SLEEP_CLIENT_ID` / `EIGHT_SLEEP_CLIENT_SECRET` | Override Android-app credential defaults (advanced). |\n\n## Stability\n\nEight Sleep changes mobile-app endpoints without notice. This connector tracks upstream community projects (`lukas-clarke/eight_sleep`, `steipete/eightctl`, `mezz64/pyEight`) for breakage signals. If a tool starts returning 4xx unexpectedly, check those repos and the project [issues](https://github.com/davidmosiah/eight-sleep-mcp/issues) for the latest known-good shape.\n\n## Credits\n\n- [`lukas-clarke/eight_sleep`](https://github.com/lukas-clarke/eight_sleep) — Home Assistant integration, most current reference for V2 endpoints.\n- [`mezz64/pyEight`](https://github.com/mezz64/pyEight) — original Python library; auth + endpoint discovery.\n- [`steipete/eightctl`](https://github.com/steipete/eightctl) — CLI variant with extracted client credentials.\n- [`LiamSnow/opensleep`](https://github.com/LiamSnow/opensleep) — full open-source firmware (deeper than this MCP goes).\n\n## 📧 Contact & Support\n\n- 📨 **support@delx.ai** — general questions, integration help, partnerships\n- 🐛 **Bug reports / feature requests** — [GitHub Issues](https://github.com/davidmosiah/eight-sleep-mcp/issues)\n- 🐦 **Updates** — [@delx369](https://x.com/delx369) on X\n- 🌐 **Site** — [wellness.delx.ai](https://wellness.delx.ai)\n\n\n## License\n\nMIT &mdash; see [LICENSE](LICENSE).\n\n## Skill or MCP\n\nSame package, two doors. MCP registers tools on stdio/HTTP. The [skill](skill/SKILL.md) can drive the **same** tools through the CLI when the client has no MCP:\n\n```bash\nnpx -y eight-sleep-mcp-unofficial call eight_sleep_connection_status --json '{}'\n```\n\nCopy `skill/SKILL.md` into your agent skills dir.\n",
  "bytes": 10147,
  "sha": "6e8515090e4597999de6d3a5cd90e134f729619609337baea564c39dae54c302",
  "repo_slug": "davidmosiah/eight-sleep-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_davidmosiah_eight_sleep_mcp_ef2daf7a/readme"
}