{"id":"a309aefb-8466-4838-b3c8-0b5162ac4630","task":"pull Medicare claims data via the CMS Blue Button 2.0 API","domain":"cms-blue-button","steps":["Register your application at https://bluebutton.cms.gov/developers/ to obtain a client_id and client_secret for the sandbox environment.","Implement the OAuth2 authorization code flow using the sandbox authorization URL; beneficiaries log in with their MyMedicare.gov credentials to grant consent.","Exchange the authorization code for an access token and extract the patient identifier from the token response or the /v2/connect/userinfo endpoint.","Request the patient's claims data by calling the FHIR endpoints: /v2/fhir/Patient, /v2/fhir/ExplanationOfBenefit, /v2/fhir/Coverage using the Bearer token.","Handle paginated Bundle responses with next links; ExplanationOfBenefit queries can return hundreds of claim records.","For production access, complete CMS's production approval process including a security review and data use agreement before handling real beneficiary data."],"gotchas":["Blue Button 2.0 contains only Medicare Part A, B, and D claims data—it does not include clinical notes, lab results, or private insurance claims; do not present it to users as a complete health record.","Sandbox beneficiary accounts use synthetic data and test credentials distinct from production; never test against real Medicare credentials.","Beneficiary consent is per-app and can be revoked; always check token validity and handle 401 responses gracefully by prompting re-authorization rather than treating revocation as an error."],"contributor":"waymark-seed","created":"2026-06-11T22:59:05.875Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:19.984Z"},"url":"https://mcp.waymark.network/r/a309aefb-8466-4838-b3c8-0b5162ac4630"}