mcp-api-pentest
v0.3.4MCP server for autonomous API logic penetration testing — OWASP API Top 10 / BOLA-IDOR detection via LLM-driven analysis
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
parse_api_spec Parse Api Spec
Reads a local OpenAPI/Swagger file (JSON or YAML), auto-detects format, and selectively extracts routes and methods. Strips verbose descriptions to save up to 70% of LLM tokens.
| Parameter | Type | Description |
|---|---|---|
spec_path * | string |
execute_security_request Execute Security Request
Async resilient HTTP client with anti-blocking (WAF) protection and rate limiting. Supports multiple auth types: bearer, basic, api_key_header, api_key_query, cookie. When stealth mode is enabled, uses random delay between STEALTH_MIN and STEALTH_MAX to evade WAF detection patterns.
| Parameter | Type | Description |
|---|---|---|
method * | string | |
url * | string | |
auth_credentials | ||
auth_key_name | ||
auth_token | ||
auth_type | string | |
body_json | ||
delay_seconds | number | |
stealth | boolean |
analyze_access_control Analyze Access Control
Executes the same HTTP request with two different tokens (privileged vs unprivileged) and compares responses to detect authorization failures (BOLA/IDOR). Automatically cleans volatile fields (timestamps, session_ids, etc.) and calculates structural similarity. Marks as 'is_suspicious_success' if both return 200 OK with >85% similarity. When stealth mode is enabled, uses random delay to evade WAF detection patterns. Supports multiple auth types: bearer, basic, api_key_header, api_key_query, cookie.
| Parameter | Type | Description |
|---|---|---|
privileged_token * | string | |
unprivileged_token * | string | |
url * | string | |
auth_key_name | ||
auth_type | string | |
body_json | ||
delay_seconds | number | |
method | string | |
stealth | boolean |
capture_context Capture Context
Stores a dynamic value in the session cache. Use after POST/PUT responses to save resource IDs for later use in DELETE/GET requests with a different auth token.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
value * | string |
get_context Get Context
Retrieves a previously stored value from the session cache. Returns not_found if the key does not exist. Use to inject dynamic IDs into attack URLs.
| Parameter | Type | Description |
|---|---|---|
key * | string |
list_context List Context
Returns all key-value pairs stored in the session cache. Useful for the LLM to see what dynamic IDs are available for chained attack flows.
clear_context Clear Context
Clears all stored values from the session cache. Use at the start of a new audit cycle to avoid stale data contamination.
extract_json_value Extract Json Value
Extracts a specific value from a JSON response using dot-notation path. Essential for chained attacks where the LLM needs to grab a dynamically created resource ID from a POST response (e.g. 'data.id' → 42).
| Parameter | Type | Description |
|---|---|---|
json_path * | string | |
response_json * | string |
save_security_finding Save Security Finding
| Parameter | Type | Description |
|---|---|---|
affected_url * | string | |
description * | string | |
severity * | string | |
title * | string | |
evidence_request | ||
evidence_response | ||
remediation |