PyRIT MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PyRIT MCP Server Start a new red-team engagement"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PyRIT MCP Server
An MCP (Model Context Protocol) server that exposes Microsoft's PyRIT AI red-teaming framework as a set of structured, discoverable tools for MCP-compatible agents (Claude Code, Antigravity, etc.).
This server is an execution layer only. It does not contain pentesting methodology, does not decide which attack to run, and does not hardcode attack sequences. The calling agent is responsible for all planning and decision-making; this server just executes what it's told, against authorized targets, and returns structured results.
Quickstart
uv sync
uv run python server.pyThis starts the server on stdio, ready to be attached to an MCP client. See docs/examples.md for Claude Code / Antigravity client configuration.
Related MCP server: Maester MCP Server
What it does
Engagements: independent, stateful red-team sessions (
create_engagement,list_engagements,get_engagement,close_engagement).Targets: configure any REST/JSON chat endpoint as an attack target (
configure_target,get_target,validate_target).Attacks: run/continue/cancel any of PyRIT's attack strategies against a target (
list_attack_strategies,run_attack,continue_attack,cancel_attack).Scoring: score any response with a PyRIT scorer (
score_response,get_scores).Reports: generate JSON/Markdown/HTML reports from engagement findings, scores, and timeline (
generate_report,list_reports,export_report).Discovery: introspect what's available (
get_server_info,get_pyrit_version,list_capabilities).Findings: record and list findings on an engagement (
add_finding,list_findings).
See docs/tool_reference.md for the full tool reference.
Documentation
Requirements
Python 3.12+
uv (or Poetry)
Testing
uv run pytestSecurity notes
This server is designed for authorized AI security assessments only. It stores no API keys in reports, redacts auth tokens/headers in every serialized view, and never logs secret values. It sends real HTTP requests to whatever endpoint you configure as a target -- only point it at systems you are authorized to test.
Contributing
Contributions are welcome. See CONTRIBUTING.md.
License
Available Tools
22 toolsadd_findingC
Record a finding on an engagement (e.g. a confirmed jailbreak or policy violation).
Findings are included in generated reports. The agent decides what constitutes a finding; the server only stores it.
Inputs: title (required), description (required), engagement_id (required), evidence, +1 more. Returns: data, error, success
cancel_attackC
Cancel a currently running attack within an engagement.
Inputs: attack_run_id (required), engagement_id (required). Returns: data, error, success
close_engagementB
Close an engagement, cancelling any attacks still running within it.
Inputs: engagement_id (required). Returns: data, error, success
configure_targetA
Configure (or replace) the REST chat target for an engagement.
`target.request_template` is the JSON body sent to the endpoint, with the
literal token `target.prompt_placeholder` (default "{{PROMPT}}") substituted
with the outgoing prompt text anywhere it appears. `target.response_text_path`
is a dotted/indexed path used to extract the reply text from the JSON response
(e.g. "choices.0.message.content").
Inputs: target (required), engagement_id (required). Returns: data, error, success
continue_attackC
Continue a previous attack conversation with a new objective/turn.
Inputs: objective (required), attack_name (required), engagement_id (required), conversation_id (required), +2 more. Returns: data, error, success
create_engagementA
Create a new, independent AI red-team engagement and return its id.
The returned engagement id must be used for all subsequent target/attack/ scoring/report tool calls that operate within this engagement.
Inputs: name (required). Returns: data, error, success
export_reportC
Copy a previously generated report to an arbitrary destination path.
Inputs: report_id (required), engagement_id (required), destination_path (required). Returns: data, error, success
generate_reportA
Generate a report (format: json, markdown, or html) for an engagement.
The report includes an executive summary, findings, scores, metadata, and
a timeline of engagement events. The file is written under the server's
report output directory and tracked on the engagement.
Inputs: engagement_id (required), title, format. Returns: data, error, success
get_engagementA
Get the current summary state of a single engagement by id.
Inputs: engagement_id (required). Returns: data, error, success
get_pyrit_versionA
Get the installed PyRIT framework version.
Inputs: no named parameters. Returns: data, error, success
get_scoresC
List all scores recorded so far within an engagement.
Inputs: engagement_id (required). Returns: data, error, success
get_server_infoB
Get PyRIT MCP server identity, version, and current engagement counts.
Inputs: no named parameters. Returns: data, error, success
get_targetB
Get the currently configured target for an engagement (secrets redacted).
Inputs: engagement_id (required). Returns: data, error, success
health_checkA
Basic liveness check for the MCP server.
Inputs: no named parameters. Returns: data, error, success
list_attack_strategiesA
List available PyRIT attack strategies and their constructor parameters.
Discovery only -- this does not recommend or select a strategy. The calling agent must choose which attack to run based on its own plan.
Inputs: no named parameters. Returns: data, error, success
list_capabilitiesA
List discoverable server capabilities: attack strategies, scorers, datasets, report formats.
Discovery only. The agent is responsible for deciding which capability to use.
Inputs: no named parameters. Returns: data, error, success
list_engagementsA
List all engagements, optionally filtered by status ('active' or 'closed').
Inputs: status. Returns: data, error, success
list_findingsC
List all findings recorded so far on an engagement.
Inputs: engagement_id (required). Returns: data, error, success
list_reportsC
List all reports generated so far for an engagement.
Inputs: engagement_id (required). Returns: data, error, success
run_attackA
Run a named PyRIT attack strategy against the engagement's configured target.
Starts a new conversation. Use `continue_attack` to keep talking within the
same conversation. Optionally scores the final response with `scorer_names`.
Inputs: objective (required), attack_name (required), engagement_id (required), scorer_names, +2 more. Returns: data, error, success
score_responseC
Score arbitrary text (e.g. a target response) with a named PyRIT scorer.
Returns success/confidence/risk/explanation/raw_score/metadata per PRD contract.
Scorers that require an LLM judge (see list_capabilities) reuse the engagement's
configured target as the judge model.
Inputs: text (required), scorer_name (required), engagement_id (required), scorer_params, +1 more. Returns: data, error, success
validate_targetC
Send a lightweight connectivity check to the engagement's configured target.
Inputs: engagement_id (required). Returns: data, error, success
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Each tool targets a distinct action (create, configure, run, cancel, etc.) on a specific resource (engagement, target, attack, finding, report). The list tools clearly differentiate by what they list, and get vs list tools are distinct. No two tools have ambiguous boundaries.
All tool names use consistent verb_noun snake_case (e.g., create_engagement, run_attack, list_findings). The verbs are varied but follow a predictable pattern, and there is no mixing of naming conventions or vague verbs.
22 tools is well-scoped for an AI red-team engagement server, covering engagement management, target configuration, attack execution, scoring, reporting, and status queries. Each tool earns its place without feeling excessive or insufficient.
The tool set provides full lifecycle coverage: create/close engagements, configure/validate targets, run/continue/cancel attacks, score responses, add findings, generate/export/list reports, and list capabilities. No obvious gaps exist that would hinder an agent from completing typical red-team workflows.
Maintenance
Related MCP Connectors
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
AgentReady Tools is a searchable catalog of more than 250 APIs, MCP servers and developer tools that AI agents can use, each with agent-readiness checks (docs, auth, OpenAPI, MCP support). Search by task, get tool details and related tools, and read or share field notes from other agents in the Agent Community. Remote MCP endpoint: https://agentready-tools.com/mcp
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes all PHANTOM security testing capabilities as MCP tools, enabling reconnaissance, vulnerability scanning, red teaming, and report generation through natural language interactions.2-
- AlicenseAqualityDmaintenanceExposes the Maester security test framework for Microsoft 365/Entra/Defender as MCP tools, enabling AI agents to run tests, audit AI agents and MCP servers, and investigate security posture.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLM-driven security assessments by exposing Kali tools like nmap, httpx, sqlmap, and ffuf as MCP tools, with explicit planning, parallel tool calls, tiered memory, MITRE ATT&CK mapping, and human approval gates for intrusive operations.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to orchestrate 100+ security tools over MCP for authorized penetration testing, including recon, scanning, exploitation, attack-chain planning, and knowledge-base retrieval.7Apache 2.0