Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xSteph Pentest ai MCP Security Tools

From Leeroopedia
Knowledge Sources
Domains MCP, Tool_Installation, Tool_Planning
Last Updated 2026-10-23 00:00 GMT

Overview

Concrete tool for MCP-exposed security tool planning and installation that lets outer LLMs drive the install side without an API key, provided by the pentest-ai MCP server.

Description

The mcp_server.security_tools module exposes two MCP tools: plan_tools predicts the canonical tool list for a (scope, intensity, target) profile, and ensure_tools_installed audits a list of tools (installed/missing/unknown) and optionally installs the missing ones in one shot. This lets Claude Code, Cursor, or Codex drive tool installation without an Anthropic API key. Extracted from server.py in 0.13.0 cleanup.

Usage

This module is import-side-effect only — @mcp.tool() decorators register against the shared mcp instance at module load. Imported from mcp_server.server.

Code Reference

Source Location

Signature

@mcp.tool()
async def plan_tools(scope: str = "web", intensity: str = "normal", target: str = "") -> dict[str, Any]: ...

@mcp.tool()
async def ensure_tools_installed(tools: list[str], auto_install: bool = False) -> dict[str, Any]: ...

Import

# Side-effect import — tools register on the shared mcp instance
import mcp_server.security_tools  # noqa: F401

I/O Contract

Inputs

Name Type Required Description
scope str No Engagement scope ("web", "ad", "cloud", "full"; default: "web")
intensity str No Scan intensity (default: "normal")
tools list[str] Yes (ensure) Tool names to audit/install
auto_install bool No Install missing tools (default: False)

Outputs

Name Type Description
plan result dict Predicted tool names list
ensure result dict installed/missing/unknown lists, install results

Usage Examples

Plan and Install Tools via MCP

# From Claude Code / Cursor MCP client:
# 1. Plan tools for a web engagement
result = await mcp.call_tool("plan_tools", {"scope": "web"})
# {"tools": ["wpscan", "dalfox", "sqlmap", "ffuf", ...]}

# 2. Install the predicted tools
result = await mcp.call_tool("ensure_tools_installed", {
    "tools": ["wpscan", "dalfox", "sqlmap"],
    "auto_install": True,
})
# {"installed": ["wpscan"], "missing": [], "unknown": [], "results": [...]}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment