nod AI agentsAboutCreate an app

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.

Create a developer app

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.

connect-button.html
<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

  1. 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
  2. Send people to consent

    Link to the authorize endpoint with a random state, a PKCE challenge and resource set 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.

    authorize.js
    // 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}`;
  3. 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.

    token.sh
    # 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

OAuth flow. 1, your app sends the person to Triangle's authorize endpoint with PKCE and the MCP resource. 2, Triangle asks them to sign in. 3, they set Read and Write for each requested scope on the consent screen and accept. 4, Triangle redirects to your redirect URI with a code. 5, your app posts the code and verifier to the token endpoint. 6, Triangle returns an access token of about an hour and a rotating refresh token. 7, your app calls Triangle's MCP server with the bearer token. At any time the person can disconnect in Settings, AI service connections, which revokes the app's tokens. Your appTheir browserTriangle 1 GET /oauth/authorize client_id, scope, state, code_challenge, resource 2 Sign in to Triangle 3 Set Read and Write per scope, then Accept 4 Redirect to your redirect_uri with ?code and state 5 POST /oauth/token code + code_verifier 6 access_token (about 1 hour) + refresh_token (rotates) 7 POST /mcp tools/list, tools/call Authorization: Bearer
  1. Your app → Triangle
    GET /oauth/authorize with client_id, scope, state, a PKCE challenge (S256) and resource set to the MCP endpoint.
  2. Triangle → their browser
    They sign in to Triangle.
  3. Their browser → Triangle
    They set Read and Write for each requested scope on the consent screen and accept.
  4. Triangle → your app
    Redirect to your redirect_uri with a code and your state.
  5. Your app → Triangle
    POST /oauth/token with the code and code_verifier.
  6. Triangle → your app
    An access token (about an hour) and a refresh token that rotates.
  7. Your app → Triangle
    POST /mcp with 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.

AreaScopesExample tools
Profile and overviewpatient:readget_patient, get_health_overview
Medical recordsmedical_records:read, :writeget_medical_records, search_documents, get_clinical_summary
Lab resultslabs:readget_labs_overview, get_lab_result
Medicationsmedications:read, :writeget_medications, update_medication
Measurements and devicesmeasurements:read, devices:readget_measurements, get_wearable_days
Care teamcare_team:read, :writeget_care_team_practitioners
Appointmentsappointments:read, :writelist_appointments, schedule_appointment
Routines and remindersroutines:read, :writelist_routines, update_routines
Genome and tumor genomicsgenome:read, genomics_run:readget_genome_overview, get_genomics_run

Try 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

MCP server
https://app.trianglehealth.com/mcp
  1. Copy the address. It is also in Triangle under Settings → AI service connections → Connect.
  2. Add a custom connector in your assistant. The menus for each are in the tabs.
  3. Sign in to Triangle when asked. Claude asks the first time it uses a Triangle tool.
  4. Set Read and Write for each category on the consent screen, pick the profile to share, then Accept.
connector setup

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.

Create a developer app

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.