Environment:0xSteph Pentest ai FastMCP
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, MCP |
| Last Updated | 2026-10-23 14:00 GMT |
Overview
FastMCP >= 2.0 server runtime required by all MCP tool implementations; exposes 52 tools to MCP clients like Claude Code, Cursor, and Windsurf.
Description
This environment provides the FastMCP server framework that powers the `mcp_server/` package. FastMCP is a Python framework for building Model Context Protocol (MCP) servers. Pentest-ai's MCP server (`mcp_server/server.py`) exposes 52 tools covering engagement management, iterative probing, HTTP requests, findings retrieval, auth, and security tool installation.
The MCP server is the primary integration surface for AI coding assistants. It replaces the direct CLI for agent-driven workflows. The server supports both stdio and HTTP transport modes.
Usage
Use this environment when running the MCP server (`ptai mcp` or direct `python -m mcp_server`). Required by any implementation in `mcp_server/` that registers MCP tools. Not needed for CLI-only or API-server deployments.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux, macOS, Windows | Same as Environment:0xSteph_Pentest_ai_Python_3_10_Plus |
| Hardware | Any modern CPU | Same as base Python environment |
| Disk | ~50MB additional | FastMCP package + dependencies |
Dependencies
System Packages
- Python >= 3.10 (see Environment:0xSteph_Pentest_ai_Python_3_10_Plus)
Python Packages
- `fastmcp` >= 2.0
Credentials
No additional credentials beyond those in Environment:0xSteph_Pentest_ai_Python_3_10_Plus. The MCP server inherits LLM provider keys from the process environment.
Quick Install
# FastMCP is a core dependency; included in the base install
pip install -e .
# Verify MCP server starts
ptai mcp --help
Code Evidence
FastMCP dependency declaration from `pyproject.toml:34`:
"fastmcp>=2.0",
MCP server tool registration from `mcp_server/server.py` (52 tools registered via FastMCP decorators):
from fastmcp import FastMCP
mcp = FastMCP("pentest-ai")
@mcp.tool()
async def start_engagement(...):
...
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `ImportError: No module named 'fastmcp'` | FastMCP not installed | `pip install -e .` (it is a core dependency) |
| `MCP server not responding` | Server process not started or wrong transport | Check `ptai mcp` is running; verify client configuration in Claude Code/Cursor settings |
| `Tool not found: ...` | Handler not registered | Ensure all probe handlers are imported so `register_handler` runs at startup |
Compatibility Notes
- Transport modes: Supports stdio (default, for Claude Code) and HTTP (for remote clients via `mcp_server/rest.py`).
- Client compatibility: Tested with Claude Code, Cursor, Windsurf, and generic MCP clients.
- Concurrent connections: The server handles multiple simultaneous MCP sessions; each engagement is isolated by `engagement_id`.
Related Pages
- Implementation:0xSteph_Pentest_ai_start_engagement_mcp
- Implementation:0xSteph_Pentest_ai_list_probes_mcp
- Implementation:0xSteph_Pentest_ai_run_probe_mcp
- Implementation:0xSteph_Pentest_ai_http_request_mcp
- Implementation:0xSteph_Pentest_ai_get_findings_mcp
- Implementation:0xSteph_Pentest_ai_MCP_Auth_Bridge
- Implementation:0xSteph_Pentest_ai_MCP_Auth_Cache
- Implementation:0xSteph_Pentest_ai_MCP_Auth_Local
- Implementation:0xSteph_Pentest_ai_MCP_REST_Adapter
- Implementation:0xSteph_Pentest_ai_MCP_Security_Tools