Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
No tool list is on record. This does not mean the server has no tools. Tools were not run.
GitHub checked 938h ago - refresh overdue
A Model Context Protocol (MCP) server for comprehensive threat modeling with guided code validation.
This server provides tools for threat modeling, including business context analysis, architecture analysis, threat actor analysis, trust boundary analysis, asset flow analysis, code security validation and comprehensive report generation.
This MCP Server calls the existing agent's LLM instead of making an external API or network call to a different service. It relies on existing client's LLM which could be Amazon-Q, Kiro or Cline.
This Threat Modeling MCP Server has three main functionalities:
It also has tools to generate a final report in both Markdown and JSON exportable formats.
.threatmodel directory, but those snapshots are not automatically loaded in a later session.Note: Before using these prompts, you must first complete the Installation process to set up the MCP server.
"Threat model this project using the threat modeling MCP Server"
Being specific in the prompt to use the threat modeling MCP Server will make sure the client (Cline/Kiro/etc) will follow the exact phases and methodology rather than taking short cut path and introduce hallucination in results.
"Threat model this subfolder using the threat modeling MCP Server"
Running it on a subfolder limits the intended analysis scope. To save exports there, request an output path inside that subfolder; the export location is not inferred automatically from the analysis scope.
"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"
Before installing the Threat Modeling MCP Server, ensure you have the following requirements:
uvx from Astral or the GitHub README
uvx --versionOnce you have uvx installed and verified to be working, add the below configuation to your mcp.json config file. Depending on the what type of client your are using (kiro/cline/amazon-q) the location of this mcp.json will be different. Once you add the config and restart your IDE, the Threat Modeling MCP Server will be automatically be installed directly from this GitHub repository using uvx.
Note: The tools used by this mcp server for threat modeling are already added to the
autoApprovefor ease of user experience which enables seamless operation without manual approval prompts for each tool call. All tools are internal to the server and do not make external API calls. If you want to review each of the tools and approve it per invocation, then you need to replace the autoApprove array with this:"autoApprove": []
Add the following to your MCP client configuration:
For 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"]
}
}
}
For 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"
}
}
}
For 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"]
}
}
}
To run the MCP server via kiro-cli with all tools auto-approved:
kiro-cli chat --trust-tools="@threat-modeling-mcp-server/*"
This trusts all tools from the threat-modeling-mcp-server MCP server, so you won't be prompted to approve each tool call individually.
This repository includes a pre-configured Kiro CLI agent that covers nine numbered phases plus the optional Phase 7.5 code-validation step. The agent configuration is in .kiro/agents/threat-modeler.json.
Global install (available from any directory):
./install-kiro-agent.sh
To uninstall: ./install-kiro-agent.sh --remove
Local install (project-specific):
cp -r /path/to/threat-modeling-mcp-server/.kiro /path/to/your-project/.kiro
Usage:
# 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
What the agent includes:
.kiro/prompts/threat-modeler.md): Detailed instructions for the phased STRIDE methodology.kiro/skills/): Per-phase reference materials, including optional Phase 7.5Before exporting, select the directory being threat modeled with
manage_workflow(action="set_project", directory=...). The export tool always
creates <selected-project>/.threatmodel/ and writes these artifacts there:
<base>.tc.json: strict AWS Threat Composer JSON. This is the only file to
import into Threat Composer. It holds only the standard schema keys, uses
deterministic UUID ids, and applies Threat Composer's field length limits.<base>.md: the human-readable Markdown report with full text.<base>.extended.json: a separate server-state snapshot (architecture,
taxonomy profiles, residual risk, phase progress) with internal ids and full
text. It is not importable into Threat Composer. Pass
include_extended_data=False to skip it.The stored model keeps full text. When a field exceeds a Threat Composer limit,
only the .tc.json copy is shortened, and the tool response lists each
shortened field (by entity, field, and length) under "Export Warnings".
Omitting output_path uses a timestamped base filename. Supplying
output_path selects only the base filename; absolute paths, parent
traversal, and other directory components cannot redirect any artifact outside
the selected project's .threatmodel directory.
Validation and analysis tools generally return text through MCP rather than writing report files. The exported files are snapshots; the server does not automatically reload them when a new process starts.
| Tool | Purpose | Example |
|---|---|---|
manage_workflow(action="plan") | Get comprehensive plan | Start here for overview |
manage_workflow(action="guidance", phase="1") | Get focused Phase 1 guidance | Recommended starting point |
manage_workflow(action="status") | Check progress | Track completion status |
manage_system_context(action, section, ...) | Define business context and taxonomy profiles | action="set", section="all" |
manage_assumptions(action, ...) | Document and maintain assumptions | Start with action="describe" |
manage_architecture(action, section, ...) | Manage components, data-store nodes, and connections | Start with action="describe" |
manage_threat_actors(action, ...) | Assess and analyze threat actors | Use action="update" for relevance and priority |
manage_trust_boundaries(action, section, ...) | Manage zones, crossings, and boundaries | Use action="detection_plan" for guidance |
manage_asset_flows(action, section, ...) | Manage assets and flows | Sections are assets and flows |
manage_threats(action, section, ...) | Manage threats, mitigations, links, and residual-risk decisions | Use action="assess" in Phase 8 |
manage_code_validation(action, values) | Record and report code-validation evidence | Start with action="describe" |
export_threat_model() | Execute Phase 9 export | Generates JSON and Markdown snapshots |
Recommended Approach: Use the consolidated guidance tool for one phase at a time:
| Phase | Tool | Purpose |
|---|---|---|
| 1 | manage_workflow(action="guidance", phase="1") | Business Context Analysis |
| 2 | manage_workflow(action="guidance", phase="2") | Architecture Analysis |
| 3 | manage_workflow(action="guidance", phase="3") | Threat Actor Analysis |
| 4 | manage_workflow(action="guidance", phase="4") | Trust Boundary Analysis |
| 5 | manage_workflow(action="guidance", phase="5") | Asset Flow Analysis |
| 6 | manage_workflow(action="guidance", phase="6") | Threat Identification |
| 7 | manage_workflow(action="guidance", phase="7") | Mitigation Planning |
| 7.5 | manage_workflow(action="guidance", phase="7.5") | Guided Code Validation (Optional) |
| 8 | manage_workflow(action="guidance", phase="8") | Residual Risk Analysis |
| 9 | manage_workflow(action="guidance", phase="9") | Output Generation and Documentation |
The Threat Modeling MCP Server provides 11 tools organized into the following categories:
| Category | Tools | Description |
|---|---|---|
| Workflow | 2 tools | Plan and guide the workflow, track or advance phases, and export the result |
| System Context | 1 tool | Manage business context plus software, data, user, and NFR taxonomy profiles |
| Domain Managers | 6 tools | Manage assumptions, architecture, actors, boundaries, asset flows, threats, and mitigations |
| Data Model Types | 1 tool | Explore available enum models and accepted values |
| Code Validation | 1 tool | Record evidence, apply statuses, validate coverage, and render reports |
The server uses the STRIDE methodology for systematic threat identification:
| Category | Description | Example Threats |
|---|---|---|
| Spoofing | Impersonating someone or something else | Authentication bypass, identity theft |
| Tampering | Modifying data or code | Data corruption, code injection |
| Repudiation | Claiming to have not performed an action | Log tampering, non-repudiation failures |
| Information Disclosure | Exposing information to unauthorized users | Data leaks, privacy breaches |
| Denial of Service | Denying or degrading service | Resource exhaustion, availability attacks |
| Elevation of Privilege | Gaining capabilities without authorization | Privilege escalation, unauthorized access |
The comprehensive threat modeling process includes these phases:
Each phase includes specific objectives, activities, and outputs to guide the threat modeling process.
Assumptions are statements that we accept as true without requiring further validation. They help scope the threat model by establishing boundaries and constraints. Common examples include:
By documenting assumptions, we can:
To contribute to this project:
uv venvsource .venv/bin/activate (Windows PowerShell: .venv\Scripts\Activate.ps1)uv pip install -e '.[test]'python run_server.pypython -m pytestSee CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
Loading reviews...
GitHub checked 187h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.