mirror of
https://github.com/GH05TCREW/pentestagent.git
synced 2026-03-08 06:44:11 +00:00
Added MCP configuration examples.
This commit is contained in:
4
mcp_examples/README.md
Normal file
4
mcp_examples/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# MCP examples
|
||||
|
||||
## Description
|
||||
In this section, you will find some examples to integrate MCP with the agent.
|
||||
19
mcp_examples/kali/Dockerfile
Normal file
19
mcp_examples/kali/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM pentestagent:latest
|
||||
|
||||
RUN git clone https://github.com/Wh0am123/MCP-Kali-Server.git
|
||||
|
||||
WORKDIR /app/MCP-Kali-Server/
|
||||
|
||||
RUN git checkout 61272cde048c236cc61c75e2fac3c06243c633dd
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install --no-cache-dir -r MCP-Kali-Server/requirements.txt
|
||||
|
||||
COPY mcp_servers.json /app/pentestagent/mcp/
|
||||
|
||||
# Expose any needed ports
|
||||
EXPOSE 8080
|
||||
|
||||
# Default command
|
||||
CMD ["python", "-m", "pentestagent"]
|
||||
49
mcp_examples/kali/README.md
Normal file
49
mcp_examples/kali/README.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# KALI MCP integration
|
||||
|
||||
## Steps
|
||||
Brief description of what this project does.
|
||||
|
||||
1. Compile base Docker image.
|
||||
|
||||
```bash
|
||||
docker build ../../ -t pentestagent:latest
|
||||
```
|
||||
|
||||
2. Configure .env file with API tokens and models for AI.
|
||||
|
||||
```
|
||||
OPENAI_API_KEY=sk-...
|
||||
PENTESTAGENT_MODEL=gpt-5
|
||||
```
|
||||
|
||||
3. Configure the IP address or hostname in the mcp_servers.json file:
|
||||
|
||||
``` json
|
||||
{
|
||||
"mcpServers": {
|
||||
"kali": {
|
||||
"command": "python",
|
||||
"args": ["MCP-Kali-Server/mcp_server.py", "--server", "http://<hostname>:5000"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4. Launch docker-compose
|
||||
|
||||
```bash
|
||||
# Build
|
||||
docker-compose build
|
||||
|
||||
# Run
|
||||
docker-compose run --rm pentestagent
|
||||
|
||||
```
|
||||
|
||||
At this point, you will be able to check the MCP servers with the /mcp list command
|
||||
|
||||

|
||||
|
||||
On server side, there should be a connection incoming:
|
||||
|
||||

|
||||
21
mcp_examples/kali/docker-compose.yml
Normal file
21
mcp_examples/kali/docker-compose.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
pentestagent:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: pentestagent_with_kali_mcp
|
||||
environment:
|
||||
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
||||
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
||||
- PENTESTAGENT_MODEL=${PENTESTAGENT_MODEL}
|
||||
- PENTESTAGENT_DEBUG=${PENTESTAGENT_DEBUG:-false}
|
||||
|
||||
networks:
|
||||
- pentestagent-net
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
|
||||
networks:
|
||||
pentestagent-net:
|
||||
driver: bridge
|
||||
BIN
mcp_examples/kali/image-1.png
Normal file
BIN
mcp_examples/kali/image-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 364 KiB |
BIN
mcp_examples/kali/image.png
Normal file
BIN
mcp_examples/kali/image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
Reference in New Issue
Block a user