Hospital WAF MCP
病院WAF管理システム MCPサーバー
English | 中文
病院向けWebアプリケーションファイアウォール(WAF)MCPサーバー。AIアシスタントにWAFルール検出機能を提供します。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.txt2. 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_mcpMCPエンドポイント:http://<host>:8000/mcp
ヘルスチェック:GET /health
📖 使用方法
SQLインジェクションの検出
Claude / Cursor / その他のMCPクライアントにて:
请帮我检测这个请求是否有安全问题:
URL: https://example.com/search?q=1' OR '1'='1AIが 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リクエスト検出 |
|
| ルール統計 | パラメータなし |
| ルールホットリロード | パラメータなし |
| 自己診断テスト | パラメータなし |
📖 環境変数
変数 | 説明 | デフォルト値 |
| トランスポートプロトコル (stdio/http/sse) |
|
| HTTPリスニングアドレス |
|
| HTTPリスニングポート |
|
| ログレベル |
|
| ルールファイルパス |
|
📋 検出能力
SQLインジェクション検出
リスクタイプ | 重大度 | 検出条件 |
UNION注入 | High | UNION SELECT 等 |
ブールブラインド注入 | High | AND/OR ブール式 |
時間ブラインド注入 | High | SLEEP/BENCHMARK 等 |
エラーベース注入 | High | EXTRACTVALUE/UPDATEXML 等 |
スタッククエリ | High | セミコロンで区切られた複数のSQL |
XSS検出
リスクタイプ | 重大度 | 検出条件 |
scriptタグ | High |
|
イベントハンドラ | High | onclick/onerror 等 |
JavaScript URI | Medium |
|
SVG注入 | Medium |
|
コマンドインジェクション検出
リスクタイプ | 重大度 | 検出条件 | |
Unixコマンド注入 | Critical | ; | & $ ` パイプ接続 |
Windowsコマンド注入 | Critical | & | ^ コマンド接続 |
危険なコマンド | Critical | cat/ls/wget/curl 等 |
パストラバーサル検出
リスクタイプ | 重大度 | 検出条件 |
ディレクトリトラバーサル | High |
|
URLエンコード回避 | High |
|
二重エンコード回避 | High |
|
病院シナリオ特化
システムタイプ | キーワード |
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
🔗 リンク
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