# rislan-moh-tm/crp-project- architecture

> Architecture diagram of the GitHub repository rislan-moh-tm/crp-project-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rislan-moh-tm/crp-project-
- Repository: https://github.com/rislan-moh-tm/crp-project-

## Overview

This is an AI-assisted penetration-testing framework: an operator uses Claude through MCP to launch Kali security tools, collect scan evidence, enrich findings with local CVE intelligence, and produce a report. Reconnaissance, vulnerability scanning, exploitation validation, CVE enrichment, and report generation are distinct documented stages. The sampled code supports the MCP/API job flow, RAG search, analysis context preparation, and report generation; source for the README-described quantitative evaluation is not present in the sampled files, so that capability is shown as documented rather than wired into the runtime flow.

Main entry points: [`mcp_server.py`](https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py) (MCP server), [`kali_server.py`](https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py) (Async job queue), [`rag.py`](https://github.com/rislan-moh-tm/crp-project-/blob/main/rag.py) (RAG engine), [`README.md`](https://github.com/rislan-moh-tm/crp-project-/blob/main/README.md) (Report evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["MCP orchestration"]
  node_mcp["MCP server<br/>[mcp_server.py]"]
  node_kali_api["Kali API<br/>[kali_server.py]"]
  node_job_queue["Async job queue<br/>[kali_server.py]"]
end

subgraph group_assessment["Security assessment"]
  node_recon["Reconnaissance<br/>[kali_server.py]"]
  node_vuln_scan["Vulnerability scans<br/>[kali_server.py]"]
  node_validation["Exploitation validation<br/>[kali_server.py]"]
  node_scan_logs[("Scan history<br/>[kali_server.py]")]
  node_raw_results[("Raw scan results<br/>[mcp_server.py]")]
  node_payload_library["Payload guidance<br/>[payload_loader.py]"]
end

subgraph group_intelligence["CVE intelligence"]
  node_rag_engine["RAG engine<br/>[rag.py]"]
  node_cve_records[("CVE records<br/>[rag.py]")]
  node_vector_index[("Vector index<br/>[rag.py]")]
end

subgraph group_reporting["Analysis and reporting"]
  node_analysis["Evidence analysis<br/>[ai_analysis.py]"]
  node_report_builder["Report generation<br/>[mcp_server.py]"]
  node_report_template["HTML template"]
  node_reports[("Generated reports<br/>[mcp_server.py]")]
  node_evaluation["Report evaluation<br/>[README.md]"]
end

node_operator(("Security operator"))
node_claude(("Claude AI"))
node_deepseek(("DeepSeek evaluator"))

node_operator -->|"requests assessment"| node_claude
node_claude -->|"invokes tools"| node_mcp
node_mcp -->|"submits scans"| node_kali_api
node_kali_api -->|"queues jobs"| node_job_queue
node_job_queue -->|"runs tools"| node_recon
node_job_queue -->|"runs tools"| node_vuln_scan
node_job_queue -->|"runs tools"| node_validation
node_mcp -->|"polls jobs"| node_kali_api
node_job_queue -->|"persists history"| node_scan_logs
node_mcp -->|"saves outputs"| node_raw_results
node_mcp -->|"queries CVEs"| node_rag_engine
node_rag_engine -->|"reads records"| node_cve_records
node_rag_engine -->|"semantic search"| node_vector_index
node_mcp -->|"prepares context"| node_analysis
node_analysis -->|"provides evidence"| node_claude
node_claude -->|"returns report content"| node_mcp
node_mcp -->|"builds report"| node_report_builder
node_report_builder -->|"renders with"| node_report_template
node_report_builder -->|"writes reports"| node_reports
node_raw_results -.->|"compares outputs"| node_evaluation
node_reports -.->|"compares reports"| node_evaluation
node_evaluation -.->|"uses evaluation"| node_deepseek
node_payload_library -.->|"supplies guidance"| node_mcp

click node_mcp "https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py"
click node_kali_api "https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py"
click node_job_queue "https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py"
click node_recon "https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py"
click node_vuln_scan "https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py"
click node_validation "https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py"
click node_scan_logs "https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py"
click node_raw_results "https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py"
click node_rag_engine "https://github.com/rislan-moh-tm/crp-project-/blob/main/rag.py"
click node_cve_records "https://github.com/rislan-moh-tm/crp-project-/blob/main/rag.py"
click node_vector_index "https://github.com/rislan-moh-tm/crp-project-/blob/main/rag.py"
click node_payload_library "https://github.com/rislan-moh-tm/crp-project-/blob/main/payload_loader.py"
click node_analysis "https://github.com/rislan-moh-tm/crp-project-/blob/main/ai_analysis.py"
click node_report_builder "https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py"
click node_report_template "https://github.com/rislan-moh-tm/crp-project-/blob/main/html_report_template.html"
click node_reports "https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py"
click node_evaluation "https://github.com/rislan-moh-tm/crp-project-/blob/main/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mcp,node_kali_api,node_job_queue toneBlue
class node_recon,node_vuln_scan,node_validation,node_scan_logs,node_raw_results,node_payload_library toneAmber
class node_rag_engine,node_cve_records,node_vector_index toneMint
class node_analysis,node_report_builder,node_report_template,node_reports,node_evaluation toneRose
class node_operator,node_claude,node_deepseek toneIndigo
```

## Components

### MCP orchestration

- [MCP server](https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py): `mcp_server.py`
- [Kali API](https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py): `kali_server.py`
- [Async job queue](https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py): `kali_server.py`

### Security assessment

- [Reconnaissance](https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py): `kali_server.py`
- [Vulnerability scans](https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py): `kali_server.py`
- [Exploitation validation](https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py): `kali_server.py`
- [Scan history](https://github.com/rislan-moh-tm/crp-project-/blob/main/kali_server.py): `kali_server.py`
- [Raw scan results](https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py): `mcp_server.py`
- [Payload guidance](https://github.com/rislan-moh-tm/crp-project-/blob/main/payload_loader.py): `payload_loader.py`

### CVE intelligence

- [RAG engine](https://github.com/rislan-moh-tm/crp-project-/blob/main/rag.py): `rag.py`
- [CVE records](https://github.com/rislan-moh-tm/crp-project-/blob/main/rag.py): `rag.py`
- [Vector index](https://github.com/rislan-moh-tm/crp-project-/blob/main/rag.py): `rag.py`

### Analysis and reporting

- [Evidence analysis](https://github.com/rislan-moh-tm/crp-project-/blob/main/ai_analysis.py): `ai_analysis.py`
- [Report generation](https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py): `mcp_server.py`
- [HTML template](https://github.com/rislan-moh-tm/crp-project-/blob/main/html_report_template.html): `html_report_template.html`
- [Generated reports](https://github.com/rislan-moh-tm/crp-project-/blob/main/mcp_server.py): `mcp_server.py`
- [Report evaluation](https://github.com/rislan-moh-tm/crp-project-/blob/main/README.md): `README.md`

### Other components

- **Security operator**
- **Claude AI**
- **DeepSeek evaluator**

## Connections

- Security operator → Claude AI: requests assessment
- Claude AI → MCP server: invokes tools
- MCP server → Kali API: submits scans
- Kali API → Async job queue: queues jobs
- Async job queue → Reconnaissance: runs tools
- Async job queue → Vulnerability scans: runs tools
- Async job queue → Exploitation validation: runs tools
- MCP server → Kali API: polls jobs
- Async job queue → Scan history: persists history
- MCP server → Raw scan results: saves outputs
- MCP server → RAG engine: queries CVEs
- RAG engine → CVE records: reads records
- RAG engine → Vector index: semantic search
- MCP server → Evidence analysis: prepares context
- Evidence analysis → Claude AI: provides evidence
- Claude AI → MCP server: returns report content
- MCP server → Report generation: builds report
- Report generation → HTML template: renders with
- Report generation → Generated reports: writes reports
- Raw scan results → Report evaluation: compares outputs
- Generated reports → Report evaluation: compares reports
- Report evaluation → DeepSeek evaluator: uses evaluation
- Payload guidance → MCP server: supplies guidance
