CMS AB2D Bulk FHIR Export

Initiate and consume bulk FHIR exports from the CMS AB2D API for Medicare Part D Prescription Drug Plan sponsors. Asynchronous $export, status polling, and NDJSON download.

CMS AB2D Bulk FHIR Export is a Naftiko capability published by CMS — Centers for Medicare & Medicaid Services, one of 10 capabilities the APIs.io network indexes for this provider. It bundles 4 operations.

The capability includes 1 read-only operation and 3 state-changing operations. Lead operation: Initiate an AB2D bulk export of beneficiary ExplanationOfBenefit resources. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include CMS, Medicare, FHIR, BulkData, and PartD.

Run with Naftiko CMSMedicareFHIRBulkDataPartDAB2D

MCP Tools

cms-ab2d-export-patient

Initiate an AB2D bulk export of beneficiary ExplanationOfBenefit resources.

cms-ab2d-export-contract

Initiate a contract-scoped AB2D bulk export.

cms-ab2d-get-job-status

Poll an AB2D bulk export job for status.

read-only idempotent
cms-ab2d-cancel-job

Cancel an AB2D bulk export job.

idempotent

Capability Spec

ab2d-bulk-fhir.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: CMS AB2D Bulk FHIR Export
  description: Initiate and consume bulk FHIR exports from the CMS AB2D API for Medicare Part D
    Prescription Drug Plan sponsors. Asynchronous $export, status polling, and NDJSON download.
  tags:
  - CMS
  - Medicare
  - FHIR
  - BulkData
  - PartD
  - AB2D
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    AB2D_ACCESS_TOKEN: AB2D_ACCESS_TOKEN
capability:
  consumes:
  - type: http
    namespace: ab2d-bulk-fhir
    baseUri: https://api.ab2d.cms.gov/api/v2
    description: CMS AB2D bulk FHIR export surface.
    resources:
    - name: patient-export
      path: /Patient/$export
      operations:
      - name: exportpatient
        method: GET
        description: Initiate a bulk export of ExplanationOfBenefit resources for the contract's enrolled beneficiaries.
        outputRawFormat: json
        outputParameters:
        - { name: result, type: object, value: $. }
    - name: contract-export
      path: /Group/{contractId}/$export
      operations:
      - name: exportcontract
        method: GET
        description: Initiate a contract-scoped bulk export.
        inputParameters:
        - { name: contractId, in: path, type: string, required: true }
        outputRawFormat: json
        outputParameters:
        - { name: result, type: object, value: $. }
    - name: job-status
      path: /Job/{jobUuid}/$status
      operations:
      - name: getjobstatus
        method: GET
        description: Poll an AB2D bulk export job for status and output manifest.
        inputParameters:
        - { name: jobUuid, in: path, type: string, required: true }
        outputRawFormat: json
        outputParameters:
        - { name: result, type: object, value: $. }
      - name: canceljob
        method: DELETE
        description: Cancel an AB2D bulk export job.
        inputParameters:
        - { name: jobUuid, in: path, type: string, required: true }
        outputRawFormat: json
        outputParameters:
        - { name: result, type: object, value: $. }
    authentication:
      type: bearer
      value: '{{env.AB2D_ACCESS_TOKEN}}'
      placement: header
  exposes:
  - type: mcp
    namespace: ab2d-mcp
    port: 9090
    transport: http
    description: MCP adapter for AB2D bulk FHIR export.
    tools:
    - name: cms-ab2d-export-patient
      description: Initiate an AB2D bulk export of beneficiary ExplanationOfBenefit resources.
      hints: { readOnly: false, destructive: false, idempotent: false }
      call: ab2d-bulk-fhir.exportpatient
      outputParameters:
      - { type: object, mapping: $. }
    - name: cms-ab2d-export-contract
      description: Initiate a contract-scoped AB2D bulk export.
      hints: { readOnly: false, destructive: false, idempotent: false }
      call: ab2d-bulk-fhir.exportcontract
      outputParameters:
      - { type: object, mapping: $. }
    - name: cms-ab2d-get-job-status
      description: Poll an AB2D bulk export job for status.
      hints: { readOnly: true, destructive: false, idempotent: true }
      call: ab2d-bulk-fhir.getjobstatus
      outputParameters:
      - { type: object, mapping: $. }
    - name: cms-ab2d-cancel-job
      description: Cancel an AB2D bulk export job.
      hints: { readOnly: false, destructive: true, idempotent: true }
      call: ab2d-bulk-fhir.canceljob
      outputParameters:
      - { type: object, mapping: $. }