vladsushi/attack_path_mcp
If you are the rightful owner of attack_path_mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Raptor API MCP Server is designed for identity graph analysis and attack path discovery, integrating seamlessly with the Raptor API.
Attack Paths MCP Server
This project provides an MCP (Model Context Protocol) server that integrates with the Raptor API for AI-powered attack path analysis using SignalR streaming.
Overview
The Attack Paths MCP Server enables real-time analysis of security attack paths between source and target objects in identity environments. It leverages SignalR for streaming AI-generated summaries and provides structured analysis of security risks, relationships, and remediation recommendations.
Features
- Real-time SignalR streaming for attack path analysis
- AI-powered analysis with structured JSON output
- Flexible path selection for multiple attack paths scenarios
- Comprehensive security analysis including Objects, Relationships, KeyPointsOfConcern, and Conclusions
- Automatic path detection and intelligent handling of single vs multiple paths
Available MCP Tool
detailed_attack_path_analysis
Performs AI-powered analysis of attack paths between source and target objects.
Parameters:
source_oid(required): Object identifier of the attack sourcetarget_oid(required): Object identifier of the attack targetattack_path_id(optional): Specific attack path ID when multiple paths exist
Behavior:
- Single path found: Automatically generates structured AI analysis
- Multiple paths found: Returns raw attack path data with selection prompt
- Specific path requested: Analyzes the selected attack path by ID
- No paths found: Returns descriptive error
Analysis Output Format: The AI analysis provides structured JSON containing:
- Objects: Detailed descriptions of entities in the attack path
- Relationships: Security-relevant connections and permissions
- KeyPointsOfConcern: Critical security issues and risks identified
- Conclusion: Executive summary with remediation recommendations
Response Types:
attack_path_analysis: Complete structured analysis (JSON string)attack_paths_response: Raw API response with all available pathsmessage: User guidance for path selectionerror: Detailed error description with available options
Installation
-
Clone the repository:
git clone https://github.com/vladsushi/attack_path_mcp.git cd attack_path_mcp -
Install dependencies:
pip install -r requirements.txt -
Set up environment variables: Create a
.envfile based on.env.template:cp .env.template .envEdit
.envand configure:RAPTOR_TOKEN=your_raptor_api_token RAPTOR_URL=http://localhost:5000
Running the Server
Local Development
python attack_paths_server.py
Custom Configuration
python attack_paths_server.py -raptor_token YOUR_TOKEN -raptor_url http://your-raptor-instance:5000 -host 0.0.0.0 -port 8003
Command Line Options
-raptor_token: Override RAPTOR_TOKEN for API access-raptor_url: Override RAPTOR_URL for SignalR hub access (default: http://localhost:5000)-host: Host to bind the server to (default: 127.0.0.1)-port: Port to bind the server to (default: 8003)-path: URL path for the MCP endpoint (default: /mcp)
Testing with MCP Inspector
Debug and test the server using the MCP Inspector:
-
Start the server:
python attack_paths_server.py -
Run MCP Inspector:
npx @modelcontextprotocol/inspector -
Connect to the server:
- Open http://127.0.0.1:6274/ in your browser
- Choose transport type Streamable HTTP
- Enter URL:
http://127.0.0.1:8003/mcp - Click Connect
-
Test the tool:
- Go to the Tools tab
- Select
detailed_attack_path_analysis - Provide
source_oidandtarget_oidparameters - Click Run Tool