Add adjustable base (elevation) control tools#1
Open
MaxGhenis wants to merge 1 commit intoelizabethtrykin:masterfrom
Open
Add adjustable base (elevation) control tools#1MaxGhenis wants to merge 1 commit intoelizabethtrykin:masterfrom
MaxGhenis wants to merge 1 commit intoelizabethtrykin:masterfrom
Conversation
Add three new MCP tools for controlling the Eight Sleep adjustable base: - getBaseStatus: get current torso/leg angles, moving status, snore mitigation - setBaseAngle: set torso (0-60°) and leg (0-45°) elevation - setBasePreset: set named presets (sleep, relaxing, reading) Key implementation details: - Base endpoints use app-api.8slp.net (not client-api.8slp.net) - Separate axios client with shared auth interceptors for the app API - Auto-discover userId from auth response when not configured - Auto-discover deviceId from user profile when not configured - Credential fallback: reads ~/.config/eightctl/config.yaml if env vars not set - Default OAuth client credentials (same public app credentials used by all clients) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.config/eightctl/config.yamlNew tools
getBaseStatussetBaseAnglesetBasePresetsleep,relaxing, orreadingImplementation notes
The base control endpoints use
app-api.8slp.netrather thanclient-api.8slp.net. A separate axios client (appClient) is created with the same auth interceptors but pointed at the app API. This was confirmed by testing against a live Pod 5 with an adjustable base.The endpoint signatures match the Home Assistant Eight Sleep integration:
Test plan
tscgetBaseStatusagainst live Pod 5 - returns correct anglessetBaseAngleagainst live Pod 5 - bed physically moves to target anglesetBasePresetagainst live Pod 5 - bed moves to preset positionclient-apihost, no breaking changes)🤖 Generated with Claude Code