rcm-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@rcm-mcpVerify eligibility for patient 789 for a routine checkup next Friday"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Healthcare Revenue Cycle Management (RCM) Multi-Agent MCP Server
An AI-native multi-agent Revenue Cycle Management (RCM) MCP server implementing Eligibility Verification, Prior Authorization, and a Shared Reasoning Trace backed by Supabase and pgvector.
Architecture Overview
┌────────────────────────────┐
│ RCM Multi-Agent System │
│ (Eligibility / PriorAuth)│
└─────────────┬──────────────┘
│ (SSE / HTTP / stdio)
┌─────────────▼──────────────┐
│ FastMCP Server (Port 8000)│
│ trace.* | eligibility.* │
│ priorauth.* │
└─────────────┬──────────────┘
│
┌──────────────────────┴──────────────────────┐
▼ ▼
┌────────────────────────┐ ┌────────────────────────┐
│ Supabase Relational │ │ pgvector / Semantic │
│ (Payers, Coverage, │ │ (Historical Clinical │
│ Rules, Traces) │ │ Precedents & Cases) │
└────────────────────────┘ └────────────────────────┘Related MCP server: mymedi-ai-mcp-server
1. Supabase Database Setup
Step 1.1: Create a Supabase Project
Log in to Supabase and create a new project.
Under Project Settings -> Database, note your Project URL and API Keys (
anonorservice_role).
Step 1.2: Enable pgvector & Apply Schema
Open the SQL Editor in your Supabase Dashboard.
Copy and paste the contents of
supabase/schema.sqland run it:Enables
vectorextension (CREATE EXTENSION IF NOT EXISTS vector;).Creates tables:
payers,appointments,patient_coverage,benefit_accumulators,payer_pa_rules,pa_requests,agent_trace(append-only), andescalations.Creates the
match_pa_casescosine similarity vector search function.
Step 1.3: Load Seed Data
You can seed synthetic data into Supabase using either option:
Option A (Python Seeder Script):
Once you configure .env with your SUPABASE_URL and SUPABASE_KEY:
python seed_data.pyOption B (SQL Editor):
In the SQL Editor, copy and paste the contents of supabase/seed.sql and run it.
This seeds:
5 Payers: Aetna Commercial, Blue Cross Blue Shield, UnitedHealthcare, Medicare Part B, Cigna.
5 Appointments: Scheduled visits with target Dates of Service (DOS).
Coverage Records: Active vs. terminated policies for edge-case testing.
Benefit Accumulators: Deductibles, copays, coinsurance for specific CPT codes.
PA Rules & Precedents: Prior authorization guidelines and historical cases with embeddings.
2. Environment Configuration
Copy .env.example to .env:
cp .env.example .envUpdate your .env file with your credentials:
# Supabase Configuration
SUPABASE_URL=https://<your-project-ref>.supabase.co
SUPABASE_KEY=<your-supabase-service-role-or-anon-key>
# Server Configuration
MCP_SERVER_HOST=0.0.0.0
MCP_SERVER_PORT=8000
# Optional Embedding Key
OPENAI_API_KEY=3. Installation
Install project dependencies:
pip install -r requirements.txt4. MCP Tools Reference
A. Shared Trace Tools (trace.*)
Used across all agents to maintain an append-only, auditable decision log.
Tool Name | Description | Key Inputs | Output |
| Appends a decision record to the trace log |
|
|
| Pulls chronological decision history for an encounter |
|
|
| Queues a case for human supervisor review |
|
|
B. Eligibility Tools (eligibility.*)
Verifies patient coverage on the actual appointment Date of Service (DOS) and estimates patient cost.
Tool Name | Description | Key Inputs | Output |
| Validates active policy window against target service date |
|
|
| Retrieves accumulator balances |
|
|
| Logs a detected coverage gap to trace |
|
|
C. Prior Authorization Tools (priorauth.*)
Automates procedure rule lookup, precedent search, and clinical justification submission.
Tool Name | Description | Key Inputs | Output |
| Checks if procedure code requires prior authorization |
|
|
| Submits clinical justification and receives status |
|
|
| Polls submitted authorization status |
|
|
| Semantic vector search over historical PA cases |
|
|
5. Running the MCP Server
Option A: SSE Transport (Default)
Starts the FastMCP server over Server-Sent Events (SSE):
python run_server.pyThe SSE endpoint will be available at:
http://localhost:8000/sse
Option B: Custom Host/Port or Stdio
You can customize transport parameters directly:
# Run over stdio (e.g. for Claude Desktop / CLI clients)
python src/mcp_server/server.py --transport stdio
# Run over SSE on custom port
python src/mcp_server/server.py --transport sse --port 80806. Testing & Verification
Run the test suite with pytest:
pytest tests/Expected output:
tests\test_mcp_tools.py .......... [100%]
============================= 10 passed in 0.07s ==============================7. Connecting to Agent Clients
Claude Desktop Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"rcm-server": {
"command": "python",
"args": ["<path-to-repo>/src/mcp_server/server.py", "--transport", "stdio"]
}
}
}This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic compliance and vertical knowledge bases for autonomous agents. Free 24hr trial.
- ScribaseOAuthcom.scribase
Supabase-compatible Postgres for agents: projects, branches, SQL, auth, storage, email.
AI routing, memory, guardrails, and governance. Routes across Claude, GPT, Gemini.
Build agents to automate any background task. Works with your ChatGPT/Claude subscription.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LLM-based agents to interact with FHIR healthcare data through natural language prompts, providing full CRUD operations on FHIR resources, document processing, and semantic search capabilities.13102MIT
- AlicenseAqualityCmaintenanceHealthcare billing AI for agents — 12 tools for ICD-10/CPT/HCPCS code lookup (80K+ codes), prior auth prediction, medical NER, claims validation, HIPAA compliance auditing, and provider/drug enrichment. Pay-per-call via credits or USDC.2025 npm3MIT
- FlicenseNot gradedqualityDmaintenanceEnd-to-end Prior Authorization decision-support system with a multi-agent AI pipeline, MCP Tool Registry, and PostgreSQL backend.1-
- AlicenseAqualityCmaintenanceEnables AI assistants to look up medical billing codes, denial reasons, and payer rules for faster claim resolution.66MIT