agent-opfor
projectother official build verified dockerfile by the hub scannedOpen-source adversary emulation for AI agents and MCP servers.
run it
on your own machines, one way per deploy method# once, as root:
docker build -t mcp-local/agent-opfor:fcb9e941d2f3b308dc51aec04883f3bc0240db85 -f - https://github.com/KeyValueSoftwareSystems/agent-opfor.git#fcb9e941d2f3b308dc51aec04883f3bc0240db85 <<'DOCKERFILE'
FROM node:22.12.0-alpine
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build
RUN npm install -g supergateway@4
USER node
EXPOSE 8000
CMD ["supergateway", "--stdio", "node runners/mcp/dist/index.js", "--outputTransport", "streamableHttp", "--stateful", "--port", "8000", "--streamableHttpPath", "/mcp"]
DOCKERFILE
#!/usr/bin/env bash
# agent-opfor (io.github.keyvaluesoftwaresystems/agent-opfor), recipe docker (worker, verified 2026-10-17 on v, run r-20261017T131047Z-c8a0d8966a6d).
# Generated by Hub for toolset "my-agent"; started by mcp-my-agent-agent-opfor.service.
set -euo pipefail
export HOST=127.0.0.1 PORT=8101
exec docker run --rm --name mcp-my-agent-agent-opfor -p 127.0.0.1:${PORT}:8000 --env-file /etc/mcp/my-agent.env mcp-local/agent-opfor:fcb9e941d2f3b308dc51aec04883f3bc0240db85
[Unit]
Description=MCP server agent-opfor (toolset my-agent), generated by Hub
After=network-online.target docker.service
Wants=network-online.target
[Service]
Type=simple
User=mcp
Group=mcp
SupplementaryGroups=docker
EnvironmentFile=/etc/mcp/my-agent.env
Environment=HOME=/var/lib/mcp/agent-opfor
WorkingDirectory=/var/lib/mcp/agent-opfor
ExecStart=/opt/mcp/my-agent/bin/agent-opfor.sh
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
ReadWritePaths=/var/lib/mcp/agent-opfor
[Install]
WantedBy=multi-user.target
docker build -t agent-opfor -f - https://github.com/KeyValueSoftwareSystems/agent-opfor.git#fcb9e941d2f3b308dc51aec04883f3bc0240db85 <<'DOCKERFILE' FROM node:22.12.0-alpine WORKDIR /app COPY . . RUN npm ci RUN npm run build RUN npm install -g supergateway@4 USER node EXPOSE 8000 CMD ["supergateway", "--stdio", "node runners/mcp/dist/index.js", "--outputTransport", "streamableHttp", "--stateful", "--port", "8000", "--streamableHttpPath", "/mcp"] DOCKERFILE docker run --rm -p 127.0.0.1:8101:8000 agent-opfor
# Generated by Hub for toolset "my-agent" (2026-10-18T02:35:24+00:00).
# Each package server runs behind a stdio->HTTP bridge and listens on localhost only.
# cp .env.example .env # fill the ${VAR}s
# docker compose up -d && bash smoke.sh
# Remote servers are not here: clients reach them directly (see clients/).
name: mcp-my-agent
services:
agent-opfor:
build:
context: https://github.com/KeyValueSoftwareSystems/agent-opfor.git#fcb9e941d2f3b308dc51aec04883f3bc0240db85
dockerfile_inline: |
FROM node:22.12.0-alpine
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build
RUN npm install -g supergateway@4
USER node
EXPOSE 8000
CMD ["supergateway", "--stdio", "node runners/mcp/dist/index.js", "--outputTransport", "streamableHttp", "--stateful", "--port", "8000", "--streamableHttpPath", "/mcp"]
x-dockerfile: written by the hub (hub-llm:hub-coder@p5), checked by hub-llm:gpt-oss:120b@r2, not taken
from the repository
ports:
- 127.0.0.1:8101:8000
restart: unless-stopped
volumes:
npm-cache: {}
uv-cache: {}
# Generated by Hub for toolset "my-agent" (2026-10-18T02:35:24+00:00).
# kubectl create namespace mcp
# kubectl -n mcp create secret generic mcp-credentials --from-env-file=.env
# kubectl apply -f kubernetes.yaml
# Services are cluster-internal: <name>.mcp.svc.cluster.local:8000/mcp. Put an ingress
# with auth in front before exposing any of them.
apiVersion: v1
kind: Namespace
metadata:
name: mcp
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: agent-opfor
namespace: mcp
labels: &id001
app: agent-opfor
spec:
replicas: 1
selector:
matchLabels: *id001
template:
metadata:
labels: *id001
spec:
containers:
- name: agent-opfor
image: CHANGE_ME
ports:
- containerPort: 8000
name: http
env: []
---
apiVersion: v1
kind: Service
metadata:
name: agent-opfor
namespace: mcp
spec:
selector:
app: agent-opfor
ports:
- port: 8000
targetPort: http
name: http
dockerfile
FROM node:22.12.0-alpine WORKDIR /app COPY . . RUN npm ci RUN npm run build RUN npm install -g supergateway@4 USER node EXPOSE 8000 CMD ["supergateway", "--stdio", "node runners/mcp/dist/index.js", "--outputTransport", "streamableHttp", "--stateful", "--port", "8000", "--streamableHttpPath", "/mcp"]
# Generated by Hub for toolset "my-agent" (2026-10-18T02:35:24+00:00).
# Credentials come from the Secret 'mcp-credentials' (kubectl create secret generic ... --from-env-file=.env).
# Each server under `servers` is one Deployment + Service; the keys after it configure
# upstream charts a worker verified.
servers:
agent-opfor:
enabled: true
replicas: 1
port: 8000
path: /mcp
container:
name: agent-opfor
image: CHANGE_ME
ports:
- containerPort: 8000
name: http
env: []
# helm install my-agent helm/my-agent -n mcp
dockerfile
FROM node:22.12.0-alpine WORKDIR /app COPY . . RUN npm ci RUN npm run build RUN npm install -g supergateway@4 USER node EXPOSE 8000 CMD ["supergateway", "--stdio", "node runners/mcp/dist/index.js", "--outputTransport", "streamableHttp", "--stateful", "--port", "8000", "--streamableHttpPath", "/mcp"]
Scanned github.com/keyvaluesoftwaresystems/agent-opfor at fcb9e941d2f3 with [email protected][email protected] on 2026-10-17 before the build: 21 dependencies, 68 known vulnerabilities (5 critical, 22 high, 35 medium, 6 low), nothing in the code that looks malicious.
connect to it
copy what your client needs{
"mcpServers": {
"agent-opfor": {
"command": "CHANGE_ME",
"args": []
}
}
}
#!/usr/bin/env bash # Registers every server with Claude Code (run once; `claude mcp list` to check). set -euo pipefail set -a; [ -f .env ] && source .env; set +a claude mcp add agent-opfor -- CHANGE_ME
{
"mcpServers": {
"agent-opfor": {
"command": "CHANGE_ME",
"args": []
}
}
}
{
"servers": {
"agent-opfor": {
"type": "stdio",
"command": "CHANGE_ME",
"args": []
}
}
}
name: my-agent target: local servers: - hub: io.github.keyvaluesoftwaresystems/agent-opfor
- no tested recipe for target 'local' yet: build it from https://github.com/KeyValueSoftwareSystems/agent-opfor by hand, or wait for the worker
tools · 3
opfor_list_evaluatorsList all available Opfor evaluators and suites. ALWAYS call this before opfor_setup — never assume evaluator IDs. Returns each evaluator's id, name, severity, and OWASP reference, plus predefined suites. Pass target_kind to get the correct evaluators for your target type. After returning the list, STOP and ask the user which suite or evaluators they want to run — do NOT proceed to opfor_setup automatically.List all available Opfor evaluators and suites. ALWAYS call this before opfor_setup — never assume evaluator IDs. Returns each evaluator's id, name, severity, and OWASP reference, plus predefined suites. Pass target_kind to get the correct evaluators for your target type. After returning the list, STOP and ask the user which suite or evaluators they want to run — do NOT proceed to opfor_setup automatically.
pin 78b824b509efd574d820fd815451732d6ca163aa6ebc09d577a1315e52f32b86opfor_runRun the red team evaluation from a config file produced by opfor_setup. Generates attacks on-the-fly, runs them against the target, judges responses, and writes an HTML + JSON report.Run the red team evaluation from a config file produced by opfor_setup. Generates attacks on-the-fly, runs them against the target, judges responses, and writes an HTML + JSON report.
pin 555394d0963ce9387d0628cfe250dcc6ffaf08963766264ff56f9fbc20394ad6opfor_setupConfigure an Opfor red team run and write opfor.config.json. Before calling this tool you MUST ask the user for ALL of the following — do NOT assume or infer any value autonomously: TARGET 1. Target kind: 'agent' (HTTP chatbot/API) or 'mcp' (MCP server)? 2. Target name. 3. (agent) Description of what the agent does. 4. (agent) HTTP endpoint URL. 5. (agent) Request format: 'openai' (chat completions), 'json' ({ prompt }), or 'auto'? 6. (agent) Model name sent to the target in the 'model' field (e.g. sarvam-30b) — ask only if relevant to the endpoint. 7. (agent) Does the target require an API key? 7b. (agent, stateful) Session id handling: client-owned (you send it — set agent_session_send_in/name) or server-owned (target returns its own — set agent_session_receive_in/name, plus send_* to echo it back). 8. (mcp) Transport: 'stdio' or 'url'? Then ask command+args or URL accordingly. EVALUATORS 9. Call opfor_list_evaluators with the chosen target_kind, present the suites and evaluators to the user, then ask: run a full suite or specific evaluators? ATTACKER LLM 10. Provider — options: openai, anthropic, groq, google, deepseek, azure, openai-compatible. 11. Model name for that provider. 12. Name of the environment variable that holds the API key (e.g. OPENAI_API_KEY). 13. (openai-compatible or azure only) Base URL. JUDGE LLM 14. Use a separate LLM for judging, or reuse the attacker LLM? RUN SETTINGS 15. Effort: 'adaptive' (one sustained chat per evaluator) or 'comprehensive' (one attack per named pattern)? 16. Turns per attack: 1 (single-turn) or 2-10 (multi-turn escalation)? Only call this tool once you have confirmed all answers with the user. Returns the config file path — pass it to opfor_run.Configure an Opfor red team run and write opfor.config.json. Before calling this tool you MUST ask the user for ALL of the following — do NOT assume or infer any value autonomously: TARGET 1. Target kind: 'agent' (HTTP chatbot/API) or 'mcp' (MCP server)? 2. Target name. 3. (agent) Description of what the agent does. 4. (agent) HTTP endpoint URL. 5. (agent) Request format: 'openai' (chat completions), 'json' ({ prompt }), or 'auto'? 6. (agent) Model name sent to the target in the 'model' field (e.g. sarvam-30b) — ask only if relevant to the endpoint. 7. (agent) Does the target require an API key? 7b. (agent, stateful) Session id handling: client-owned (you send it — set agent_session_send_in/name) or server-owned (target returns its own — set agent_session_receive_in/name, plus send_* to echo it back). 8. (mcp) Transport: 'stdio' or 'url'? Then ask command+args or URL accordingly. EVALUATORS 9. Call opfor_list_evaluators with the chosen target_kind, present the suites and evaluators to the user, then ask: run a full suite or specific evaluators? ATTACKER LLM 10. Provider — options: openai, anthropic, groq, google, deepseek, azure, openai-compatible. 11. Model name for that provider. 12. Name of the environment variable that holds the API key (e.g. OPENAI_API_KEY). 13. (openai-compatible or azure only) Base URL. JUDGE LLM 14. Use a separate LLM for judging, or reuse the attacker LLM? RUN SETTINGS 15. Effort: 'adaptive' (one sustained chat per evaluator) or 'comprehensive' (one attack per named pattern)? 16. Turns per attack: 1 (single-turn) or 2-10 (multi-turn escalation)? Only call this tool once you have confirmed all answers with the user. Returns the config file path — pass it to opfor_run.
pin 2471341d7b6568a9956802b0a5fd70de6c9dd34f63d080a0287bf37aac8c7be3
runs · 2
the latest tests of this entry by the hub and its workers, newest first| date | worker | method | status | sandbox | reason |
|---|---|---|---|---|---|
| 2026-10-17 13:10 | local-mac-vm | dockermcp 2025-11-25 | ok3 tools | gvisor | — |
| 2026-10-17 12:51 | local-mac-vm | docker | failed | gvisor | docker: sandbox: docker build: ERROR: failed to build: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory |