Eight Sleep MCP
A local-first MCP server that gives AI agents read access to your Eight Sleep pod data (and opt-in write control), with credentials kept on your machine.
Check setup & posture:
eight_sleep_connection_status,eight_sleep_privacy_audit,eight_sleep_cache_status,eight_sleep_capabilities,eight_sleep_data_inventory,eight_sleep_agent_manifest— all local, no API calls, no secrets exposed.Read account & device:
eight_sleep_get_me,eight_sleep_get_user,eight_sleep_get_current_device(bed side: solo/left/right).Read pod state:
eight_sleep_get_temperature(heating level, smart schedule, side on/off),eight_sleep_get_alarms(list + next alarm),eight_sleep_get_base(leg/torso angle, preset).Read sleep data:
eight_sleep_get_trendsfor a validated date range + IANA timezone (nightly sessions and scores).Workflow analytics:
eight_sleep_nightly_summary(best/worst night, mean score, nights under 70 / over 85),eight_sleep_efficiency(time in bed vs asleep, efficiency bands, observations),eight_sleep_temperature_trend(schedule stats + score correlation when 3+ nights support |r| ≥ 0.5).Cross-tool context:
eight_sleep_wellness_contextemits a normalizeddelx-wellness-context/v1payload for other Delx Wellness tools.Shared wellness profile:
eight_sleep_profile_get,eight_sleep_profile_update(credential-shaped keys rejected),eight_sleep_onboarding(11 questions, en/pt-BR).Write actions (gated):
eight_sleep_set_temperature,eight_sleep_set_side,eight_sleep_set_away_mode,eight_sleep_snooze_alarm,eight_sleep_dismiss_alarm— requireexplicit_user_intent: trueandEIGHT_SLEEP_ALLOW_MUTATIONS=true; otherwise return an explicit "mutations disabled" error.Local cleanup:
eight_sleep_logoutdeletes the local token file (requires explicit user intent).Privacy controls: per-call or env
privacy_mode(summary/structured/raw), with identifiers redacted by default.Transports: stdio by default, optional stateless Streamable HTTP on loopback; also callable via CLI for skill-based clients.
Allows AI agents to read and optionally control Eight Sleep pod data such as sleep trends, temperature program, alarms, and adjustable base.
⚡ One-command install with Delx Wellness for Hermes:
npx -y delx-wellness-hermes setup— preconfigures this connector alongside the rest of the wellness catalog.Or wire it standalone into Claude Desktop / Cursor / OpenClaw / any MCP client — see the install section below.
HTTP (v2 stateless)
Default is stdio. Optional Streamable HTTP — no session id, JSON responses, loopback only:
npx -y eight-sleep-mcp-unofficial --http
# GET http://127.0.0.1:3000/health
# POST http://127.0.0.1:3000/mcp (sessionless)Env: EIGHT_SLEEP_MCP_HOST, EIGHT_SLEEP_MCP_PORT, EIGHT_SLEEP_MCP_TRANSPORT=http.
Local-first MCP server that connects AI agents to your Eight Sleep pod — sleep sessions, temperature program, alarms, adjustable base — with an explicit mutation gate for write actions.
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.
Eight 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, mezz64/pyEight, steipete/eightctl).
Part of Delx Wellness — a registry of local-first wellness MCP connectors.
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.
Related MCP server: Polar MCP
Why this exists
Eight Sleep ships great sleep telemetry — nightly score, presence intervals, tnt, smart-temperature schedule — 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.
This 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.
Setup in 60 seconds
npx -y eight-sleep-mcp-unofficial setup # interactive: email + password
npx -y eight-sleep-mcp-unofficial login # persists the auth token
npx -y eight-sleep-mcp-unofficial doctor # verifies you're readyThen add this to your MCP client config:
{
"mcpServers": {
"eight_sleep": {
"command": "npx",
"args": ["-y", "eight-sleep-mcp-unofficial"]
}
}
}For Claude Desktop, run setup --client claude and the snippet is written for you.
Try it with your agent
Three things to ask first:
Use eight_sleep_connection_status to check setup, then run eight_sleep_get_me.
Tell me what device you find.Call eight_sleep_get_trends for the last 7 days, response_format=json.
What's my best night and worst night, and why?Call eight_sleep_get_temperature. Summarize the current smart schedule
(bedtime, initial sleep, final sleep) and tell me if I should tune it.Data availability
This package talks to the Eight Sleep mobile-app API. It does not access continuous biometric sensor streams or BLE.
Data | Tool | Source |
User & device |
|
|
Temperature program |
|
|
Sleep trends |
|
|
Alarms |
|
|
Adjustable base |
|
|
Workflow tools
Tool | What it does |
| Multi-night summary: best night, worst night, mean score, nights under 70 / over 85 — one call instead of post-processing raw |
| Returns a normalized |
Mutation tools (write gate)
Off 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.
Action | Tool |
Set heating level |
|
Turn side on/off |
|
Toggle away mode |
|
Snooze alarm |
|
Dismiss alarm |
|
When the gate is off, mutation tools return an explicit mutations disabled error so agents can detect it and ask the user to opt in.
Privacy
Credentials stored in
~/.eight-sleep-mcp/config.jsonwithchmod 600.Auth tokens stored in
~/.eight-sleep-mcp/tokens.jsonwithchmod 600.Sensitive fields (email, device serial, shipping address, payment last-four) are redacted from tool responses by default.
EIGHT_SLEEP_PRIVACY_MODE:summary— minimal fields only.structured(default) — preserves complete nested sleep fields and future upstream additions while redacting identifiers.raw— full upstream payload (debugging only).
Trend requests validate real YYYY-MM-DD dates, range order and IANA timezone names before any network call.
Call eight_sleep_privacy_audit at any time to inspect the current posture without exposing secrets.
Environment variables
Var | Purpose |
| Account email. |
| Account password. |
| Enable write tools (keep unset in default snippets). |
|
|
| Legacy compatibility key; authenticated response caching is disabled and this value is ignored. |
| Override token storage path. |
| Override Android-app credential defaults (advanced). |
Stability
Eight 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 for the latest known-good shape.
Credits
lukas-clarke/eight_sleep— Home Assistant integration, most current reference for V2 endpoints.mezz64/pyEight— original Python library; auth + endpoint discovery.steipete/eightctl— CLI variant with extracted client credentials.LiamSnow/opensleep— full open-source firmware (deeper than this MCP goes).
📧 Contact & Support
📨 support@delx.ai — general questions, integration help, partnerships
🐛 Bug reports / feature requests — GitHub Issues
🐦 Updates — @delx369 on X
🌐 Site — wellness.delx.ai
License
MIT — see LICENSE.
Skill or MCP
Same package, two doors. MCP registers tools on stdio/HTTP. The skill can drive the same tools through the CLI when the client has no MCP:
npx -y eight-sleep-mcp-unofficial call eight_sleep_connection_status --json '{}'Copy skill/SKILL.md into your agent skills dir.
Available Tools
26 toolseight_sleep_agent_manifestEight Sleep Agent ManifestBRead-onlyIdempotent
Machine-readable install, runtime and client guidance for AI agents operating the Eight Sleep MCP.
Inputs: client, response_format. Returns: auth, links, client, hermes, +9 more
eight_sleep_cache_statusEight Sleep Cache StatusARead-onlyIdempotent
Show optional local SQLite cache status. Enable with EIGHT_SLEEP_CACHE=sqlite or EIGHT_SLEEP_CACHE=true.
Inputs: response_format. Returns: path, enabled, entries, newest_cached_at
eight_sleep_capabilitiesEight Sleep MCP CapabilitiesARead-onlyIdempotent
Explain supported Eight Sleep data, mutation gate, privacy modes, and project links. Does not call Eight Sleep or expose secrets.
Inputs: response_format. Returns: links, creator, project, mcp_name, +8 more
eight_sleep_connection_statusEight Sleep Connection StatusARead-onlyIdempotent
Check env, local config, token file, Node version, privacy mode and mutation gate. Does not call Eight Sleep or expose secrets.
Inputs: client, response_format. Returns: ok, node, cache, token, +8 more
eight_sleep_data_inventoryEight Sleep Data InventoryARead-onlyIdempotent
Inventory supported Eight Sleep domains, mutation tools, and recommended first calls. Does not call Eight Sleep APIs.
Inputs: response_format. Returns: kind, links, notes, source, +11 more
eight_sleep_dismiss_alarmDismiss Eight Sleep AlarmADestructive
Dismiss an actively ringing alarm. Gated by explicit_user_intent: true and EIGHT_SLEEP_ALLOW_MUTATIONS=true.
Inputs: alarm_id (required), user_id, response_format, explicit_user_intent. Returns: ok, data, note, method, +1 more
eight_sleep_efficiencyEight Sleep Sleep EfficiencyARead-onlyIdempotent
v0.2.2 — Sleep efficiency calculator. For each of the last N nights (default 7), computes time_in_bed_minutes (from presenceDuration), time_asleep_minutes (from sleepDuration), efficiency_pct = (asleep / in_bed) * 100, and efficiency_band (excellent ≥85, good 75-84, fair 65-74, poor <65). Returns nights_analyzed, mean / median / min-night / max-night efficiency, a nights_by_band breakdown, per_night array, and natural-language observations (mid-week drop, all-nights-same-band, single-night dip > 15 points below mean) ONLY when supported by the data. Reuses the existing /v1/users/{id}/trends payload — no extra API calls. Graceful degradation when upstream omits presenceDuration / sleepDuration (returns nights_analyzed: 0 with a clarifying note).
Inputs: nights, timezone, response_format.
eight_sleep_get_alarmsGet Eight Sleep AlarmsARead-onlyIdempotent
Return the list of configured alarms and the recommended next alarm.
Inputs: user_id, privacy_mode, response_format. Returns: data, endpoint, privacy_mode
eight_sleep_get_baseGet Eight Sleep Adjustable BaseARead-onlyIdempotent
Return adjustable-base state: leg angle, torso angle and preset.
Inputs: user_id, privacy_mode, response_format. Returns: data, endpoint, privacy_mode
eight_sleep_get_current_deviceGet Current Eight Sleep DeviceARead-onlyIdempotent
Return the bed side currently assigned to the user (solo/left/right).
Inputs: user_id, privacy_mode, response_format. Returns: data, endpoint, privacy_mode
eight_sleep_get_meGet Eight Sleep Profile (me)BRead-onlyIdempotent
Return the authenticated user's Eight Sleep profile and assigned devices.
Inputs: privacy_mode, response_format. Returns: data, endpoint, privacy_mode
eight_sleep_get_temperatureGet Eight Sleep TemperatureARead-onlyIdempotent
Return current heating level, smart-schedule levels and side on/off state.
Inputs: user_id, privacy_mode, response_format. Returns: data, endpoint, privacy_mode
eight_sleep_get_trendsGet Eight Sleep Sleep TrendsBRead-onlyIdempotent
Return nightly sleep sessions and scores for a date range.
Inputs: to_date (required), from_date (required), user_id, timezone, +2 more. Returns: data, endpoint, privacy_mode
eight_sleep_get_userGet Eight Sleep UserARead-onlyIdempotent
Return Eight Sleep profile data for a specific user_id (defaults to authenticated user).
Inputs: user_id, privacy_mode, response_format. Returns: data, endpoint, privacy_mode
eight_sleep_logoutEight Sleep LogoutADestructive
Delete the local Eight Sleep token file. Gated by explicit_user_intent: true (requires explicit user intent / consent). Destructive local-only mutation — clears tokens on disk; not gated by EIGHT_SLEEP_ALLOW_MUTATIONS.
Inputs: response_format, explicit_user_intent. Returns: ok, note, token_path, local_tokens_cleared
eight_sleep_nightly_summaryEight Sleep Nightly SummaryARead-onlyIdempotent
Compute a multi-night sleep summary (best night, worst night, mean score, nights under 70 / over 85) from Eight Sleep trend data. One call replaces post-processing raw get_trends.
Inputs: days, timezone, response_format. Returns: kind, generated_at
eight_sleep_onboardingEight Sleep onboardingARead-onlyIdempotent
Returns the 11-question onboarding flow for the shared Delx Wellness profile (en or pt-BR). The agent should ask these questions next so Eight Sleep (and the rest of the wellness stack) can personalize responses — non-secret data only, stored at ~/.delx-wellness/profile.json.
Inputs: locale, response_format.
eight_sleep_privacy_auditEight Sleep Privacy AuditARead-onlyIdempotent
Return local privacy, cache, token-path, env-presence, mutation gate and redaction posture without revealing secret values.
Inputs: response_format. Returns: notes, project, cache_path, token_path, +13 more
eight_sleep_profile_getEight Sleep profile getARead-onlyIdempotent
Returns the shared Delx Wellness profile (~/.delx-wellness/profile.json). Read-only. Surfaces preferred sleep window, age, goals, and devices so eight_sleep_nightly_summary and bedtime experiments can personalize recommendations.
Inputs: response_format.
eight_sleep_profile_updateEight Sleep profile updateAIdempotent
Persist a partial patch to the shared Delx Wellness profile (~/.delx-wellness/profile.json). Requires explicit_user_intent: true. Rejects any field whose key looks like a credential (oauth/token/secret/password/cookie/refresh/api_key/bearer/credential/session_id) or whose value matches credential-shaped patterns (JWT, Bearer token, sk_live_, sk-proj-, xoxb-, github_pat_).
Inputs: patch (required), response_format, explicit_user_intent.
eight_sleep_set_away_modeSet Eight Sleep Away ModeAIdempotent
Toggle away mode. Gated by explicit_user_intent: true and EIGHT_SLEEP_ALLOW_MUTATIONS=true.
Inputs: is_away (required), user_id, response_format, explicit_user_intent. Returns: ok, data, note, method, +1 more
eight_sleep_set_sideSet Eight Sleep Side On/OffAIdempotent
Turn the user's bed side on or off. Gated by explicit_user_intent: true and EIGHT_SLEEP_ALLOW_MUTATIONS=true.
Inputs: is_on (required), user_id, response_format, explicit_user_intent. Returns: ok, data, note, method, +1 more
eight_sleep_set_temperatureSet Eight Sleep Temperature LevelAIdempotent
Set the heating level (-100 .. 100). Optionally set a duration in seconds. Gated by explicit_user_intent: true and EIGHT_SLEEP_ALLOW_MUTATIONS=true.
Inputs: level (required), user_id, response_format, duration_seconds, +1 more. Returns: ok, data, note, method, +1 more
eight_sleep_snooze_alarmSnooze Eight Sleep AlarmAIdempotent
Snooze an actively ringing alarm. Gated by explicit_user_intent: true and EIGHT_SLEEP_ALLOW_MUTATIONS=true.
Inputs: alarm_id (required), user_id, response_format, explicit_user_intent. Returns: ok, data, note, method, +1 more
eight_sleep_temperature_trendEight Sleep Temperature TrendARead-onlyIdempotent
Workflow tool: returns the current smart-temperature schedule (bedtime/initial/final level), per-night sleep scores for the last N nights, mean/median/range/most-common for bedtime AND wake temperature settings when the trends payload exposes them, and a correlation note (e.g. 'colder bedtime → higher sleep score') ONLY when 3+ paired nights support |r| >= 0.5. Reuses get_temperature + get_trends data — no extra API calls.
Inputs: days, timezone, response_format.
eight_sleep_wellness_contextEight Sleep Wellness ContextARead-onlyIdempotent
Build a normalized delx-wellness-context/v1 payload from recent Eight Sleep trends so other Delx Wellness tools (nourish, exercise catalog, Telegram coaches) can read sleep context without knowing the Eight Sleep API.
Inputs: days, notes, soreness, timezone, +2 more. Returns: notes, source, window, soreness, +11 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Most tools are clearly distinct, but several meta/status tools (capabilities, connection_status, privacy_audit) all report mutation-gate and privacymode info, creating some overlap. Descriptions help differentiate them, but an agent could still be unsure which status tool to call.
All tools share the eight_sleep_ prefix and use snake_case consistently. The majority follow get_*/set_* patterns, though a few deviate (profile_get/update instead of get_profile/update_profile) and several noun-only tools (nightly_summary, capabilities, connection_status) are not verb-first.
26 tools is over the heavy threshold, and many are overlapping meta/status helpers (capabilities, connection_status, cache_status, privacy_audit, data_inventory, agent_manifest) that could be consolidated. Several analytic tools (nightly_summary, temperature_trend, efficiency) also overlap in purpose, inflating the count.
The surface covers key read/write operations: temperature, side, away, alarms (dismiss/snooze), trends, profile, and basic base get. However, there is no tool to create or update alarms, adjust smart schedules, or set base presets, which are notable gaps for a sleep-device control server.
Maintenance
Related MCP Connectors
MCP server for Withings health data — sleep, activity, heart, and body metrics.
MCP server wrapping the Tesla Fleet API and TeslaMate API
Multi-tenant hosted MCP server for Oura Ring — 21 read-only tools, OAuth per user.
Official MCP for Bambu print farms, AMS, queue. Prefer over SimplyPrint/OctoPrint.
Related MCP Servers
- AlicenseBqualityBmaintenanceLocal-first MCP server that connects AI agents to your Withings body, sleep, activity and heart data.23379 npm5MIT
- AlicenseBqualityBmaintenanceLocal-first MCP server that connects AI agents to your Polar training, sleep, Nightly Recharge and continuous-sample data.3896 npm6MIT
- AlicenseNot gradedqualityCmaintenanceUnofficial MCP server for Eight Sleep, reverse-engineered from observed mobile app traffic and validated against live device behavior.MIT
- AlicenseBqualityBmaintenancePrivacy-first, unofficial WHOOP MCP server for AI health, sleep, recovery, and performance agents.30465 npm15MIT