FEAT: MCP (Model Context Protocol) Integration
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
この issue はまだ評価されていません。
説明
Is your feature request related to a problem? Please describe.
When red teaming agentic AI systems, PyRIT currently requires custom integrations for each external tool, data source, or capability. This creates friction when testing systems that use diverse toolsets and limits the ability to dynamically discover and interact with target capabilities during assessments.
TheModel Context Protocol (MCP) by Anthropic provides a standardized interface for LLM-to-tool communication that's rapidly being adopted across the AI ecosystem. Without MCP support, PyRIT cannot natively interact with MCP-enabled targets or leverage the growing ecosystem of MCP servers for red teaming workflows.
Describe the solution you'd like
Add native MCP support to PyRIT, enabling red teaming agents to dynamically discover and use external tools, data sources, and prompt templates via the MCP protocol.
Core Capabilities:
- Tools: Execute functions (converters, probes, external APIs, target system tools)
- Resources: Read data (attack datasets, MITRE ATLAS mappings, reconnaissance results)
- Prompts: Load templates (red team agent prompts, attack strategies)
Proposed Implementation:
The codebase already defines MCP types in MessagePieceType:
MCP_CALL = "mcp_call"
MCP_LIST_TOOLS = "mcp_list_tools"
MCP_APPROVAL_REQUEST = "mcp_approval_request"
These types aren't implemented yet. This proposal would complete that implementation.
Proposed Usage:
from pyrit.mcp import MCPServerConfig, MCPTransport
# Native MCP support in target
target = OpenAIResponseTarget(
mcp_servers=[
MCPServerConfig(
name="converters",
transport=MCPTransport.STDIO,
command="python",
args=["converters_server.py"]
),
MCPServerConfig(
name="recon",
transport=MCPTransport.SSE,
url="http://localhost:8080/sse"
),
]
)
# Target auto-discovers tools, model can call them during conversation
Implementation Phases:
- Core MCP client implementation using the MCP Python SDK
- Integration with OpenAIResponseTarget
- Integration examples with existing agentic security tools as MCP resources/tool
- Documentation and notebooks
Additional context
Relationship to Existing Issues:
- Supersedes #1083
- Supersedes #1118
References:
Open Questions:
- Should example MCP servers live in PyRIT core or a separate repository?
- Which transport should be prioritized first (STDIO vs SSE)?
- Any security considerations for MCP server sandboxing during red team operations?
I'm happy to start the implementation and can break this into smaller PRs. Would welcome collaboration from anyone interested in this direction.
- 主要言語
- Python
- スター
- 4.5k
- フォーク
- 896
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 206
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
Bug: triage GUI help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
microsoft/PyRIT#2868 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
spec-kitty/spec-kitty#5319 ·
メンテナーはふだん 1 日以内に返信
-
backend::vllm diffusion multimodal
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
openai/openai-agents-python#5229 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信