← All articles
AI & MLNovember 24, 2026

Connect FHIRfly to Your AI Tools: Grounded Codes in One URL

Paste one URL, sign in, click Allow. Claude, ChatGPT and other MCP clients can now look up NDC, ICD-10, LOINC, NPI and claims edits instead of guessing them.

An AI assistant connected to healthcare reference data

Ask a general-purpose model for the NDC of a specific insulin package, or whether two CPT codes trip an NCCI edit, and it will usually answer. Often the answer is plausible, well formatted and wrong. You can now fix that by connecting FHIRfly to the AI tools you already use, with one URL and no API key.

Why models need a lookup, not a better prompt

Medical codes are the worst case for parametric memory. They are high-cardinality identifiers with no semantic structure a model can reason from: nothing about 00002-8215-01 says "Humulin R". They also change constantly. The FDA NDC Directory is updated daily, CMS publishes NCCI edits quarterly, and code sets like ICD-10-CM and HCPCS turn over every year. A model trained months ago cannot know about any of it.

A model that misremembers a code doesn't say "I don't know". It produces a code with the right shape, and that is the failure mode that matters in healthcare. Prompting can make a model more careful. It cannot give the model data it never saw.

The fix is retrieval at the moment of the question: let the model call a tool that returns the authoritative record, then answer from that. This is what the Model Context Protocol (MCP) standardizes. FHIRfly has served MCP over streamable HTTP at https://api.fhirfly.io/mcp for a while. What's new is how you connect to it.

What changed: OAuth instead of API keys

Until now, connecting an AI client to FHIRfly meant creating an API key, pasting it into a JSON config file, and often installing a local Node.js process. That is fine for developers and a wall for everyone else.

FHIRfly now implements the MCP authorization flow end to end:

  • OAuth 2.1 with PKCE (S256). The client never sees your password or an API key.
  • Dynamic Client Registration (RFC 7591). The AI client registers itself with FHIRfly, so there is no client ID to copy.
  • Short-lived, rotating tokens. Access tokens last 10 minutes. Refresh tokens last 30 days and rotate on every use, and replaying an old one revokes the whole family.
  • Per-organization consent. You choose which FHIRfly organization the client acts for, and usage counts against that organization's plan.

The result: paste https://api.fhirfly.io/mcp, sign in with an email code, click Allow. Revoke it any time from Dashboard → API Credentials → Connected apps.

Which clients work

Anything that speaks remote MCP with OAuth and dynamic client registration.

Claude. Add a custom connector under Settings → Connectors, keep the defaults (Sign in now and Register automatically), and you're done. We've verified this end to end, including real tool calls. Step-by-step instructions are in Connect to Claude.

ChatGPT. On the web, open Plugins (chatgpt.com/plugins), click Add → Add custom MCP server, enter https://api.fhirfly.io/mcp and choose OAuth. ChatGPT registers itself with FHIRfly and sends you through the same sign-in and consent. We've verified this end to end too. Workspace policies apply, so a Business or Enterprise admin may need to allow custom servers first. Step-by-step instructions are in Connect to ChatGPT.

Coding agents and IDEs. Claude Code, Cursor, VS Code and other local clients complete OAuth through a redirect to localhost. FHIRfly accepts loopback redirect URLs, so these work too. In Claude Code:

claude mcp add --transport http fhirfly https://api.fhirfly.io/mcp

If your client can't do OAuth, the API-key setup still works. See Claude Desktop Setup.

What the model gets

Once connected, the model can call 62 tools across the terminologies healthcare work actually touches:

AreaExamples
DrugsNDC, RxNorm, RxClass, FDA labels (dosing, safety, interactions), J-codes
Diagnoses and proceduresICD-10, SNOMED CT, HCPCS, MS-DRG, HCC, OPCS-4
Labs and unitsLOINC, UCUM conversion and validation
ProvidersNPI lookup and search, FHIR endpoint connectivity
ClaimsNCCI edits, MUE limits, Physician Fee Schedule, LCD/NCD coverage
ImmunizationsCVX, MVX

Every tool is annotated read-only. None of them write anything, which matters because some clients ask for confirmation before write actions. Batch tools let an agent check hundreds of NDCs or dozens of ICD-10 codes in one call.

Every response carries provenance: the source, its update cadence and a citation. Ask whether CPT 99213 and 36415 can be billed together and the model gets back:

{
  "can_bill_together": true,
  "edits": [],
  "summary": "No active NCCI PTP edits found between codes 99213 and 36415. They can be billed together."
}

plus "citation": "CMS NCCI. Accessed 2026-11-24 via FHIRfly." The model can cite the source rather than vouch for the answer itself.

Where it helps, and where it doesn't

Good fits:

  • Coding and billing review. Validate code pairs, check unit limits and look up fee schedule values while drafting or auditing a claim.
  • Medication reconciliation and data cleanup. Normalize NDCs to RxNorm, map SNOMED concepts to ICD-10, and flag inactive codes in a spreadsheet the model is reading.
  • Building software. A coding agent that can look up real LOINC codes and real response shapes writes better fixtures and integration code than one that invents them.
  • Provider directories. Resolve NPIs, specialties and FHIR endpoints without leaving the conversation.

Limits worth stating plainly:

  • Tools ground the lookup, not the reasoning. A correct code doesn't make the model's clinical interpretation correct. FHIRfly returns reference data, not medical advice.
  • The model decides when to call a tool. If it's confident, it may answer from memory. Naming FHIRfly in the prompt, or asking it to verify codes, helps.
  • No PHI is needed, and none should be sent. Every tool takes codes, names or search terms. Nothing requires patient identifiers.

Key Takeaways

  • Models guess medical codes with high confidence. Retrieval at question time is the fix, and MCP is the standard way to provide it.
  • FHIRfly's MCP endpoint, https://api.fhirfly.io/mcp, now supports OAuth 2.1 with PKCE and dynamic client registration: one URL, sign in, Allow.
  • It works today in Claude and ChatGPT (both verified end to end), and in local clients like Claude Code, Cursor and VS Code.
  • 62 read-only tools cover drugs, diagnoses, labs, providers and claims, and every response includes provenance the model can cite.

Further Reading

Tagsaimcpoauthagentsterminology
Written by The FHIRfly Team — healthcare data, AI, and interoperability folks building better clinical coding APIs.

Build it on real terminology

Try any endpoint live — no sign-up required.

© 2026 FHIRfly.io LLC. All rights reserved. · Terminology data sourced from official registries, updated daily.