keerthirajrr/rcm-mcp-server
If you are the rightful owner of rcm-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A comprehensive Node.js server implementing Model Context Protocol (MCP) for healthcare Revenue Cycle Management (RCM) that serves both React frontends and AI agents.
Healthcare RCM MCP Server API
A comprehensive Node.js server implementing Model Context Protocol (MCP) for healthcare Revenue Cycle Management (RCM) that serves both React frontends and AI agents.
๐๏ธ Architecture
React Frontend โ Node.js MCP Server API โ Adapters (EHR / DB / Clearinghouse / Payer APIs)
โ MCP Tool Interface (Model Context Protocol)
โจ Features
Core RCM Functionality
- Claim Status Tracking: Real-time claim status from EHR/clearinghouses
- Denial Management: Comprehensive denial analytics and root cause analysis
- Appeal Generation: AI-powered appeal letter generation
- CPT/ICD Validation: Code combination validation with warnings
- HIPAA Compliance: Built-in PHI redaction and audit logging
MCP Integration
- Dual Interface: REST API for React + MCP for AI agents
- Tool-Based Architecture: Modular MCP tools for specific RCM tasks
- Context-Aware: Authentication and permission-based data access
- Extensible: Easy to add new tools and adapters
Security & Compliance
- JWT Authentication: Role-based access control
- PHI Redaction: Automatic sensitive data redaction
- Audit Logging: HIPAA-compliant audit trails
- Rate Limiting: DDoS protection
- Input Validation: Comprehensive request validation
๐ Quick Start
1. Installation
npm install
2. Environment Setup
cp .env.example .env
# Edit .env with your configuration
3. Development
npm run dev
The server will start on http://localhost:4000
4. Testing Authentication
# Login as admin
curl -X POST http://localhost:4000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "admin123"}'
# Use the returned token for subsequent requests
export TOKEN="your-jwt-token-here"
๐ API Documentation
REST Endpoints (for React Frontend)
Authentication
POST /api/auth/login
- User loginPOST /api/auth/validate
- Token validation
Claims Management
GET /api/claims
- Search claimsGET /api/claims/:id
- Get specific claim status
Denial Analytics
GET /api/denials
- List denials with filteringGET /api/denials/:id/analyze
- Root cause analysis
Appeal Management
POST /api/appeals/generate
- Generate appeal letters
MCP Interface (for AI Agents)
Tool Discovery
curl -X POST http://localhost:4000/mcp \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"method": "list_tools"}'
Tool Execution
curl -X POST http://localhost:4000/mcp \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"method": "call_tool",
"params": {
"name": "list_denials",
"arguments": {
"category": "authorization",
"limit": 10
}
}
}'
๐ ๏ธ Available MCP Tools
Tool | Description | Required Scope |
---|---|---|
get_claim_status | Fetch claim status and history | rcm.claim.read |
list_denials | Query denials with analytics | rcm.denial.read |
validate_cpt_combo | Validate CPT/ICD combinations | rcm.claim.read |
analyze_denial_root_cause | AI-powered denial analysis | rcm.denial.read |
generate_appeal_letter | Create appeal letters | rcm.appeal.write |
๐ Authentication & Authorization
User Roles
- Admin: Full access to all features
- Billing Manager: Claims, denials, appeals management
- Biller: Read claims/denials, basic operations
- Readonly: View-only access for reports
Default Test Users
- Username:
admin
, Password:admin123
- Username:
billing_manager
, Password:billing123
Scopes System
Fine-grained permissions:
rcm.claim.read/write
- Claim operationsrcm.denial.read/write
- Denial operationsrcm.appeal.read/write
- Appeal operationsrcm.patient.read
- Patient data accessrcm.analytics.read
- Analytics access
๐ฅ Healthcare Compliance
HIPAA Features
- PHI Redaction: Automatic sensitive data masking
- Audit Logging: Complete activity tracking
- Access Controls: Role-based data access
- Secure Transport: HTTPS enforcement
- Data Minimization: Scope-based data filtering
Integration Points
- EHR Systems: Modular adapter pattern
- Clearinghouses: EDI processing support
- Payer APIs: Multi-payer integration ready
- Analytics: Power BI/Tableau compatible
๐งช React Frontend Integration
Example: Fetching Denials
// React component example
const [denials, setDenials] = useState([]);
useEffect(() => {
fetch('/api/denials?category=authorization&limit=50', {
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
})
.then(res => res.json())
.then(data => setDenials(data.data));
}, []);
Example: Generating Appeals
const generateAppeal = async (denialId: string) => {
const response = await fetch('/api/appeals/generate', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
denial_id: denialId,
template_type: 'medical_necessity',
include_clinical_notes: true
})
});
const appeal = await response.json();
return appeal.data;
};
๐ง Development
Project Structure
src/
โโโ adapters/ # External system integrations
โโโ mcp/ # MCP tools and server
โโโ routes/ # REST API endpoints
โโโ types/ # TypeScript definitions
โโโ utils/ # Utilities (auth, logging, etc.)
โโโ server.ts # Main server file
Adding New MCP Tools
- Create tool file in
src/mcp/tools/
- Define schema with Zod
- Implement
run
function - Export tool from
mcpServer.ts
Adding New Adapters
- Create adapter in
src/adapters/
- Implement interface methods
- Add error handling and logging
- Use in MCP tools or routes
๐ Monitoring & Logging
Log Files
logs/error.log
- Error eventslogs/audit.log
- HIPAA audit trail
Health Check
GET /health
- Server status and metrics
Monitoring Integration
Ready for APM tools like:
- New Relic
- DataDog
- Application Insights
๐ Deployment
Production Checklist
- Set strong JWT_SECRET
- Configure real database connections
- Set up log rotation
- Enable HTTPS
- Configure monitoring
- Set up backup systems
- Review security headers
Docker Support (Optional)
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY dist ./dist
EXPOSE 4000
CMD ["node", "dist/server.js"]
๐ค Contributing
- Follow TypeScript strict mode
- Add proper error handling
- Include audit logging for sensitive operations
- Write tests for new functionality
- Update documentation
๐ License
MIT License - see LICENSE file for details.
๐ Support
For technical support or integration questions:
- Check the API documentation above
- Review the example implementations
- Ensure proper authentication setup
- Verify required scopes for operations
This server provides a solid foundation for healthcare RCM operations while maintaining HIPAA compliance and supporting both traditional web applications and modern AI-powered workflows.