
구조화된 STRIDE 기반 위협 모델링을 위한 MCP 서버로, 자동 코드 검증, 비즈니스 컨텍스트 분석, 그리고 Markdown 및 JSON 형식의 포괄적인 보고서 생성을 제공합니다.
가이드 코드 검증을 포함한 포괄적인 위협 모델링을 위한 MCP(Model Context Protocol) 서버입니다.
이 서버는 비즈니스 컨텍스트 분석, 아키텍처 분석, 위협 행위자 분석, 신뢰 경계 분석, 자산 흐름 분석, 코드 보안 검증 및 포괄적인 보고서 생성을 포함한 위협 모델링을 위한 도구를 제공합니다.
이 MCP 서버는 다른 서비스에 대한 외부 API 또는 네트워크 호출을 수행하는 대신 기존 에이전트의 LLM을 호출합니다. Amazon-Q, Kiro 또는 Cline일 수 있는 기존 클라이언트의 LLM에 의존합니다.
이 위협 모델링 MCP 서버는 세 가지 주요 기능을 가지고 있습니다:
또한 Markdown 및 JSON 내보내기 형식 모두로 최종 보고서를 생성하는 도구도 있습니다.
.threatmodel 디렉터리에 쓸 수 있지만, 이러한 스냅샷은 이후 세션에서 자동으로 로드되지 않습니다.참고: 이 프롬프트를 사용하기 전에 먼저 설치 프로세스를 완료하여 MCP 서버를 설정해야 합니다.
"Threat model this project using the threat modeling MCP Server"
프롬프트에서 위협 모델링 MCP 서버를 사용하도록 구체적으로 지정하면 클라이언트(Cline/Kiro/등)가 지름길 경로를 택하고 결과에 환각을 도입하는 대신 정확한 단계와 방법론을 따르도록 보장합니다.
"Threat model this subfolder using the threat modeling MCP Server"
하위 폴더에서 실행하면 의도된 분석 범위가 제한됩니다. 내보내기를 거기에 저장하려면 해당 하위 폴더 내의 출력 경로를 요청하세요. 내보내기 위치는 분석 범위에서 자동으로 추론되지 않습니다.
"Save the threat model report"
"Please complete all the phases in the threat model plan and then generate the final report."
"Threat model this project using the threat model MCP server and consider this architecture_image.png attached for this review"
"Can you see if you can implement mitigation controls in the code based on the threats reported in the threat model"
"Can you updated the threat model based on the code fixes which mitigated the reported threats"
# Set up context
"Set business context for an e-commerce payment system"
# Add architecture
"Add a web server component using AWS EC2"
"Add a database component using AWS RDS"
# Identify threats
"Add a threat where an attacker with network access performs SQL injection"
# Add mitigations
"Add a mitigation for input validation"
# Export results
"Export the threat model to my_model.tc.json"
위협 모델링 MCP 서버를 설치하기 전에 다음 요구 사항이 있는지 확인하세요:
uvx 설치
uvx --versionuvx가 설치되어 작동하는지 확인한 후, 아래 구성을 mcp.json 구성 파일에 추가하세요. 사용 중인 클라이언트 유형(kiro/cline/amazon-q)에 따라 이 mcp.json의 위치가 다릅니다. 구성을 추가하고 IDE를 재시작하면 위협 모델링 MCP 서버가 uvx를 사용하여 이 GitHub 저장소에서 직접 자동으로 설치됩니다.
참고: 이 mcp 서버가 위협 모델링에 사용하는 도구는 사용자 경험의 편의를 위해 이미
autoApprove에 추가되어 있어 각 도구 호출에 대한 수동 승인 프롬프트 없이 원활하게 작동합니다. 모든 도구는 서버 내부에 있으며 외부 API 호출을 하지 않습니다. 각 도구를 검토하고 호출마다 승인하려면 autoApprove 배열을 다음으로 교체해야 합니다:"autoApprove": []
MCP 클라이언트 구성에 다음을 추가하세요:
Amazon Q의 경우 (~/.aws/amazonq/mcp.json):
{
"mcpServers": {
"threat-modeling-mcp-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/awslabs/threat-modeling-mcp-server.git",
"threat-modeling-mcp-server"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR"
},
"disabled": false,
"autoApprove": ["manage_workflow","export_threat_model","manage_system_context","manage_assumptions","manage_architecture","manage_threat_actors","manage_trust_boundaries","manage_asset_flows","manage_threats","inspect_data_models","manage_code_validation"]
}
}
}
VSCode Cline의 경우:
{
"mcpServers": {
"threat-modeling-mcp-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/awslabs/threat-modeling-mcp-server.git",
"threat-modeling-mcp-server"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR"
},
"disabled": false,
"autoApprove": ["manage_workflow","export_threat_model","manage_system_context","manage_assumptions","manage_architecture","manage_threat_actors","manage_trust_boundaries","manage_asset_flows","manage_threats","inspect_data_models","manage_code_validation"],
"timeout": 60,
"type": "stdio"
}
}
}
Kiro의 경우 (~/.kiro/settings/mcp.json):
{
"mcpServers": {
"threat-modeling-mcp-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/awslabs/threat-modeling-mcp-server.git",
"threat-modeling-mcp-server"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR"
},
"disabled": false,
"autoApprove": ["manage_workflow","export_threat_model","manage_system_context","manage_assumptions","manage_architecture","manage_threat_actors","manage_trust_boundaries","manage_asset_flows","manage_threats","inspect_data_models","manage_code_validation"]
}
}
}
모든 도구가 자동 승인된 상태로 kiro-cli를 통해 MCP 서버를 실행하려면:
kiro-cli chat --trust-tools="@threat-modeling-mcp-server/*"
이것은 threat-modeling-mcp-server MCP 서버의 모든 도구를 신뢰하므로 각 도구 호출을 개별적으로 승인하라는 프롬프트가 표시되지 않습니다.
이 저장소에는 9개의 번호가 매겨진 단계와 선택적 Phase 7.5 코드 검증 단계를 포함하는 사전 구성된 Kiro CLI 에이전트가 포함되어 있습니다. 에이전트 구성은 .kiro/agents/threat-modeler.json에 있습니다.
전역 설치 (모든 디렉터리에서 사용 가능):
./install-kiro-agent.sh
제거하려면: ./install-kiro-agent.sh --remove
로컬 설치 (프로젝트별):
cp -r /path/to/threat-modeling-mcp-server/.kiro /path/to/your-project/.kiro
사용법:
# Non-interactive: run full threat model and exit
kiro-cli chat --agent threat-modeler --no-interactive "Threat model this project"
# Interactive: start a session with the agent
kiro-cli chat --agent threat-modeler
에이전트에 포함된 내용:
.kiro/prompts/threat-modeler.md): 단계별 STRIDE 방법론에 대한 자세한 지침.kiro/skills/): 선택적 Phase 7.5를 포함한 단계별 참조 자료내보내기 전에 manage_workflow(action="set_project", directory=...)로 위협 모델링할 디렉터리를 선택하세요. 내보내기 도구는 항상 <selected-project>/.threatmodel/을 생성하고 Threat Composer .tc.json 파일과 Markdown 보고서를 모두 거기에 씁니다. output_path를 생략하면 타임스탬프가 있는 기본 파일 이름이 사용됩니다. output_path를 제공하면 기본 파일 이름만 선택합니다. 절대 경로, 상위 디렉터리 탐색 및 기타 디렉터리 구성 요소는 두 아티팩트 중 어느 것도 선택한 프로젝트의 .threatmodel 디렉터리 외부로 리디렉션할 수 없습니다.
검증 및 분석 도구는 일반적으로 보고서 파일을 작성하는 대신 MCP를 통해 텍스트를 반환합니다. 내보낸 파일은 스냅샷이며, 서버는 새 프로세스가 시작될 때 자동으로 다시 로드하지 않습니다.