skylight-mcp

MCP server for Skylight Calendar — 116 tools across calendar events (read+write), shared lists (read+write), chores and rewards (read+write), task-box items (read+write), meals (read+write), AI auto-creation (meal-plan + activity-idea generators with draft review/approve), messages and albums (read+write), photo/video upload, and frame/device/account settings + calendar + member management (read+write, incl. preset and custom-photo avatars).
Every API request carries the skylight-api-version: 2026-05-01 header (matching the official mobile app); without it some features 422 with "API version does not support …".
MCP protocol support
The server uses the official TypeScript SDK v2 and supports the stateless 2026-07-28 protocol revision over stdio. Clients can discover and call tools without an initialization handshake. Existing clients can still use the 2025-11-25 handshake.
The transport remains stdio. A host can expose it over authenticated HTTP. This package does not open a network listener.
Auth
The server uses a headless email+password OAuth2 authorization-code flow — no SSO and no browser extension required. Configure it with SKYLIGHT_REFRESH_TOKEN if you already hold a token, or SKYLIGHT_EMAIL + SKYLIGHT_PASSWORD to log in for one.
On first tool call, the server performs four steps against https://app.ourskylight.com:
GET /auth/session/new — fetch the Rails CSRF token and session cookie.
POST /auth/session — log in with email + password (must happen before OAuth authorize).
GET /oauth/authorize — send an S256 PKCE code_challenge (the server requires it) and receive the one-time authorization code via redirect.
POST /oauth/token — exchange the code plus the matching code_verifier for a bearer access_token + refresh_token (currently a 24-hour expiry; the client reads the returned expires_in rather than assuming).
Emailed login code. Skylight may answer step 2 with a 6-digit code sent to the account's email (observed 2026-11-11). The tool call that hit it fails with a message saying so, and skylight_healthcheck reports verification_code_required. Read the email and have the assistant call skylight_submit_login_code with the code (or resend: true for a new one). The login then finishes and the token is cached, so you only need a code again when the cached token is lost — for example after deleting the cache or setting SKYLIGHT_TOKEN_CACHE=false. The open login lives in the running process: restarting the server before you submit the code starts over with a new email.
OAuth redirects stay on the authentication origin. Relative redirects resolve against the current URL. The configured callback supplies the authorization code without receiving a request or session cookie. Unexpected destinations fail without including the redirect URL in the error.
The client then refreshes the token proactively (~60 s before expiry) and reactively on any 401. No bot wall has been observed — the headless flow works directly from Node.
No env vars → clean start: if credentials are not set, the server still starts without error. Auth is deferred to the first tool call, so MCP hosts can complete install-time tool listing before credentials are configured.
Using the auth helpers from your own code
The package also exports Skylight's session login and refresh, so a separate program can authenticate without copying src/:
import { login, refresh } from 'skylight-mcp/auth';
const tokens = await login({
authBaseUrl: 'https://app.ourskylight.com',
email: process.env.SKYLIGHT_EMAIL!,
password: process.env.SKYLIGHT_PASSWORD!,
});
// Skylight rotates refresh tokens: store the one each call returns.
const next = await refresh({ authBaseUrl: 'https://app.ourskylight.com', refreshToken: tokens.refreshToken });
This is the only library entry point; everything else in the package is the MCP server. It is ESM-only and ships type declarations.
Frame model
All data in Skylight is scoped to a frame (the family hub device). On first use the client auto-discovers the single frame on the account. If the account has more than one frame, set SKYLIGHT_FRAME_ID to the frame ID you want. Every tool that reads frame-scoped data accepts an optional frameId arg to override the default.
Tools