Skip to main content
Glama

병원 WAF 관리 시스템 MCP 서버

Python License MCP

English | 中文

AI 어시스턴트에게 WAF 규칙 탐지 기능을 제공하는 병원용 Web 애플리케이션 방화벽 MCP 서버입니다. SQL 인젝션, XSS, 명령 인젝션, 경로 탐색 탐지를 지원하며 병원 시나리오 전용 규칙이 내장되어 있습니다.

✨ 주요 기능

  • 🔒 SQL 인젝션 탐지 — 일반적인 SQLi 공격 패턴 식별 (UNION 인젝션, 불리언 기반 블라인드, 시간 기반 블라인드, 에러 기반 인젝션)

  • 🎯 XSS 크로스 사이트 스크립팅 탐지 — 반사형/저장형 XSS 탐지 (script 태그, 이벤트 핸들러, JS URI)

  • 명령 인젝션 탐지 — Unix/Windows 시스템 명령 실행 공격 식별

  • 📁 경로 탐색 탐지 — 디렉토리 트래버설 공격 및 인코딩 우회 탐지

  • 🏥 병원 전용 규칙 — HIS/PACS/LIS/RIS 일반적인 취약점 패턴 커버

  • 🔄 핫 리로드 규칙 — 규칙 수정 후 서비스 재시작 불필요

  • 🧪 자체 테스트 — 엔진 성능 검증을 위한 내장 공격 샘플

  • 경량 실행 — 순수 Python 정규식 엔진, 외부 의존성 없음

Related MCP server: Smart EHR MCP Server

🚀 빠른 시작

1. 설치

# 克隆仓库
git clone https://github.com/12211725-star/hospital-waf-mcp.git
cd hospital-waf-mcp

# 安装依赖
pip install -r requirements-mcp.txt

2. MCP 클라이언트에 통합

MCP 클라이언트 설정 파일에 추가:

{
  "mcpServers": {
    "hospital-waf-mcp": {
      "command": "python",
      "args": ["-m", "waf_mcp"],
      "env": {
        "WAF_MCP_LOG_LEVEL": "INFO"
      }
    }
  }
}

Docker 방식

{
  "mcpServers": {
    "hospital-waf-mcp": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "hospital-waf-mcp"],
      "env": {
        "WAF_MCP_LOG_LEVEL": "INFO"
      }
    }
  }
}

Streamable HTTP 원격 배포

export WAF_MCP_TRANSPORT=http
export WAF_MCP_HOST=0.0.0.0
export WAF_MCP_PORT=8000
python -m waf_mcp

MCP 엔드포인트: http://<host>:8000/mcp 상태 확인: GET /health

📖 사용 방법

SQL 인젝션 탐지

Claude / Cursor / 기타 MCP 클라이언트에서:

请帮我检测这个请求是否有安全问题:
URL: https://example.com/search?q=1' OR '1'='1

AI가 waf_check_request 도구를 호출하여 다음을 반환합니다:

[
  {
    "rule_id": "sqli-001",
    "category": "SQL Injection",
    "severity": "high",
    "matched": "1' OR '1'='1",
    "description": "检测到 SQL 注入特征"
  }
]

XSS 공격 탐지

检测这个 POST 请求的 body:
<script>alert('xss')</script>

규칙 통계 확인

当前 WAF 引擎加载了多少规则?

🎯 프롬프트 가이드

보안 평가 시나리오

我需要对一个请求进行安全检测,
URL 是 https://hospital.example.com/api/patient?id=1 UNION SELECT,
请帮我分析是否存在攻击特征。

규칙 운영 시나리오

我刚刚更新了 WAF 规则文件,
请帮我重新加载规则并确认加载成功。

엔진 검증 시나리오

请运行 WAF 引擎自检测试,
确认 SQL 注入和 XSS 检测功能正常。

로그 분석 시나리오

帮我检测这个可疑请求的完整参数:
URL: https://api.hospital.com/query
Method: POST
Body: {"filter": "'; DROP TABLE users; --"}
Headers: {"Content-Type": "application/json"}

🛠️ 도구 목록

도구

설명

매개변수

waf_check_request

WAF 요청 탐지

url: 요청 URL, method: HTTP 메서드, headers: 요청 헤더, body: 요청 본문, cookies: 쿠키

waf_rule_stats

규칙 통계

매개변수 없음

waf_reload_rules

규칙 핫 리로드

매개변수 없음

waf_run_self_tests

자체 테스트

매개변수 없음

📖 환경 변수

변수

설명

기본값

WAF_MCP_TRANSPORT

전송 프로토콜 (stdio/http/sse)

stdio

WAF_MCP_HOST

HTTP 리스닝 주소

127.0.0.1

WAF_MCP_PORT

HTTP 리스닝 포트

8000

WAF_MCP_LOG_LEVEL

로그 레벨

INFO

WAF_RULES_FILE

규칙 파일 경로

waf_mcp/rules/waf_rules.mcp.json

📋 탐지 기능

SQL 인젝션 탐지

위험 유형

심각도

탐지 조건

UNION 인젝션

High

UNION SELECT 등

불리언 블라인드

High

AND/OR 불리언 표현식

시간 블라인드

High

SLEEP/BENCHMARK 등

에러 기반 인젝션

High

EXTRACTVALUE/UPDATEXML 등

스택 쿼리

High

세미콜론으로 구분된 다중 SQL

XSS 탐지

위험 유형

심각도

탐지 조건

script 태그

High

<script> 태그 인젝션

이벤트 핸들러

High

onclick/onerror 등

JavaScript URI

Medium

javascript: 프로토콜

SVG 인젝션

Medium

<svg onload>

명령 인젝션 탐지

위험 유형

심각도

탐지 조건

Unix 명령 인젝션

Critical

; & $ ` 파이프 연결

Windows 명령 인젝션

Critical

&

^ 명령 연결

위험한 명령

Critical

cat/ls/wget/curl 등

경로 탐색 탐지

위험 유형

심각도

탐지 조건

디렉토리 트래버설

High

../ 경로 탐색

URL 인코딩 우회

High

%2e%2e/ 등 인코딩

이중 인코딩 우회

High

%252e%252e/

병원 시나리오 전용

시스템 유형

키워드

HIS

병원 정보 시스템, 외래, 입원, 접수

PACS

영상, DICOM, 방사선

LIS

검사, 실험실, 생화학

RIS

방사선 정보 시스템, 영상 진단

EMR

전자 의무 기록, 경과 기록

🔧 개발

git clone https://github.com/12211725-star/hospital-waf-mcp.git
cd hospital-waf-mcp
pip install -e .

# 运行测试
python scripts/run_functional_tests.py

# 本地运行
python -m waf_mcp

📁 프로젝트 구조

hospital-waf-mcp/
├── waf_mcp/                  # MCP 服务包
│   ├── __init__.py
│   ├── __main__.py
│   ├── config.py
│   ├── server.py
│   ├── version.py
│   ├── waf_engine.py
│   └── rules/
│       └── waf_rules.mcp.json
├── scripts/                  # 脚本工具
├── modelscope.yaml           # 魔搭配置
├── mcp.json                  # MCP 元数据
├── mcp_config.json           # MCP 客户端配置
├── pyproject.toml            # Python 项目配置
└── README.md

📄 라이선스

MIT License

🔗 링크

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants to perform YARA rule-based threat analysis on files and URLs, supporting comprehensive rule management and detailed scanning results.
    23
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that connects AI tools to Electronic Health Records using SMART on FHIR, allowing secure searching, querying, and analysis of patient data from compatible EHRs.
    84
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for AI agent security guardrails. Provides input validation, prompt injection detection, PII redaction, output filtering, policy enforcement, rate limiting, and comprehensive audit logging.
    45
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A governed, audited Model Context Protocol server that provides AI agents with secure, read-only access to a clinical knowledge base through least-privilege tools, policy validation, and append-only audit logging.
    MIT

View all related MCP servers

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

  • Hosted MCP server exposing US hospital procedure cost data to AI assistants

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/12211725-star/hospital-waf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server