Implementation:0xSteph Pentest ai run probe mcp
| Knowledge Sources | |
|---|---|
| Domains | Security_Testing, MCP |
| Last Updated | 2026-10-23 12:00 GMT |
Overview
Concrete MCP tool that executes a named probe against a target with candidate endpoints, JS URLs for endpoint mining, and immediate oracle verdict stamping.
Description
The run_probe MCP tool runs a single probe (selected from list_probes) against a target. It resolves auth from the engagement cache or an auth_profile, reads engagement-level safety flags (strict_scope, respect_rate_limits) from the DB, and captures evidence.
Key behaviors:
- Auth resolution: Resolves from engagement auth cache or auth_profile parameter
- Scope enforcement: Reads strict_scope flag from the engagement DB record
- Candidate endpoints: LLM-discovered paths to test (passed as args)
- JS URLs: JS bundles for endpoint mining before probe execution
- Evidence collection: EvidenceCollector captures HTTP exchanges
- Immediate verdict stamping: Oracle verdicts are stamped via `stamp_oracle_verdicts` while the target is still up
Usage
This is an MCP tool called by the MCP host model to run individual probes.
Code Reference
Source Location
- Repository: pentest-ai
- File: mcp_server/probes.py
Signature
@mcp.tool()
async def run_probe(
probe_name: str,
target: str,
engagement_id: str = "",
auth_profile: str = "",
candidate_endpoints: list[str] | None = None,
js_urls: list[str] | None = None,
) -> dict[str, Any]:
"""Run a registered probe against a target."""
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| probe_name | str | Yes | Registered probe name from list_probes |
| target | str | Yes | Target URL |
| engagement_id | str | No | For persistence + safety flags |
| auth_profile | str | No | Named auth profile |
| candidate_endpoints | None | No | LLM-discovered paths to test |
| js_urls | None | No | JS bundles for endpoint mining |
Outputs
| Name | Type | Description |
|---|---|---|
| returns | probe, target, engagement_id, findings_count, findings |
Usage Examples
Called via MCP
Tool: run_probe
Arguments: {
"probe_name": "sqli_login_bypass",
"target": "https://app.example.com",
"engagement_id": "a1b2c3d4",
"candidate_endpoints": ["/login", "/api/users", "/search"]
}
Response:
{
"probe": "sqli_login_bypass",
"target": "https://app.example.com",
"engagement_id": "a1b2c3d4",
"findings_count": 2,
"findings": [...]
}