Skip to content

AI-powered MCP server for intelligent intake, triage, and routing with multi-industry config

Notifications You must be signed in to change notification settings

nghn0/mcpserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Intelligent Intake and Triage MCP Server

MCP Gemini Docker Multi-Domain

This project builds and containerizes a Model Context Protocol (MCP) server for an Intelligent Intake and Triage system.
It supports dynamic routing, severity scoring, and category classification using configurable rules, with optional integration to LLM providers like Gemini for smarter intake understanding.

The server is designed for multi-industry usage (Healthcare, Finance, E-commerce) by switching configuration folders at runtime using environment variables and Docker volume mounts.


🚀 Getting Started: Building the MCP Server

1) Project Initialization

Create the main project and server directories:

mkdir intake-mcp
cd intake-mcp
mkdir mcp-server
cd mcp-server

2) Configuration Setup

Create the taxonomy, severity, and routing configuration files:

mkdir -p config/healthcare
touch config/healthcare/taxonomy.json
touch config/healthcare/severity.yaml
touch config/healthcare/routing.json

3) Server Files

Create the main Python server file and the requirements list:

touch mcp_server.py
touch requirements.txt

Add these dependencies to requirements.txt:

fastmcp
pyyaml
python-dotenv
httpx
starlette

4) Installation & Execution

Install the required packages and run the server:

pip install -r requirements.txt
python mcp_server.py

✅ Expected Log:

🚀 Starting Intelligent Intake and Triage MCP Server...

5) Health Check

  • Status: http://0.0.0.0:8000 → ✅ MCP is running
  • Health: http://0.0.0.0:8000/healthOK

🐳 Containerization with Docker

1) Multi-Industry Configuration Support

We use Docker to package the server and support multiple industries (Healthcare, Finance, E-commerce) via mounted external configurations.

  • Default Config: config/healthcare/ (Bundled inside the image as a fallback)
  • External Config: external-config/ (Mounted at runtime for multi-industry support)

2) Default Configuration Structures

A) routing.json

{
  "default_destination": "General_Queue",
  "severity_override": {
    "min_score": 9,
    "destination": "ER_Triage",
    "priority": "HIGH"
  },
  "routes": [
    {
      "category": "emergency",
      "threshold": 9,
      "destination": "ER_Triage"
    },
    {
      "category": "billing",
      "threshold": 2,
      "destination": "Billing_Department"
    }
  ]
}

B) severity.yaml

severity_rules:
  critical:
    score: 10
    keywords:
      - chest pain
      - unconscious
  low:
    score: 2
    keywords:
      - billing
      - refund

C) taxonomy.json

{
  "taxonomy": [
    {
      "id": "emergency",
      "keywords": ["chest pain", "heavy bleeding"]
    },
    {
      "id": "billing",
      "keywords": ["insurance", "refund"]
    }
  ]
}

3) Build and Run Docker

Create a Dockerfile in the mcp-server folder, then build the image:

docker build -t intake-triage-server .

Run using External Healthcare Config:

docker run -p 8000:8000 \
  -v $(pwd)/external-config:/config \
  -e CONFIG_PATH=/config/healthcare \
  intake-triage-server

Switching Industries (e.g., Finance): Simply change the CONFIG_PATH environment variable:

-e CONFIG_PATH=/config/finance

🤖 LLM Provider Integration (Gemini)

1) Client Setup

Create the client directory and files:

mkdir mcp-client
cd mcp-client
touch intake_mcp_client.py
touch requirements.txt

Add these to mcp-client/requirements.txt:

fastmcp
google-genai
httpx

2) Execution

Install Client Requirements:

pip install -r requirements.txt

Set API Key:

export GOOGLE_API_KEY="YOUR_API_KEY_HERE"

Run Client:

python intake_mcp_client.py

📁 Final Project Structure

intake-mcp/
├── mcp-server/
│   ├── config/healthcare/
│   │   ├── taxonomy.json
│   │   ├── severity.yaml
│   │   └── routing.json
│   ├── external-config/
│   │   ├── healthcare/
│   │   └── finance/
│   ├── Dockerfile
│   ├── mcp_server.py
│   └── requirements.txt
└── mcp-client/
    ├── intake_mcp_client.py
    └── requirements.txt

🤖 Intelligent Intake & Triage Demos

The MCP Server dynamically routes and processes data based on the domain. Below are examples of the server handling high-stakes intake in two different sectors.

Healthcare Intake Demo Finance Intake Demo

🏥 Healthcare Intake              |              💰 Finance Intake

The MCP server identifies document types, extracts key entities, and assigns priority levels (Triage) in real-time.


About

AI-powered MCP server for intelligent intake, triage, and routing with multi-industry config

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published