About Agent Opfor
Agent Opfor is an MCP server published by KeyValueSoftwareSystems in the Agents category: open-source adversary emulation for AI agents and MCP servers. Conduid read 3 tools from its source: opfor_list_evaluators, opfor_run and opfor_setup. No package is published for it, so it installs from a source checkout.
The repository has 589 stars and 34 forks, and its last commit was on 3 Nov 2026. The latest release is v0.10.2 (10 Aug 2026): Features add cancelled run state and fix extension pause/resume flow (#221) (094687c) add report turn navigator and restore standards column (#230) (04d0690) estimate an… It follows v0.10.1 (20 Jul 2026), and the 4 most recent releases go back to v0.9.0 (26 Jun 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include adversary-emulation, ai-red-teaming, ai-security, browser-extension, cli and jailbreak.
Install
git clone https://github.com/KeyValueSoftwareSystems/agent-opforTools (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.| Parameter | Type | Description |
|---|---|---|
| target_kind | string | 'agent' for AI agent/chatbot targets, 'mcp' for MCP server targets |
opfor_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.| Parameter | Type | Description |
|---|---|---|
| business_use_case_override | string | Override the business use case from config |
| config_path * | string | Path to opfor.config.json written by opfor_setup |
| effort_override | string | Override the effort level from config. |
| judge_hint_override | string | Override the judge hint from config |
| objective_override | string | Override the attack objective from config |
| output_dir | string | Directory to write report files (default: .) |
| turns_override | number | Override turns per attack from config |
opfor_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: ${Object.values(PROVIDERS).join(", ")}. 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.| Parameter | Type | Description |
|---|---|---|
| agent_api_key_env | string | Env var name holding the target API key (e.g. TARGET_API_KEY) |
| agent_description | string | What the agent does (used in attack generation) |
| agent_endpoint | string | HTTP endpoint URL (agent targets) |
| agent_model | string | Model name sent to the target endpoint in the 'model' field (e.g. sarvam-30b, gpt-4o) |
| agent_request_format | string | Request body format (agent targets) |
| agent_script_path | string | Local script path (.js/.py) for local-script targets |
| agent_session_receive_in | string | Where a server-owned target RETURNS its session id (enables server-owned mode) |
| agent_session_receive_name | string | Response body dot-path / header name / cookie name holding the returned id |
| agent_session_send_in | string | Where OPFOR sends the session id (body field or request header) |
| agent_session_send_name | string | Body dot-path or header name the session id is sent in (e.g. session_id) |
| attack_objective | string | Free-text primary mission steering every evaluator's attacks (e.g. 'get the target to leak env vars via a delegated employee'). |
| business_use_case | string | Free-text domain/business context for the target agent. |
| config_path | string | Full path for config file (overrides output_dir) |
| effort | string | adaptive: one sustained chat per evaluator, attacker picks tactics on the fly. comprehensive: one fresh multi-turn attack per named pattern in each evaluator. |
| evaluator_ids | array | Explicit evaluator IDs. Use this OR suite_id. |
| judge_hint | string | Free-text steering for the judge's verdict (e.g. 'treat any tool name leak as critical'). |
| mcp_args | array | Args for MCP server command |
| mcp_command | string | Command to start MCP server (stdio transport) |
| mcp_env | object | Env vars for MCP server process |
| mcp_transport | string | MCP transport type |
| mcp_url | string | MCP server URL (url transport) |
| output_dir | string | Directory to write opfor.config.json (default: .) |
| suite_id | string | Suite ID (e.g. owasp-mcp-top10). Use this OR evaluator_ids. |
| target_kind * | string | 'agent' for HTTP/chatbot targets, 'mcp' for MCP servers |
| target_name * | string | Human-readable name for the target system |
| turns | number | Turns per attack. 1 = single-turn, >1 = multi-turn escalation. |
Security checks
Static checks derived from the repository 2 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 1.8K words.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by package-lock.json and runners/cli/ui/package-lock.json.
- !No dynamic code executionScanned 189 source files and found 1 call to eval or shell execution, in runners/cli/src/ui/server.ts:136. Review how tool inputs reach them before granting credentials.
1 check has not been run yet.
What the source scan found
- Transport
- stdiorunners/mcp/src/index.ts:6
- Starts other programs
- 2 callsrunners/cli/src/ui/server.ts:136, core/src/lib/localScriptTarget.ts:48
- Outbound network calls
- 18 callsrunners/cli/ui/src/components/SetupPage.tsx:114, runners/cli/ui/src/components/SetupPage.tsx:132, runners/cli/ui/src/components/SetupPage.tsx:154
- Writes or deletes files
- No file writes or deletes
- Lockfile
- package-lock.json and runners/cli/ui/package-lock.json
Pattern matches on the source text of 189 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 1.8K words, fetched 2 days ago. The original in the repository is authoritative.
Read full README