OSCAR MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OSCAR_DATA_DIR | No | Path to the folder containing oscar.db. Overrides auto-detection. | |
| OSCAR_MCP_INCLUDE_PII | No | 1 to include personal identifiers. Off by default. | 0 |
| OSCAR_MCP_SQL_TIMEOUT | No | Seconds a run_sql query may run before it is cancelled. | 10 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_profilesA | List OSCAR profiles with their data coverage. Call this first when you do not know which profile or date range is available. |
| get_device_infoB | Get the therapy devices recorded for a profile, including model and last import time. |
| list_channelsA | List the data channels OSCAR recorded, mapping numeric channel ids to human readable names such as AHI, Pressure, Leak Rate or Flow Limitation. |
| describe_databaseA | Describe the OSCAR database: tables, columns, foreign keys, and the join and decoding rules that make a query correct. Read this before writing run_sql. |
| get_daily_summariesB | Return a night-by-night table of therapy results (usage hours, AHI, event counts, pressure and leak). Dates are ISO format; omit them for all data. |
| get_statisticsC | Aggregate statistics for a period: usage and compliance, AHI distribution and severity band, event totals, pressure and leak summaries, plus simple trends. |
| get_daily_detailB | Everything recorded for one night: each session, machine settings in effect, event counts and per-channel statistics. Date must be ISO format. |
| get_respiratory_eventsB | Individual respiratory events (apneas, hypopneas, RERAs) for one night, with counts by type and an hourly histogram showing when they clustered. Large leak spans are reported separately from respiratory events. |
| get_therapy_settingsC | Machine settings over time (pressure limits, EPR, mode, ramp, humidity). Set changes_only to report just the nights where a setting changed. |
| get_session_detailsB | Per-channel statistics for a single session, identified by its session_db_id. |
| run_sqlA | Run a read-only SELECT against the OSCAR database for analysis the other tools do not cover. Only SELECT/WITH statements are permitted, and a query is cancelled if it exceeds its time budget. Call describe_database first: this schema reuses column names across tables, so a wrong join key returns zero rows instead of an error. For mask, mode and other categorical settings prefer get_therapy_settings, because raw values are device-specific codes whose meaning depends on the channel. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| review_therapy | Structured review of the last N nights, with leak checked before AHI. |
| investigate_leak | Find which nights leaked, how badly, and what changed around them. |
| compare_periods | Test whether something actually changed between two date ranges. |
| prepare_for_appointment | A factual summary to bring to an appointment, with questions to ask. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Entity and relationship model | How OSCAR's tables map onto real concepts and how they join. Read before writing SQL with run_sql. |
| Metric definitions | Exact formulas and provenance for AHI, RDI, therapy hours, leak and compliance. |
| Therapy glossary | Apnea, hypopnea, clear airway, RERA, CSR, leak and other terms as OSCAR itself defines them. |
| Interpretation caveats | The traps that turn a correct number into a wrong conclusion: leak invalidating AHI, clear-airway events, cross-brand comparison, single-night noise. |
| Complete data model | Entities, metrics, glossary and caveats in one document. |
TDQS
Scored across 11 tools
Each tool targets a distinct resource or action: metadata (describe_database, list_profiles, list_channels), device info, summaries, statistics, nightly details, events, settings, and session details. Even run_sql is clearly scoped as a fallback for analyses not covered by the specialized tools, and descriptions clarify boundaries between similar tools like get_daily_detail vs get_session_details.
All tool names follow a consistent verb_noun snake_case pattern (run_sql, list_profiles, get_device_info, list_channels, describe_database, get_daily_summaries, etc.). The verbs are predictable (list/get/describe/run) and nouns are clear, making the API easy to navigate.
With 11 tools, the server is well-scoped for the domain of OSCAR CPAP data analysis. Each tool covers a necessary part of the workflow (profiles, schema, raw queries, summaries, statistics, details, events, settings, sessions) without redundancy or bloat.
The tool surface provides comprehensive coverage for reading and analyzing therapy data: profile discovery, device info, channel mapping, database schema, nightly summaries, period statistics, per-night detail, event-level data, settings history, and session-level stats. The inclusion of run_sql fills any potential ad-hoc analysis gaps, leaving no obvious dead ends.