Skip to content

edycutjong/autharmor

Repository files navigation

🛡️ AuthArmor

CI Coverage License: MIT Node.js

Citation-driven prior authorization appeals MCP server for healthcare AI agents.

AuthArmor is a SHARP-on-MCP server that helps clinicians and care coordinators fight denied prior authorizations. It reads patient FHIR records, searches payer policies, and generates appeal letters backed by citations to specific clinical data — no hallucinations, no guesswork.

🎯 What It Does

Tool Description
CheckAuthStatus Reads FHIR MedicationRequest + ClaimResponse to find denial details
GenerateAppeal Drafts a citation-driven appeal letter using Gemini AI
GetAppealPdf Returns the appeal text for download/export

🏗️ Architecture

Prompt Opinion Platform
  ↓ POST /mcp (with SHARP headers)
AuthArmor MCP Server
  ├── FHIR Client → reads patient data from workspace FHIR server
  ├── Gemini AI → generates appeal with inline FHIR citations
  └── Returns structured appeal text to agent

🚀 Quick Start

Prerequisites

Setup

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY

# Start the server
npm run start

The server runs on http://localhost:3050/mcp.

Connect to Prompt Opinion

# 1. Install ngrok
brew install ngrok

# 2. Add your authtoken (one-time setup — get it from https://dashboard.ngrok.com/get-started/your-authtoken)
ngrok config add-authtoken YOUR_TOKEN_HERE

# 3. Expose your server
ngrok http 3050
  1. In Prompt Opinion → Workspace Hub → Add MCP Server
  2. Paste {ngrok_url}/mcp → check "Streamable HTTP" → check "FHIR context"
  3. Click Test → verify 3 tools appear → Save

💬 Example Prompts

Try these prompts in Prompt Opinion (select a patient first, e.g. Morgan564 Larson43):

Step 1: Check authorization status

Check the prior auth status for adalimumab

Step 2: Generate appeal letter

Generate an appeal letter for adalimumab — it was denied for "step therapy requirement not met"

Step 3: Format as document

Format this as an appeal document: This letter serves as a formal appeal for the prior authorization denial of adalimumab. The denial reason was step therapy requirement not met. We request reconsideration based on clinical evidence.

☁️ Deployment

AuthArmor is deployed on Fly.io:

Endpoint URL
Health https://autharmor-mcp.fly.dev/health
MCP https://autharmor-mcp.fly.dev/mcp

🔬 SHARP-on-MCP Context

AuthArmor receives FHIR context via SHARP HTTP headers:

Header Purpose
x-fhir-server-url FHIR server base URL
x-fhir-access-token Bearer token for FHIR API calls
x-patient-id Patient ID (fallback)

📋 Hackathon

Built for Agents Assemble — The Healthcare AI Endgame (Track 1: MCP Superpower).

📄 License

MIT

About

Citation-driven prior authorization appeals MCP server for healthcare AI agents

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages