insurance-claim-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., "@insurance-claim-mcp 이 영수증의 KCD 코드와 진료비로 예상 보험금을 계산해줘"
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.
insurance-claim-mcp
약봉투·진료비 영수증의 정보(KCD 질병코드, 처치, 진료비)를 가입 보험 약관과 대조해 예상 보험금을 안내하는 MCP(Model Context Protocol) 서비스입니다.
정보 제공용 예상치입니다. 실제 지급 여부와 금액은 보험사 심사에 따라 달라집니다.
mcp-name: io.github.seothief/insurance-claim-mcp
빠른 시작 (설치형 MCP 서버)
uv가 있으면 설치 없이 바로 실행됩니다. 데이터는 내 PC의 ~/.insurance-claim-mcp/(SQLite)에만 저장됩니다.
{
"mcpServers": {
"insurance-claim": { "command": "uvx", "args": ["insurance-claim-mcp"] }
}
}Claude Code: claude mcp add insurance-claim -- uvx insurance-claim-mcp
PostgreSQL을 쓰려면 uvx --from "insurance-claim-mcp[postgres]" insurance-claim-mcp와 DATABASE_URL을 지정합니다.
에이전트용 사용 지침은 skills/insurance-claim-mcp/SKILL.md, 마켓 등록 절차는 docs/PUBLISHING.md를 참고하세요.
Related MCP server: jhnrd
English (US supplemental plans)
Estimates what US hospital indemnity, accident and critical illness plans pay, from the plan's schedule of benefits and the ICD-10-CM codes on the hospital bill. The math runs in a deterministic, fail-closed rule engine: a benefit the schedule doesn't confirm comes back NOT_EVALUATED, never a guess.
claude mcp add insurance-claim -- uvx insurance-claim-mcpSupported benefits: hospital admission, daily confinement (max days, elimination period), ICU days, critical illness lump sum (ICD-10-CM prefixes, % of face amount), accident fracture schedule, and ER visits. Agent instructions: skills/us-supplemental-claims/SKILL.md. Data stays local (~/.insurance-claim-mcp/). Estimates only, not claim decisions.
핵심 설계 및 아키텍처
LLM 추론 + 결정론적(Deterministic) 규칙 엔진 분리
비정형 데이터(보험증권·병원 영수증 이미지) 판독과 사용자 대화는 AI 클라이언트가 수행하고, 환각(Hallucination)이 없어야 하는 약관 대조 및 예상 보험금 계산은 서버 규칙 엔진이 전담합니다.
Fail-Closed 안전장치: 약관 원문 검증(
verified=true)이 완료되지 않았거나 보험증권(POLICY_CERTIFICATE) 출처가 확인되지 않은 특약은 추측 계산하지 않고NOT_EVALUATED(0원)로 반환합니다.
MCP 3대 구성요소(Tools · Resources · Prompts) 표준 구현
Tools (11개): 사용자 등록(
register_user), 보험 등록/갱신(register_user_policy), 미매핑 특약 재질의 확정(resolve_user_rider), 예상 보험금 계산(evaluate_claim) 등 상태 변경 및 연산 수행Resources (3개): 온보딩 가이드(
insurance://guide/onboarding), 표준 담보 규칙 카탈로그(insurance://rules/standard), 보험사 공식 서류 요청 안내 동적 템플릿(insurance://guide/document-request/{policy_type}/{product_name})
Prompts (1개): 단계별 보험 등록 및 영수증 평가를 유도하는 표준 AI 비서 지침(
insurance_assistant_prompt) 및ai_follow_up_prompt기반 역질문 오케스트레이션MCP 전용 인터페이스 및 서버리스 최적화
보험 업무는 **FastMCP (
Streamable HTTP /mcp및 로컬stdio)**로만 제공합니다. Cloud Run 상태 확인용/api/health,/api/version외에는 REST API, OpenAPI 스키마, 웹 브리지 또는 소개 페이지를 제공하지 않습니다.Cloud Run 서버리스 스케일링 환경을 위해
stateless_http=True및combine_lifespans를 적용하고, 리버스 프록시 뒤에서/mcp307 리다이렉트 시 발생하는 HTTPS→HTTP 다운그레이드를 ASGI 미들웨어 경로 정규화로 해결했습니다.
이용 가이드
최종 사용자(보험 가입자)와 설정자·운영자를 위한 종합 사용법은 이용 가이드를 참조하세요.
로컬 실행
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.lock.txt
.\.venv\Scripts\python.exe -m uvicorn claim_service.main:app --app-dir src --port 8080상태 확인:
GET /api/health,GET /api/version(인증 불필요)설치가 실패하거나
pip이 없는 경우(No module named pip,pip._vendor누락): 로컬 개발 환경 설치MCP 엔드포인트 (Streamable HTTP):
POST /mcp(또는/mcp/)MCP 로컬 실행 (stdio):
.\.venv\Scripts\python.exe -m claim_service.mcp.server
데이터베이스 및 보안
기본: 로컬 SQLite (
claim_service.db, 프로젝트 루트에 생성되며.gitignore로 커밋 제외)클라우드: 환경변수
DATABASE_URL을 PostgreSQL URL로 지정 (예:postgresql+psycopg://...)평가 요청(질병코드, 진료비)은 저장하지 않고 계산 결과만 반환합니다.
MCP HTTP 접근은 사용자별 API 키(
X-User-Key헤더 또는Bearer)로 인증합니다. 키 원문은 발급 시 한 번만 표시되고 서버에는 SHA-256 해시만 저장됩니다. 키 인증은 요청을 소유 사용자에 귀속시킵니다(PIN 입력 대체). PIN 보호 계정은PBKDF2-HMAC-SHA256(120,000회 반복) 해시로 검증을 유지합니다. 키 발급·폐기는 사용자별 API/MCP 키 가이드, 연결 설정은 클라이언트 연결 가이드, 종합 사용법은 이용 가이드를 참조하세요.
테스트 및 정적 분석
.\.venv\Scripts\python.exe -m pytest -q
.\.venv\Scripts\python.exe -m ruff check src tests scripts
.\.venv\Scripts\python.exe -m mypy src배포
main에 CI를 통과한 변경을 병합하면 GitHub Actions가 Cloud Run에 자동 배포하고
/api/health, /api/version을 확인합니다. 수동 배포는 GitHub의
Actions → Deploy to Cloud Run → Run workflow 한 번으로 실행할 수 있습니다.
최초 설정에 필요한 GitHub 변수, Workload Identity Federation 및 권한은
배포 설정 안내를 참조하세요. 운영 배포는 이 로컬 작업에서 실행하지 않습니다.
진행 현황
라이선스
Available Tools
11 toolsdelete_user_policyDelete User PolicyC
해지한 보험 계약을 삭제합니다.
Inputs: user_id (required), policy_id (required), pin. Returns: object
evaluate_claimEvaluate ClaimB
영수증/처방전 정보로 예상 보험금을 계산합니다. 입력된 진료 정보는 저장되지 않습니다.
Estimate benefits from a bill. US plans: send icd10_code, is_inpatient, inpatient_days, icu_days, is_injury, is_emergency. Claim data is never stored.
Inputs: claim (required), user_id (required), pin. Returns: object
get_document_request_guideGet Document Request GuideB
보험사에 요청해야 할 증권과 약관 목록, 요청 문구, 공식 요청 경로를 돌려줍니다.
For US_* policy types, returns an English checklist for the schedule of benefits.
Inputs: policy_type (required), product_name (required). Returns: object
get_onboarding_guideGet Onboarding GuideA
서비스 시작 시 가장 먼저 호출합니다. 온보딩 절차와 bound_user_id를 반환합니다.
Inputs: no named parameters. Returns: object
get_user_profileGet User ProfileC
사용자의 온보딩 상태, 등록 보험 수, 미매핑 특약을 조회합니다.
Inputs: user_id (required), pin. Returns: object
list_standard_rulesList Standard RulesB
Return the standard coverage rules. verified is False until checked against policy text.
Inputs: no named parameters. Returns: result
list_user_policiesList User PoliciesC
사용자의 활성 보험 계약 및 특약 목록을 조회합니다.
Inputs: user_id (required), pin. Returns: result
register_userRegister UserC
신규 사용자를 등록합니다. 타인과 겹치지 않도록 4자리 이상의 PIN을 함께 설정합니다.
Inputs: user_id (required), pin, birth_year, display_alias. Returns: object
register_user_policyRegister User PolicyA
보험을 등록하거나 갱신합니다. 미매핑 특약은 resolve_user_rider로 확정하세요.
Register or update a policy. US plans: policy_type US_HOSPITAL_INDEMNITY / US_ACCIDENT / US_CRITICAL_ILLNESS, amounts in dollars, schedule terms in each rider's rule_config_override.
source_type: 보험증권에서 읽은 계약이면 POLICY_CERTIFICATE와 issuer, issued_on(YYYY-MM-DD)을 함께 보냅니다. 계약과 특약 모두 POLICY_CERTIFICATE일 때만 계산됩니다.
Inputs: riders (required), company (required), user_id (required), policy_type (required), +8 more. Returns: object
resolve_user_riderResolve User RiderC
미매핑 특약의 매핑을 확정합니다 (MAPPED, CUSTOM, IGNORED).
rule_config_override: 증권/약관에서 확인한 이 특약만의 지급 요건(예: {"target_kcd_prefixes": ["S72"]}). POLICY_CERTIFICATE 출처 특약에서 계산에 반영됩니다.
Inputs: user_id (required), rider_id (required), mapping_status (required), pin, +4 more. Returns: object
update_user_riderUpdate User RiderC
특약 1건의 가입금액을 변경합니다.
Inputs: user_id (required), rider_id (required), coverage_amount (required), pin. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools map to a distinct resource+action (onboarding, user, policy, rider, rules, claim evaluation). The main overlap is register_user_policy, which explicitly says it registers *or updates* a policy, blurring its boundary with update_user_rider and resolve_user_rider. The three guide/list tools (get_onboarding_guide, get_document_request_guide, list_standard_rules) are related but distinguishable by descriptions.
Every tool follows a clean snake_case verb_noun pattern: get_*, list_*, register_*, resolve_*, update_*, delete_*, evaluate_*. Verbs are used consistently for their action type with no camelCase or stylistic mixing.
11 tools sit squarely in the well-scoped range and each covers a meaningful piece of the claim workflow (onboarding, user, policies, riders, rules, evaluation). No obviously redundant or filler tools.
The surface covers onboarding, user registration/profile, policy CRUD, rider resolution/updating, standard rules, and stateless claim evaluation, so core lifecycle is present. Minor gaps exist: no delete-user or profile-update operation, no standalone rider deletion, and no persisted claim history, but these are workable around.
Maintenance
Related MCP Connectors
Inspect payment policy, retrieve and verify receipts, or create post-payment observation receipts.
Calculate Actuarial Value (AV) & metal tier of a health insurance plan from any document.
Deterministic CMS NCCI/MUE claim scrubbing and CARC/RARC denial explanations, cited to source.
Medicare coverage and fee-schedule amounts for CPT/HCPCS codes against a diagnosis
Related MCP Servers
AlicenseAqualityCmaintenanceProvides live US healthcare cost data including procedure cost estimates, provider pricing, insurance coverage rules, and medical bill analysis using real hospital transparency and CMS data.1293 npmMIT- FlicenseNot gradedqualityCmaintenanceRead-only, key-less MCP for Japanese home-visit-nursing reimbursement rules: every requirement carries its source and that source's standing (statute / agency / secondary), and anything unconfirmed is published as unconfirmed. It returns evidence, never a billing decision.1-
- AlicenseAqualityBmaintenanceUS federal student loan repayment math for AI agents, from a parity-verified engine rather than estimated. RAP, IBR, ICR, PAYE and tiered Standard payments with forgiveness timing and tax on forgiveness, plus the plans a borrower is excluded from and the rule why, such as Parent PLUS not qualifying for RAP. No key to start; keyed answers at mcp.finology.tech/mcp add citations.3124 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables insurance claims review assistance by querying a knowledge graph of Korean standard insurance terms, restoring applicable policy versions by enrollment date, and returning coverage/exclusion determinations with cited provisions.MIT