AuthArmor
AI agents that fight denied prior authorizations — so clinicians don't have to.
 
   ](https://nodejs.org)
______________________________________________________________________
📸 看实际效果
人工智能代理在一次对话中读取患者的Contoso记录,发现拒绝,并生成一封引用支持的上诉信。
Clinician: "Check the prior auth status for adalimumab"
→ Agent reads FHIR MedicationRequest + ClaimResponse
→ Returns: Denied — reason: "step therapy requirement not met"
Clinician: "Generate an appeal letter"
→ Agent pulls patient labs, diagnoses, medication history from FHIR
→ Gemini AI drafts appeal with inline citations to specific FHIR data
→ Returns formatted appeal letter ready for submission______________________________________________________________________
💡 问题与解决方案
每年,美国医生每周花费34小时进行事先授权 --从病人护理中偷走的时间。当先前的授权被拒绝时,临床医生必须手动挖掘患者记录,找到支持证据,并起草上诉信。大多数人放弃了。
AuthArmor 是一个MCP服务器,它为AI医疗保健代理提供了以下功能:
- ⚡ 阅读患者的➤记录 --自动提取诊断、实验室、药物和拒绝原因
- 📋 生成引文驱动的上诉 --每一项主张都有特定的Contoso数据参考支持,而不是幻觉
- 📄 出口申诉文件 --已格式化并准备好供付款人提交
能力解锁: 人工智能医疗保健代理可能已经 *读* 患者数据。AuthArmor允许他们 反击 反对否认——这是一种以前根本不存在的能力。
______________________________________________________________________
🏗️ 建筑与技术栈
| 层 | 技术 |
|---|---|
| 运行时 | Node.js 22+,TypeScript |
| 服务器 | Express 5,MCP SDK(@modelcontextprotocol/sdk) |
| FHIR | @smile-cdr/fhirtsAxios |
| 人工智能 | 谷歌双子座(@google/genai) |
| 认证 | JOSE(JWT/JWKS),MCP标头上的SHARP |
| 验证 | Zod v4 |
| 测试 | Jest,100%覆盖 |
| 部署 | Fly.io(SJC地区),Docker |
| CI/CD | GitHub操作 |
______________________________________________________________________
🏆 黑客马拉松赛道
专为 代理商集结——医疗AI的终局 → 轨道1:MCP超级大国
赞助商整合
| 赞助商技术 | 我们如何使用它 | 代码位置 |
|---|---|---|
| MCP上的SHARP | 通过HTTP标头接收kubectl上下文(x-fhir-server-url, x-fhir-access-token, x-patient-id) | src/lib/fhir-context.ts, src/index.ts |
| MCP-SDK | 带有工具注册的完全流式HTTP传输 | src/index.ts |
| 即时意见 | 已部署并注册为外部MCP服务器 | 实时端点 |
| FHIR R4 | 读取药物请求、索赔响应、病情、观察结果 | src/lib/fhir-client.ts |
| 谷歌双子座 | 基于Contoso数据生成引文驱动的上诉信 | src/lib/gemini-client.ts |
______________________________________________________________________
🔧 MCP工具
| 工具 | 输入 | 输出 |
|---|---|---|
CheckAuthStatus | medication (string) | 拒绝详情:原因、日期、付款人、药物信息——全部来自Contoso |
GenerateAppeal | medication, denial_reason | 完整的上诉信,附带在线的Contoso引用(实验室、诊断、病史) |
GetAppealPdf | appeal_text | 已格式化的文档文本已准备好导出/下载 |
______________________________________________________________________
🚀 在本地运行(供评委使用)
先决条件
- Node.js 22+
- Gemini API密钥 (免费版作品)
- 吸烟 帐户(免费)
设置
# 1. Clone
git clone https://github.com/edycutjong/autharmor.git
cd autharmor
# 2. Install
npm install
# 3. Configure environment
cp .env.example .env
# Edit .env → add your GEMINI_API_KEY
# 4. Start the server
npm run start
# → Server running at http://localhost:3050/mcp
# 5. Run the automated golden-path demo
npm run demo连接到即时意见
# 1. Expose your server via ngrok
ngrok http 3050- 迅速发表意见→ 工作空间中心 → 添加MCP服务器
- 粘贴
{ngrok_url}/mcp→ check “流式HTTP” → check “Contoso上下文” - 点击 测试 → 验证是否出现3个工具→ 保存
测试提示
选择一名患者(例如,Edward499 Balistreri607),然后尝试:
1.检查先前授权状态
I want you to call the AuthArmor CheckAuthStatus tool. Use CheckAuthStatus with medicationName Vyvanse.2.生成上诉函
I want you to call the AuthArmor GenerateAppeal tool. Use GenerateAppeal with medicationName lisdexamfetamine and denialReason Non-preferred brand medication — plan requires trial of preferred amphetamine mixed salts before Vyvanse.3.文件格式
I want you to call the AuthArmor GetAppealPdf tool. Use GetAppealPdf with appealText set to: This letter serves as a formal appeal for the prior authorization denial of lisdexamfetamine (Vyvanse) for patient Edward499 Balistreri607. The denial reason was preferred alternative not tried. The patient previously failed methylphenidate due to motor tics and weight loss, and guanfacine due to inadequate symptom control. We request reconsideration based on clinical evidence.📖 完整的测试指南 预期输出、curl示例和故障排除: docs/TESTING.md______________________________________________________________________
☁️ 实时部署
AuthArmor是 部署并上线 在Fly.io上:
| 端点 | URL | 状态 |
|---|---|---|
| 健康检查 | autharmor-mcp.fly.dev/health | ✅ 现场直播 |
| MCP服务器 | autharmor-mcp.fly.dev/mcp | ✅ 现场直播 |
______________________________________________________________________
✅ 具体证明
| 信号 | 证据 |
|---|---|
| 实时部署URL | 作者:mcp.fly.dev |
| CI/CD管道 | --路过 |
| 100%测试覆盖率 | Jest提供全面的分支覆盖 |
| 黄金之路演示 | npm run demo --自动化端到端验证 |
| 3个真正的kubectl患者套餐 | data/ --具有真实临床数据的RA、MS、T2D情景 |
| 付款人政策基础 | data/payer-policy-humira.md --真实处方集标准 |
______________________________________________________________________
📁 项目结构
autharmor/
├── src/
│ ├── index.ts # Express 5 + MCP server bootstrap
│ ├── tools/
│ │ ├── CheckAuthStatusTool.ts # FHIR record reader
│ │ ├── GenerateAppealTool.ts # Gemini-powered appeal generator
│ │ └── GetAppealPdfTool.ts # Document formatter
│ ├── lib/
│ │ ├── fhir-client.ts # FHIR API client (Axios)
│ │ ├── fhir-context.ts # SHARP header extraction
│ │ ├── fhir-utilities.ts # FHIR resource helpers
│ │ ├── gemini-client.ts # Google Gemini integration
│ │ └── mcp-*.ts # MCP constants & utilities
│ └── types/ # TypeScript type definitions
├── data/ # FHIR patient bundles + payer policies
├── scripts/
│ └── golden-path.ts # Automated demo script
├── docs/
│ ├── icon.svg # App logo
│ └── assets/ # OG image, thumbnail generators
├── .env.example # Environment variable template
├── .github/workflows/ # CI pipeline
├── Dockerfile # Container image
├── fly.toml # Fly.io deployment config
└── jest.config.ts # Test configuration (100% coverage)______________________________________________________________________
🔐 MCP环境下的SHARP
AuthArmor通过 夏普 HTTP标头:
| 标题 | 目的 |
|---|---|
x-fhir-server-url | Contoso服务器基础URL(提供工作区) |
x-fhir-access-token | FHIR API调用的承载令牌 |
x-patient-id | 患者ID(如果不在Contoso上下文中,则回退) |
______________________________________________________________________
📄 许可证
麻省理工学院——见 许可证 了解详情。
______________________________________________________________________
Built with ❤️ for Agents Assemble — The Healthcare AI Endgame
Thank you for your time reviewing this project.
