Skip to main content
Glama

⚡ 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 ready

Then 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

eight_sleep_get_me, eight_sleep_get_user, eight_sleep_get_current_device

client-api.8slp.net /users/...

Temperature program

eight_sleep_get_temperature

app-api.8slp.net /v1/users/{id}/temperature

Sleep trends

eight_sleep_get_trends

client-api.8slp.net /users/{id}/trends

Alarms

eight_sleep_get_alarms

app-api.8slp.net /v2/users/{id}/alarms

Adjustable base

eight_sleep_get_base

app-api.8slp.net /v1/users/{id}/base

Workflow tools

Tool

What it does

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.

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.

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

eight_sleep_set_temperature

Turn side on/off

eight_sleep_set_side

Toggle away mode

eight_sleep_set_away_mode

Snooze alarm

eight_sleep_snooze_alarm

Dismiss alarm

eight_sleep_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.json with chmod 600.

  • Auth tokens stored in ~/.eight-sleep-mcp/tokens.json with chmod 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

EIGHT_SLEEP_EMAIL

Account email.

EIGHT_SLEEP_PASSWORD

Account password.

EIGHT_SLEEP_ALLOW_MUTATIONS

Enable write tools (keep unset in default snippets).

EIGHT_SLEEP_PRIVACY_MODE

summary / structured / raw.

EIGHT_SLEEP_CACHE

Legacy compatibility key; authenticated response caching is disabled and this value is ignored.

EIGHT_SLEEP_TOKEN_PATH

Override token storage path.

EIGHT_SLEEP_CLIENT_ID / EIGHT_SLEEP_CLIENT_SECRET

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

📧 Contact & Support

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 tools
eight_sleep_agent_manifestEight Sleep Agent ManifestB
Read-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 StatusA
Read-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 CapabilitiesA
Read-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 StatusA
Read-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 InventoryA
Read-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 AlarmA
Destructive

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 EfficiencyA
Read-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 AlarmsA
Read-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 BaseA
Read-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 DeviceA
Read-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)B
Read-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 TemperatureA
Read-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_userGet Eight Sleep UserA
Read-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 LogoutA
Destructive

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 SummaryA
Read-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 onboardingA
Read-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 AuditA
Read-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 getA
Read-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 updateA
Idempotent

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 ModeA
Idempotent

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/OffA
Idempotent

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 LevelA
Idempotent

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 AlarmA
Idempotent

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 TrendA
Read-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 ContextA
Read-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

    B3.4/5.0

    Scored across 26 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count2/5

    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.

    Completeness3/5

    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

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers