merge: bring the MCP server onto the v1.23 base

Combine the remote MCP server (stdio + remote /mcp + OAuth 2.1 + read
tools + deep-value reads + a confirmed, audience-bound write surface)
with the v1.23 account-security line (MFA, known/trusted devices,
free-text note encryption).

- schema: keep every v1.23 User relation (MFA, known/trusted devices)
  alongside the McpOAuthConnection relation; the MeasurementSource enum
  carries the MCP value.
- api-handler: the MCP audience guard (a token scoped to
  health:read/health:write is bound to /mcp and refused a REST write)
  and the step-up MFA helpers coexist.
- maintenance queues: register the MCP token-cleanup sweep next to the
  note-encryption backfill and key-rotation queues; shift it to 04:00
  so the two daily discovery ticks do not collide.
- migrations: renumber the MCP migrations to 0206/0207 so they follow
  the v1.23 chain (0199-0205).
- MCP mood writes route the note through the v1.23 at-rest cipher.
This commit is contained in:
Marc-André Bombeck committed 2026-06-28 00:52:04 +02:00
commit fb986bc09d
89 files changed
+10276 -109

No files matched your search

+122
View File
@@ -2162,6 +2162,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
- in: query
name: valueMin
schema:
@@ -2657,6 +2658,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
externalId:
type: string
maxLength: 128
@@ -3775,6 +3777,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
activeEnergy:
maxItems: 8
type: array
@@ -3792,6 +3795,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
walkingRunningDistance:
maxItems: 8
type: array
@@ -3809,6 +3813,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
flightsClimbed:
maxItems: 8
type: array
@@ -3826,6 +3831,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
sleep:
maxItems: 8
type: array
@@ -3843,6 +3849,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
weight:
maxItems: 8
type: array
@@ -3860,6 +3867,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
bloodPressure:
maxItems: 8
type: array
@@ -3877,6 +3885,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
pulse:
maxItems: 8
type: array
@@ -3894,6 +3903,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyFat:
maxItems: 8
type: array
@@ -3911,6 +3921,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyTemperature:
maxItems: 8
type: array
@@ -3928,6 +3939,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
spo2:
maxItems: 8
type: array
@@ -3945,6 +3957,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
hrv:
maxItems: 8
type: array
@@ -3962,6 +3975,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
restingHeartRate:
maxItems: 8
type: array
@@ -3979,6 +3993,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
vo2Max:
maxItems: 8
type: array
@@ -3996,6 +4011,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
skinTemperature:
maxItems: 8
type: array
@@ -4013,6 +4029,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
respiratoryRate:
maxItems: 8
type: array
@@ -4030,6 +4047,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
recovery:
maxItems: 8
type: array
@@ -4047,6 +4065,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
stress:
maxItems: 8
type: array
@@ -4064,6 +4083,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
metricPriority:
type: object
properties:
@@ -4084,6 +4104,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
activeEnergy:
maxItems: 8
type: array
@@ -4101,6 +4122,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
walkingRunningDistance:
maxItems: 8
type: array
@@ -4118,6 +4140,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
flightsClimbed:
maxItems: 8
type: array
@@ -4135,6 +4158,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
sleep:
maxItems: 8
type: array
@@ -4152,6 +4176,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
weight:
maxItems: 8
type: array
@@ -4169,6 +4194,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
bloodPressure:
maxItems: 8
type: array
@@ -4186,6 +4212,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
pulse:
maxItems: 8
type: array
@@ -4203,6 +4230,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyFat:
maxItems: 8
type: array
@@ -4220,6 +4248,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyTemperature:
maxItems: 8
type: array
@@ -4237,6 +4266,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
spo2:
maxItems: 8
type: array
@@ -4254,6 +4284,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
hrv:
maxItems: 8
type: array
@@ -4271,6 +4302,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
restingHeartRate:
maxItems: 8
type: array
@@ -4288,6 +4320,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
vo2Max:
maxItems: 8
type: array
@@ -4305,6 +4338,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
skinTemperature:
maxItems: 8
type: array
@@ -4322,6 +4356,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
respiratoryRate:
maxItems: 8
type: array
@@ -4339,6 +4374,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
recovery:
maxItems: 8
type: array
@@ -4356,6 +4392,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
stress:
maxItems: 8
type: array
@@ -4373,6 +4410,7 @@ paths:
- POLAR
- OURA
- TELEGRAM
- MCP
deviceTypePriority:
type: object
properties:
@@ -9029,6 +9067,8 @@ components:
type: boolean
doctorReport:
type: boolean
mcp:
type: boolean
additionalProperties: false
description: Partial module enable/disable update. Each key is an optional boolean; an omitted key is left untouched,
`false` disables the module, `true` (re-)enables it. Only the toggleable "secondary domains" are accepted — a
@@ -12237,6 +12277,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
notes:
anyOf:
- type: string
@@ -12960,6 +13001,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
notes:
anyOf:
- type: string
@@ -13203,6 +13245,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
- type: "null"
start:
type: string
@@ -13330,6 +13373,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
- type: "null"
start:
type: string
@@ -13703,6 +13747,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
externalId:
anyOf:
- type: string
@@ -13812,6 +13857,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
externalId:
anyOf:
- type: string
@@ -16005,6 +16051,9 @@ components:
doctorReport:
type: boolean
description: Whether the "doctorReport" module is enabled for this account.
mcp:
type: boolean
description: Whether the "mcp" module is enabled for this account.
required:
- cycle
- mood
@@ -16019,6 +16068,7 @@ components:
- insights
- medications
- doctorReport
- mcp
additionalProperties: false
description: Fully-resolved per-user module enable/disable map. Every toggleable module key is present. `false` means
the surface should disappear end-to-end (nav, dashboard, insights, …). `cycle` mirrors `cycleTrackingEnabled`;
@@ -16063,6 +16113,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
activeEnergy:
maxItems: 8
type: array
@@ -16080,6 +16131,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
walkingRunningDistance:
maxItems: 8
type: array
@@ -16097,6 +16149,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
flightsClimbed:
maxItems: 8
type: array
@@ -16114,6 +16167,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
sleep:
maxItems: 8
type: array
@@ -16131,6 +16185,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
weight:
maxItems: 8
type: array
@@ -16148,6 +16203,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bloodPressure:
maxItems: 8
type: array
@@ -16165,6 +16221,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
pulse:
maxItems: 8
type: array
@@ -16182,6 +16239,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyFat:
maxItems: 8
type: array
@@ -16199,6 +16257,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyTemperature:
maxItems: 8
type: array
@@ -16216,6 +16275,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
spo2:
maxItems: 8
type: array
@@ -16233,6 +16293,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
hrv:
maxItems: 8
type: array
@@ -16250,6 +16311,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
restingHeartRate:
maxItems: 8
type: array
@@ -16267,6 +16329,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
vo2Max:
maxItems: 8
type: array
@@ -16284,6 +16347,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
skinTemperature:
maxItems: 8
type: array
@@ -16301,6 +16365,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
respiratoryRate:
maxItems: 8
type: array
@@ -16318,6 +16383,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
recovery:
maxItems: 8
type: array
@@ -16335,6 +16401,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
stress:
maxItems: 8
type: array
@@ -16352,6 +16419,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
metricPriority:
type: object
properties:
@@ -16372,6 +16440,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
activeEnergy:
maxItems: 8
type: array
@@ -16389,6 +16458,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
walkingRunningDistance:
maxItems: 8
type: array
@@ -16406,6 +16476,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
flightsClimbed:
maxItems: 8
type: array
@@ -16423,6 +16494,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
sleep:
maxItems: 8
type: array
@@ -16440,6 +16512,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
weight:
maxItems: 8
type: array
@@ -16457,6 +16530,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bloodPressure:
maxItems: 8
type: array
@@ -16474,6 +16548,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
pulse:
maxItems: 8
type: array
@@ -16491,6 +16566,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyFat:
maxItems: 8
type: array
@@ -16508,6 +16584,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyTemperature:
maxItems: 8
type: array
@@ -16525,6 +16602,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
spo2:
maxItems: 8
type: array
@@ -16542,6 +16620,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
hrv:
maxItems: 8
type: array
@@ -16559,6 +16638,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
restingHeartRate:
maxItems: 8
type: array
@@ -16576,6 +16656,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
vo2Max:
maxItems: 8
type: array
@@ -16593,6 +16674,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
skinTemperature:
maxItems: 8
type: array
@@ -16610,6 +16692,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
respiratoryRate:
maxItems: 8
type: array
@@ -16627,6 +16710,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
recovery:
maxItems: 8
type: array
@@ -16644,6 +16728,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
stress:
maxItems: 8
type: array
@@ -16661,6 +16746,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
additionalProperties: false
deviceTypePriority:
type: object
@@ -16727,6 +16813,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
activeEnergy:
maxItems: 8
type: array
@@ -16744,6 +16831,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
walkingRunningDistance:
maxItems: 8
type: array
@@ -16761,6 +16849,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
flightsClimbed:
maxItems: 8
type: array
@@ -16778,6 +16867,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
sleep:
maxItems: 8
type: array
@@ -16795,6 +16885,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
weight:
maxItems: 8
type: array
@@ -16812,6 +16903,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bloodPressure:
maxItems: 8
type: array
@@ -16829,6 +16921,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
pulse:
maxItems: 8
type: array
@@ -16846,6 +16939,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyFat:
maxItems: 8
type: array
@@ -16863,6 +16957,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyTemperature:
maxItems: 8
type: array
@@ -16880,6 +16975,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
spo2:
maxItems: 8
type: array
@@ -16897,6 +16993,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
hrv:
maxItems: 8
type: array
@@ -16914,6 +17011,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
restingHeartRate:
maxItems: 8
type: array
@@ -16931,6 +17029,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
vo2Max:
maxItems: 8
type: array
@@ -16948,6 +17047,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
skinTemperature:
maxItems: 8
type: array
@@ -16965,6 +17065,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
respiratoryRate:
maxItems: 8
type: array
@@ -16982,6 +17083,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
recovery:
maxItems: 8
type: array
@@ -16999,6 +17101,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
stress:
maxItems: 8
type: array
@@ -17016,6 +17119,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
metricPriority:
type: object
properties:
@@ -17036,6 +17140,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
activeEnergy:
maxItems: 8
type: array
@@ -17053,6 +17158,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
walkingRunningDistance:
maxItems: 8
type: array
@@ -17070,6 +17176,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
flightsClimbed:
maxItems: 8
type: array
@@ -17087,6 +17194,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
sleep:
maxItems: 8
type: array
@@ -17104,6 +17212,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
weight:
maxItems: 8
type: array
@@ -17121,6 +17230,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bloodPressure:
maxItems: 8
type: array
@@ -17138,6 +17248,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
pulse:
maxItems: 8
type: array
@@ -17155,6 +17266,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyFat:
maxItems: 8
type: array
@@ -17172,6 +17284,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
bodyTemperature:
maxItems: 8
type: array
@@ -17189,6 +17302,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
spo2:
maxItems: 8
type: array
@@ -17206,6 +17320,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
hrv:
maxItems: 8
type: array
@@ -17223,6 +17338,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
restingHeartRate:
maxItems: 8
type: array
@@ -17240,6 +17356,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
vo2Max:
maxItems: 8
type: array
@@ -17257,6 +17374,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
skinTemperature:
maxItems: 8
type: array
@@ -17274,6 +17392,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
respiratoryRate:
maxItems: 8
type: array
@@ -17291,6 +17410,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
recovery:
maxItems: 8
type: array
@@ -17308,6 +17428,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
stress:
maxItems: 8
type: array
@@ -17325,6 +17446,7 @@ components:
- POLAR
- OURA
- TELEGRAM
- MCP
additionalProperties: false
deviceTypePriority:
type: object