Dexcom · Capability

Dexcom CGM Data Access

Workflow capability for retrieving and analyzing a user's Dexcom continuous glucose monitoring data. Combines OAuth-secured access to estimated glucose values, events, calibrations, alerts, devices, and data range under a single REST and MCP surface for digital health, research, and clinical applications.

Run with Naftiko DexcomContinuous Glucose MonitoringDiabetesDigital HealthHealthcare

What You Can Do

GET
Get data range — Get the user's available data range across calibrations, EGVs, and events.
/v1/data-range
GET
List glucose readings — List estimated glucose values in a time window (max 30 days).
/v1/glucose-readings
GET
List events — List user-entered events in a time window.
/v1/events
GET
List calibrations — List calibration entries in a time window.
/v1/calibrations
GET
List alerts — List CGM alert events in a time window.
/v1/alerts
GET
List devices — List the user's Dexcom devices.
/v1/devices

MCP Tools

get-data-range

Retrieve the earliest and latest record times for the authorized Dexcom user.

read-only
list-glucose-readings

List estimated glucose values (EGVs) for a date window so the model can analyze glucose trends.

read-only
list-events

List user-entered events (carbs, insulin, exercise, health) for a date window.

read-only
list-calibrations

List user calibration entries (fingerstick BG meter values).

read-only
list-alerts

List CGM alert events (high, low, urgent low, rise, fall, etc.) for a date window.

read-only
list-devices

List the user's Dexcom transmitters and display devices.

read-only

Capability Spec

cgm-data-access.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Dexcom CGM Data Access
  description: Workflow capability for retrieving and analyzing a user's Dexcom continuous glucose monitoring data. Combines
    OAuth-secured access to estimated glucose values, events, calibrations, alerts, devices, and data range under a single
    REST and MCP surface for digital health, research, and clinical applications.
  tags:
  - Dexcom
  - Continuous Glucose Monitoring
  - Diabetes
  - Digital Health
  - Healthcare
  created: '2026-05-05'
  modified: '2026-05-06'
binds:
- namespace: env
  keys:
    DEXCOM_ACCESS_TOKEN: DEXCOM_ACCESS_TOKEN
    DEXCOM_CLIENT_ID: DEXCOM_CLIENT_ID
    DEXCOM_CLIENT_SECRET: DEXCOM_CLIENT_SECRET
capability:
  consumes:
  - type: http
    namespace: dexcom-api
    baseUri: https://api.dexcom.com
    description: Dexcom v3 Developer API for retrieving continuous glucose monitoring data on behalf of authorized users.
    authentication:
      type: bearer
      token: '{{DEXCOM_ACCESS_TOKEN}}'
    resources:
    - name: oauth
      path: /v2/oauth2
      description: OAuth 2.0 authorization code flow endpoints.
      operations:
      - name: exchange-authorization-code
        method: POST
        description: Exchange a single-use authorization code for access and refresh tokens.
        inputParameters:
        - name: client_id
          in: body
          type: string
          required: true
          description: Application client identifier.
        - name: client_secret
          in: body
          type: string
          required: true
          description: Application client secret.
        - name: code
          in: body
          type: string
          required: true
          description: Authorization code returned from /v2/oauth2/login.
        - name: grant_type
          in: body
          type: string
          required: true
          description: Must be authorization_code.
        - name: redirect_uri
          in: body
          type: string
          required: true
          description: Registered redirect URI.
        outputRawFormat: json
        outputParameters:
        - name: token
          type: object
          value: $.
        body:
          type: form
          data:
            client_id: '{{tools.client_id}}'
            client_secret: '{{tools.client_secret}}'
            code: '{{tools.code}}'
            grant_type: '{{tools.grant_type}}'
            redirect_uri: '{{tools.redirect_uri}}'
      - name: refresh-access-token
        method: POST
        description: Refresh an access token using a refresh token.
        inputParameters:
        - name: client_id
          in: body
          type: string
          required: true
          description: Application client identifier.
        - name: client_secret
          in: body
          type: string
          required: true
          description: Application client secret.
        - name: refresh_token
          in: body
          type: string
          required: true
          description: Refresh token issued during initial token exchange.
        - name: grant_type
          in: body
          type: string
          required: true
          description: Must be refresh_token.
        outputRawFormat: json
        outputParameters:
        - name: token
          type: object
          value: $.
        body:
          type: form
          data:
            client_id: '{{tools.client_id}}'
            client_secret: '{{tools.client_secret}}'
            refresh_token: '{{tools.refresh_token}}'
            grant_type: '{{tools.grant_type}}'
    - name: data-range
      path: /v3/users/self/dataRange
      description: Earliest and latest record times available across calibrations, EGVs, and events.
      operations:
      - name: get-data-range
        method: GET
        description: Retrieve the earliest and latest data times for the authorized user.
        inputParameters:
        - name: lastSyncTime
          in: query
          type: string
          required: false
          description: Optional ISO 8601 timestamp; only data updated since this time is reflected.
        outputRawFormat: json
        outputParameters:
        - name: dataRange
          type: object
          value: $.
    - name: egvs
      path: /v3/users/self/egvs
      description: Estimated glucose values (CGM time-series readings).
      operations:
      - name: get-egvs
        method: GET
        description: Retrieve estimated glucose values between startDate and endDate (max 30 days).
        inputParameters:
        - name: startDate
          in: query
          type: string
          required: true
          description: ISO 8601 start timestamp (UTC, no offset).
        - name: endDate
          in: query
          type: string
          required: true
          description: ISO 8601 end timestamp (UTC, no offset).
        outputRawFormat: json
        outputParameters:
        - name: egvs
          type: array
          value: $.records
    - name: events
      path: /v3/users/self/events
      description: User-entered events (carbs, insulin, exercise, health, blood glucose).
      operations:
      - name: get-events
        method: GET
        description: Retrieve user-entered events between startDate and endDate.
        inputParameters:
        - name: startDate
          in: query
          type: string
          required: true
          description: ISO 8601 start timestamp.
        - name: endDate
          in: query
          type: string
          required: true
          description: ISO 8601 end timestamp.
        outputRawFormat: json
        outputParameters:
        - name: events
          type: array
          value: $.records
    - name: calibrations
      path: /v3/users/self/calibrations
      description: User calibration entries from fingerstick BG meter readings.
      operations:
      - name: get-calibrations
        method: GET
        description: Retrieve calibration entries between startDate and endDate.
        inputParameters:
        - name: startDate
          in: query
          type: string
          required: true
          description: ISO 8601 start timestamp.
        - name: endDate
          in: query
          type: string
          required: true
          description: ISO 8601 end timestamp.
        outputRawFormat: json
        outputParameters:
        - name: calibrations
          type: array
          value: $.records
    - name: alerts
      path: /v3/users/self/alerts
      description: Alert events generated by the user's CGM display device.
      operations:
      - name: get-alerts
        method: GET
        description: Retrieve CGM alert events between startDate and endDate.
        inputParameters:
        - name: startDate
          in: query
          type: string
          required: true
          description: ISO 8601 start timestamp.
        - name: endDate
          in: query
          type: string
          required: true
          description: ISO 8601 end timestamp.
        outputRawFormat: json
        outputParameters:
        - name: alerts
          type: array
          value: $.records
    - name: devices
      path: /v3/users/self/devices
      description: User Dexcom transmitters and display devices.
      operations:
      - name: get-devices
        method: GET
        description: Retrieve information about the user's Dexcom devices.
        inputParameters: []
        outputRawFormat: json
        outputParameters:
        - name: devices
          type: array
          value: $.records
  exposes:
  - type: rest
    port: 8080
    namespace: cgm-data-access-api
    description: Unified REST API for Dexcom CGM data access workflows.
    resources:
    - path: /v1/data-range
      name: data-range
      description: Retrieve the earliest and latest record times for the authorized user.
      operations:
      - method: GET
        name: get-data-range
        description: Get the user's available data range across calibrations, EGVs, and events.
        call: dexcom-api.get-data-range
        with:
          lastSyncTime: rest.lastSyncTime
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/glucose-readings
      name: glucose-readings
      description: Estimated glucose values retrieved from the user's CGM.
      operations:
      - method: GET
        name: list-glucose-readings
        description: List estimated glucose values in a time window (max 30 days).
        call: dexcom-api.get-egvs
        with:
          startDate: rest.startDate
          endDate: rest.endDate
        outputParameters:
        - type: array
          mapping: $.records
    - path: /v1/events
      name: events
      description: 'User-entered events: carbs, insulin, exercise, and health.'
      operations:
      - method: GET
        name: list-events
        description: List user-entered events in a time window.
        call: dexcom-api.get-events
        with:
          startDate: rest.startDate
          endDate: rest.endDate
        outputParameters:
        - type: array
          mapping: $.records
    - path: /v1/calibrations
      name: calibrations
      description: Fingerstick BG meter calibration entries.
      operations:
      - method: GET
        name: list-calibrations
        description: List calibration entries in a time window.
        call: dexcom-api.get-calibrations
        with:
          startDate: rest.startDate
          endDate: rest.endDate
        outputParameters:
        - type: array
          mapping: $.records
    - path: /v1/alerts
      name: alerts
      description: Alert events generated by the user's CGM display device.
      operations:
      - method: GET
        name: list-alerts
        description: List CGM alert events in a time window.
        call: dexcom-api.get-alerts
        with:
          startDate: rest.startDate
          endDate: rest.endDate
        outputParameters:
        - type: array
          mapping: $.records
    - path: /v1/devices
      name: devices
      description: User Dexcom transmitters and display devices.
      operations:
      - method: GET
        name: list-devices
        description: List the user's Dexcom devices.
        call: dexcom-api.get-devices
        outputParameters:
        - type: array
          mapping: $.records
  - type: mcp
    port: 9090
    namespace: cgm-data-access-mcp
    transport: http
    description: 'MCP server for AI-assisted Dexcom CGM data analysis: glucose trends, event correlation, alert review.'
    tools:
    - name: get-data-range
      description: Retrieve the earliest and latest record times for the authorized Dexcom user.
      hints:
        readOnly: true
        openWorld: true
      call: dexcom-api.get-data-range
      with:
        lastSyncTime: tools.lastSyncTime
      outputParameters:
      - type: object
        mapping: $.
    - name: list-glucose-readings
      description: List estimated glucose values (EGVs) for a date window so the model can analyze glucose trends.
      hints:
        readOnly: true
        openWorld: true
      call: dexcom-api.get-egvs
      with:
        startDate: tools.startDate
        endDate: tools.endDate
      outputParameters:
      - type: array
        mapping: $.records
    - name: list-events
      description: List user-entered events (carbs, insulin, exercise, health) for a date window.
      hints:
        readOnly: true
        openWorld: true
      call: dexcom-api.get-events
      with:
        startDate: tools.startDate
        endDate: tools.endDate
      outputParameters:
      - type: array
        mapping: $.records
    - name: list-calibrations
      description: List user calibration entries (fingerstick BG meter values).
      hints:
        readOnly: true
        openWorld: true
      call: dexcom-api.get-calibrations
      with:
        startDate: tools.startDate
        endDate: tools.endDate
      outputParameters:
      - type: array
        mapping: $.records
    - name: list-alerts
      description: List CGM alert events (high, low, urgent low, rise, fall, etc.) for a date window.
      hints:
        readOnly: true
        openWorld: true
      call: dexcom-api.get-alerts
      with:
        startDate: tools.startDate
        endDate: tools.endDate
      outputParameters:
      - type: array
        mapping: $.records
    - name: list-devices
      description: List the user's Dexcom transmitters and display devices.
      hints:
        readOnly: true
        openWorld: true
      call: dexcom-api.get-devices
      outputParameters:
      - type: array
        mapping: $.records