Skip to main content
Glama
README.md
# PyRIT MCP Server

An MCP (Model Context Protocol) server that exposes Microsoft's [PyRIT](https://github.com/Azure/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

```bash
uv sync
uv run python server.py
```

This starts the server on stdio, ready to be attached to an MCP client. See
[docs/examples.md](docs/examples.md) for Claude Code / Antigravity client configuration.

## 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](docs/tool_reference.md) for the full tool reference.

## Documentation

- [Installation](docs/installation.md)
- [Development guide](docs/development.md)
- [Architecture overview](docs/architecture.md)
- [Tool reference](docs/tool_reference.md)
- [Examples](docs/examples.md)
- [Contributing](docs/contributing.md)

## Requirements

- Python 3.12+
- [uv](https://docs.astral.sh/uv/) (or Poetry)

## Testing

```bash
uv run pytest
```

## Security 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](CONTRIBUTING.md).

## License

[MIT](LICENSE)

TDQS

A3.6/5.0

Scored across 22 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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

ActivityStale
ResponsivenessNo issues