For developers of health apps · OAuth 2.1 · PKCE · MCP
Your users' health records are scattered. Ask for them once.
Nod adds a Connect with Triangle button to your app. People choose what to share on one consent screen, and your app gets a token for the records, labs and medications they allowed, already gathered by Triangle into one history.
Developers register apps from a Triangle account, in the developer portal.
Nod is made by Triangle. You'll create your account at trianglehealth.com, and your users will see Connect with Triangle.
<a href="https://app.trianglehealth.com/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=https%3A%2F%2Fyour.app%2Fcallback&response_type=code&scope=patient%3Aread%20labs%3Aread%20medications%3Aread&state=RANDOM_STATE&code_challenge=YOUR_S256_CHALLENGE&code_challenge_method=S256&resource=https%3A%2F%2Fapp.trianglehealth.com%2Fmcp">
Connect with Triangle
</a>
The problem
Getting someone's records into your app is the hard part
The usual options are asking people to upload PDFs, or connecting to health systems one at a time. Either way you end up parsing documents that weren't written for software, and your users end up hunting for files.
Triangle already does the gathering. After a person verifies their identity and signs the consent, Triangle requests their records through the national health-record networks, Carequality and TEFCA, adds what they upload, and assembles one current history with structured labs and medications. Nod lets your app ask for that history, with the person's permission.
How it works
Three steps to a working connection
-
Register your app
In the developer portal, create an app with a display name and your redirect URI bases: https for production, http://localhost for development. Choose a public client (PKCE, client ID only) or a confidential client (client ID plus a secret that is shown once).
- display_name shown on the consent screen
- redirect_uris one base per line
- description, logo_url optional
- privacy and terms URLs optional, shown to people
-
Send people to consent
Link to the authorize endpoint with a random state, a PKCE challenge and
resourceset to Triangle's MCP endpoint, so the token works there. People sign in to Triangle, pick the profile to share from, and approve the scopes you asked for.// keep the verifier in the user's session const verifier = randomString(64); const challenge = base64url(await sha256(verifier)); const params = new URLSearchParams({ client_id: CLIENT_ID, redirect_uri: CALLBACK, response_type: "code", scope: "patient:read labs:read", state, code_challenge: challenge, code_challenge_method: "S256", resource: "https://app.trianglehealth.com/mcp", }); location.href = `https://app.trianglehealth.com/oauth/authorize?${params}`; -
Exchange the code, then call Triangle
Trade the code for an access token and a refresh token. Today you call Triangle's MCP server with the token, using JSON-RPC methods such as tools/list and tools/call. Full HTTP API documentation is coming soon.
# exchange the code curl -X POST https://app.trianglehealth.com/oauth/token \ -d grant_type=authorization_code -d code=$CODE \ -d redirect_uri=$CALLBACK -d client_id=$CLIENT_ID \ -d code_verifier=$VERIFIER # list what the token can do curl -X POST https://app.trianglehealth.com/mcp \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "content-type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
The flow, end to end
Who talks to whom
- Your app → Triangle
GET /oauth/authorizewith client_id, scope, state, a PKCE challenge (S256) and resource set to the MCP endpoint. - Triangle → their browser
They sign in to Triangle. - Their browser → Triangle
They set Read and Write for each requested scope on the consent screen and accept. - Triangle → your app
Redirect to your redirect_uri with a code and your state. - Your app → Triangle
POST /oauth/tokenwith the code and code_verifier. - Triangle → your app
An access token (about an hour) and a refresh token that rotates. - Your app → Triangle
POST /mcpwith the bearer token: tools/list, tools/call.
Any time, they can disconnect your app in Settings → AI service connections. Its tokens stop working, so design for reconnecting.
What you get
A person's health history, with their permission
Records already gathered
Triangle requests records through Carequality and TEFCA, adds what people upload, and keeps one current history that updates as new records arrive.
Structured labs and medications
Lab results as structured values with plain-language explanations, and a medication list that includes pharmacy fills when the records contain them.
Consent people can read
Your app's name, description, logo and privacy and terms links appear on Triangle's consent screen, where people choose what to share.
Standard OAuth 2.1
Authorization code with PKCE (S256), public or confidential clients, access tokens of about an hour and refresh tokens that rotate.
MCP today
The same MCP server that assistants such as Claude, ChatGPT and Cursor connect to. HTTP API documentation is coming soon.
Revocable by design
People can disconnect your app at any time from Settings → AI service connections, and its tokens stop working when they do.
What your app can ask for
Scopes are requested on authorize and confirmed by the person on the consent screen. Tool names are as listed by tools/list today; check the live list before you build.
patient:readget_patient, get_health_overviewmedical_records:read, :writeget_medical_records, search_documents, get_clinical_summarylabs:readget_labs_overview, get_lab_resultmedications:read, :writeget_medications, update_medicationmeasurements:read, devices:readget_measurements, get_wearable_dayscare_team:read, :writeget_care_team_practitionersappointments:read, :writelist_appointments, schedule_appointmentroutines:read, :writelist_routines, update_routinesgenome:read, genomics_run:readget_genome_overview, get_genomics_runTry it from your own assistant
Before you write code, connect your own assistant
Your app calls the same MCP server that Claude, ChatGPT and Grok connect to. Add it to the assistant you already use, connect your own Triangle account, and see what the tools return before you build.
Step-by-step guides for ChatGPT, Claude, Grok, Muse and others
https://app.trianglehealth.com/mcp
- Copy the address. It is also in Triangle under Settings → AI service connections → Connect.
- Add a custom connector in your assistant. The menus for each are in the tabs.
- Sign in to Triangle when asked. Claude asks the first time it uses a Triangle tool.
- Set Read and Write for each category on the consent screen, pick the profile to share, then Accept.
Claude
Settings → Connectors → Add custom connector → paste the address
A Triangle sign-in appears the first time a Triangle tool is used.
ChatGPT
Plugins → + → Add custom MCP server → enter a name and the address under Connection
Authentication: OAuth → tick I understand and want to continue → Create as a plugin
Then sign in to Triangle and accept, and type @ in a chat to pick Triangle. Needs Business, Enterprise or Edu, where a workspace admin adds it with full access, or Pro, read-only.
Grok
Skills and Connectors → New Connector → Custom → enter a name and the address
Then sign in to Triangle and accept. Needs a paid plan.
Cursor and other MCP clients connect the same way, with the same address.
Prompts to explore the tools
- Which Triangle tools can you call right now?
- Get my most recent lab results with units and ranges.
- What's on my medication list?
Same server, your own flow. Assistants register themselves: dynamic client registration is reserved for ChatGPT, Claude and Grok. Your app registers in the portal and uses the OAuth flow above, with resource set to this address.
Privacy and control. What an outside assistant reads is handled under that assistant's own privacy policy, which Triangle does not control, and Triangle keeps no log of what it does afterwards. Disconnect any time in Triangle under Settings → AI service connections, and access stops immediately.
Once you've seen what the tools return, register your app and wire up the flow.
Trust
What your users can count on
- Their data is never sold or shared for advertising.
- They decide what to share and with whom, and can disconnect your app at any time.
- No drug maker, laboratory or hospital pays Triangle. The people who pay are members.
- Everything is encrypted, and their records are theirs to delete.
- Triangle is HIPAA compliant; details are in its Trust Center.
- Triangle is listed in the Medicare App Library.
Triangle provides research and educational support. It does not diagnose, treat, or prescribe, and it never replaces your care team.
FAQ
Questions developers ask
What does it cost?
Developers register apps in the developer portal from a Triangle account. The people who connect to your app sign in with their own Triangle account. For them, Triangle membership starts with a 7-day free trial, then $9 a month, and covers Triangle requesting their records from hospitals and clinics and keeping them updated.
Will every user's history be complete?
Not always. Triangle requests records through Carequality and TEFCA, and not every hospital or clinic can be reached that way; people can upload the rest. Records arrive as each place responds, so design for a history that starts thin and fills in.
Is there a REST API?
Today you call Triangle's MCP server with the access token, using JSON-RPC methods such as tools/list and tools/call. Full HTTP API documentation is coming soon. Dynamic client registration is reserved for AI platforms such as ChatGPT, Claude and Grok, so your app registers in the portal.
What happens when someone disconnects?
Their refresh tokens are revoked, and access tokens issued before the disconnect are rejected on MCP calls. Treat an auth error as a signal to offer Connect with Triangle again.
Can I develop locally?
Yes. Register an http://localhost redirect base for development alongside your https base for production. Longer callback paths under each base are allowed. Test against your own Triangle profile; separate test patients aren't available.
Does Triangle diagnose or prescribe?
No. Triangle provides research and educational support. It does not diagnose, treat or prescribe, and it never replaces a person's care team.
Register an app and send your first authorize request today
You need a display name and a redirect URI. The rest is standard OAuth.
Developers register apps from a Triangle account. Your users see Triangle's consent screen.
Nod is made by Triangle. You'll create your account at trianglehealth.com.