rcm-mcp-server

keerthirajrr/rcm-mcp-server

3.2

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.

Tools
5
Resources
0
Prompts
0

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 login
  • POST /api/auth/validate - Token validation
Claims Management
  • GET /api/claims - Search claims
  • GET /api/claims/:id - Get specific claim status
Denial Analytics
  • GET /api/denials - List denials with filtering
  • GET /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

ToolDescriptionRequired Scope
get_claim_statusFetch claim status and historyrcm.claim.read
list_denialsQuery denials with analyticsrcm.denial.read
validate_cpt_comboValidate CPT/ICD combinationsrcm.claim.read
analyze_denial_root_causeAI-powered denial analysisrcm.denial.read
generate_appeal_letterCreate appeal lettersrcm.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 operations
  • rcm.denial.read/write - Denial operations
  • rcm.appeal.read/write - Appeal operations
  • rcm.patient.read - Patient data access
  • rcm.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

  1. Create tool file in src/mcp/tools/
  2. Define schema with Zod
  3. Implement run function
  4. Export tool from mcpServer.ts

Adding New Adapters

  1. Create adapter in src/adapters/
  2. Implement interface methods
  3. Add error handling and logging
  4. Use in MCP tools or routes

๐Ÿ“Š Monitoring & Logging

Log Files

  • logs/error.log - Error events
  • logs/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

  1. Follow TypeScript strict mode
  2. Add proper error handling
  3. Include audit logging for sensitive operations
  4. Write tests for new functionality
  5. 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.