Hospital WAF MCP
Hospital WAF Management System MCP Server
Englisch | 中文
Ein MCP-Server für eine Web Application Firewall (WAF) in Krankenhäusern, der KI-Assistenten WAF-Regelprüfungsfunktionen zur Verfügung stellt. Er unterstützt die Erkennung von SQL-Injection, XSS, Befehlsinjection und Pfad-Traversal und enthält spezielle Regeln für Krankenhausumgebungen.
✨ Funktionen
🔒 SQL-Injection-Erkennung — Identifizierung gängiger SQLi-Angriffsmuster (UNION-Injection, Boolean-based Blind, Time-based Blind, Error-based Injection)
🎯 XSS-Cross-Site-Scripting-Erkennung — Erkennung von reflektiertem/gespeichertem XSS (script-Tags, Event-Handler, JS-URIs)
⚡ Befehlsinjection-Erkennung — Identifizierung von Angriffen zur Ausführung von Unix/Windows-Systembefehlen
📁 Pfad-Traversal-Erkennung — Erkennung von Directory-Traversal-Angriffen und Encoding-Umgehungen
🏥 Spezielle Krankenhausregeln — Abdeckung gängiger Schwachstellenmuster in HIS/PACS/LIS/RIS
🔄 Hot-Reloading von Regeln — Keine Notwendigkeit, den Dienst nach Regeländerungen neu zu starten
🧪 Selbsttest — Integrierte Angriffsbeispiele zur Überprüfung der Engine-Fähigkeiten
⚡ Leichtgewichtiger Betrieb — Reine Python-Regex-Engine, keine externen Abhängigkeiten
Related MCP server: Smart EHR MCP Server
🚀 Erste Schritte
1. Installation
# 克隆仓库
git clone https://github.com/12211725-star/hospital-waf-mcp.git
cd hospital-waf-mcp
# 安装依赖
pip install -r requirements-mcp.txt2. Integration in den MCP-Client
Fügen Sie Folgendes zur Konfigurationsdatei des MCP-Clients hinzu:
{
"mcpServers": {
"hospital-waf-mcp": {
"command": "python",
"args": ["-m", "waf_mcp"],
"env": {
"WAF_MCP_LOG_LEVEL": "INFO"
}
}
}
}Docker-Methode
{
"mcpServers": {
"hospital-waf-mcp": {
"command": "docker",
"args": ["run", "--rm", "-i", "hospital-waf-mcp"],
"env": {
"WAF_MCP_LOG_LEVEL": "INFO"
}
}
}
}Streamable HTTP-Remote-Bereitstellung
export WAF_MCP_TRANSPORT=http
export WAF_MCP_HOST=0.0.0.0
export WAF_MCP_PORT=8000
python -m waf_mcpMCP-Endpunkt: http://<host>:8000/mcp
Gesundheitsprüfung: GET /health
📖 Verwendung
SQL-Injection erkennen
In Claude / Cursor / anderen MCP-Clients:
请帮我检测这个请求是否有安全问题:
URL: https://example.com/search?q=1' OR '1'='1Die KI ruft das Tool waf_check_request auf und gibt Folgendes zurück:
[
{
"rule_id": "sqli-001",
"category": "SQL Injection",
"severity": "high",
"matched": "1' OR '1'='1",
"description": "检测到 SQL 注入特征"
}
]XSS-Angriffe erkennen
检测这个 POST 请求的 body:
<script>alert('xss')</script>Regelstatistiken anzeigen
当前 WAF 引擎加载了多少规则?🎯 Prompt-Leitfaden
Szenarien zur Sicherheitsbewertung
我需要对一个请求进行安全检测,
URL 是 https://hospital.example.com/api/patient?id=1 UNION SELECT,
请帮我分析是否存在攻击特征。Szenarien zur Regelwartung
我刚刚更新了 WAF 规则文件,
请帮我重新加载规则并确认加载成功。Szenarien zur Engine-Validierung
请运行 WAF 引擎自检测试,
确认 SQL 注入和 XSS 检测功能正常。Szenarien zur Protokollanalyse
帮我检测这个可疑请求的完整参数:
URL: https://api.hospital.com/query
Method: POST
Body: {"filter": "'; DROP TABLE users; --"}
Headers: {"Content-Type": "application/json"}🛠️ Tool-Liste
Tool | Beschreibung | Parameter |
| WAF-Anfrageprüfung |
|
| Regelstatistiken | Keine Parameter |
| Hot-Reloading von Regeln | Keine Parameter |
| Selbsttest | Keine Parameter |
📖 Umgebungsvariablen
Variable | Beschreibung | Standardwert |
| Transportprotokoll (stdio/http/sse) |
|
| HTTP-Listen-Adresse |
|
| HTTP-Listen-Port |
|
| Protokollebene |
|
| Pfad zur Regeldatei |
|
📋 Erkennungsfähigkeiten
SQL-Injection-Erkennung
Risikotyp | Schweregrad | Erkennungsbedingung |
UNION-Injection | Hoch | UNION SELECT etc. |
Boolean-based Blind | Hoch | AND/OR boolesche Ausdrücke |
Time-based Blind | Hoch | SLEEP/BENCHMARK etc. |
Error-based Injection | Hoch | EXTRACTVALUE/UPDATEXML etc. |
Stacked Queries | Hoch | Mehrere SQL-Befehle durch Semikolon getrennt |
XSS-Erkennung
Risikotyp | Schweregrad | Erkennungsbedingung |
script-Tag | Hoch |
|
Event-Handler | Hoch | onclick/onerror etc. |
JavaScript URI | Mittel |
|
SVG-Injection | Mittel |
|
Befehlsinjection-Erkennung
Risikotyp | Schweregrad | Erkennungsbedingung | |
Unix-Befehlsinjection | Kritisch | ; | & $ ` Pipe-Verbindungen |
Windows-Befehlsinjection | Kritisch | & | ^ Befehlsverbindungen |
Gefährliche Befehle | Kritisch | cat/ls/wget/curl etc. |
Pfad-Traversal-Erkennung
Risikotyp | Schweregrad | Erkennungsbedingung |
Directory-Traversal | Hoch |
|
URL-Encoding-Umgehung | Hoch |
|
Double-Encoding-Umgehung | Hoch |
|
Spezielle Krankenhaus-Szenarien
Systemtyp | Schlüsselwörter |
HIS | Krankenhausinformationssystem, Ambulanz, Station, Registrierung |
PACS | Bildgebung, DICOM, Radiologie |
LIS | Labor, Laboruntersuchung, Biochemie |
RIS | Radiologie-Informationssystem, Bilddiagnostik |
EMR | Elektronische Patientenakte, Krankheitsverlauf |
🔧 Entwicklung
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📁 Projektstruktur
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📄 Lizenz
MIT-Lizenz
🔗 Links
Issues: https://github.com/12211725-star/hospital-waf-mcp/issues
ModelScope MCP Plaza: https://modelscope.cn/mcp/servers
Maintenance
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
- AlicenseNot gradedqualityDmaintenanceA 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.23MIT
- AlicenseNot gradedqualityDmaintenanceA 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.84MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for AI agent security guardrails. Provides input validation, prompt injection detection, PII redaction, output filtering, policy enforcement, rate limiting, and comprehensive audit logging.451MIT
- AlicenseNot gradedqualityCmaintenanceA 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
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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