myair-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
myair-mcp
An MCP (Model Context Protocol) server that wraps the ResMed myAir cloud API. Query your CPAP therapy data (nightly usage, AHI, mask leak, myAir score) conversationally from Claude Code or any MCP-compatible client.
Read-only and local-only. The server only fetches data, and it runs over stdio only. There is no HTTP transport, because this is health data.
ResMed has no official public API. This wraps the reverse-engineered endpoints the myAir web app uses. Credit to prestomation/resmed_myair_sensors, the canonical reference. The endpoints are unsupported and could change without notice.
The data is informational only. Do not use it for medical decisions; talk to your care provider.
Tools
Tool | Description |
| CPAP device(s) and mask: name, series, serial, last data upload time |
| Nightly records for the last |
| Most recent night, served from the cached history with no extra API call |
| Clear cached data and the login token |
Each nightly record has these fields:
Field | Meaning |
| Therapy night (the evening the session started), |
| Mask-on time. Unused nights are included with |
| Apnea-hypopnea index (events/hour) |
| 95th-percentile mask leak (L/min) |
| Times the mask was put on or taken off |
| Total myAir score (0-100). It is the sum of |
The machine uploads over cellular after a session ends, so last night's record may not exist until mid-morning. Compare get_devices → last_sleep_data_report_time with the latest date.
Related MCP server: oura-ring-mcp
Configuration
MYAIR_USERNAME=your_myair_account_email
MYAIR_PASSWORD=your_myair_account_passwordOnly North America accounts are supported. Login uses Okta (primary auth, then a PKCE authorization code, then a token). Accounts that require email MFA (the EU region) are rejected with a clear error. myAir issues no refresh token, so the server logs in again when the 1-hour access token expires. After a failed login it does not retry in a loop, which avoids locking the account.
The full history comes back in a single API call. The server caches it in memory for 30 minutes and slices it per request. Nothing is written to disk.
Run locally
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt
copy .env.example .env # then fill in credentials
.venv\Scripts\python server.pyConnect to Claude Code
Add to ~/.claude.json under mcpServers:
{
"mcpServers": {
"myair": {
"type": "stdio",
"command": "C:\\path\\to\\myair-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\myair-mcp\\server.py"],
"env": {
"MYAIR_USERNAME": "your_myair_account_email",
"MYAIR_PASSWORD": "your_myair_account_password"
}
}
}
}Tests
.venv\Scripts\pip install -r requirements-dev.txt
.venv\Scripts\python -m pytestProject structure
myair_client.py # Okta login + AppSync GraphQL client
server.py # MCPServer (mcp 2.x) tool definitions + in-process cache (stdio only)
tests/ # respx-mocked client tests + server cache tests
requirements.txt
.env.exampleTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted Apple Health MCP for Claude and ChatGPT, works outside the US. iPhone app, no local server.
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Hosted Apple Health MCP: workouts, sleep and HRV in ChatGPT, Claude, Gemini, Grok. Free, no export.
Hosted MCP server for Cliniko — patients, appointments, availability, and invoices for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol (MCP) server that brings your Withings health data into Claude, allowing natural conversation access to sleep patterns, body measurements, workouts, heart data, and more.47MIT
- AlicenseNot gradedqualityBmaintenanceProvides natural-language access to Oura health data through Claude, with a local SQLite mirror and MCP tools for analyzing patterns with personal annotations.111 npm3MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that connects Claude to the WHOOP Developer API, allowing natural language queries about recovery, sleep, strain, workouts, and body measurements. All data stays on your machine with read-only access.1MIT
- AlicenseNot gradedqualityBmaintenanceA local, single-user, read-only MCP server that gives Claude Code access to your Garmin health and training data, exposing tools for health snapshots, training status, run details, body metrics, and training analysis.1MIT