Skip to main content
This guide explains how to extend the Prowler MCP Server with new tools and features.
New to Prowler MCP Server? Start with the user documentation:
  • Overview - Key capabilities, use cases, and deployment options
  • Installation - Install locally or use the managed server
  • Configuration - Configure Claude Desktop, Cursor, and other MCP hosts
  • Tools Reference - Complete list of all available tools

Introduction

The Prowler MCP Server brings the entire Prowler ecosystem to AI assistants through the Model Context Protocol (MCP). It enables seamless integration with AI tools like Claude Desktop, Cursor, and other MCP clients. The server follows a modular architecture with three independent sub-servers:
The core Prowler sub-server is served under the prowler_ tool prefix, while its source lives in the prowler_app/ module for historical reasons. Tool names use the prefix; import paths use the module.
For a complete list of tools and their descriptions, see the Tools Reference.

Architecture Overview

The MCP Server architecture is illustrated in the Overview documentation. AI assistants connect through the MCP protocol to access Prowler’s three main components.

Server Structure

The main server orchestrates three sub-servers with prefixed namespacing:

Tool Registration Patterns

The MCP Server uses two patterns for tool registration:
  1. Direct Decorators (Prowler Hub/Docs): Tools are registered using @mcp.tool() decorators
  2. Auto-Discovery (prowler_app): All public methods of BaseTool subclasses are auto-registered

Adding Tools to the prowler_app Sub-Server

Step 1: Create the Tool Class

Create a new file or add to an existing file in prowler_app/tools/:

Step 2: Create the Models

Create corresponding models in prowler_app/models/:

Step 3: Verify Auto-Discovery

No manual registration is needed. The tool_loader.py automatically discovers and registers all BaseTool subclasses. Verify your tool is loaded by checking the server logs:

Adding Tools to Prowler Hub/Docs

For Prowler Hub or Documentation tools, use the @mcp.tool() decorator directly:

Model Design Patterns

MinimalSerializerMixin

All models should use MinimalSerializerMixin to optimize responses for LLM consumption:
This mixin automatically excludes:
  • None values
  • Empty strings
  • Empty lists
  • Empty dictionaries

Two-Tier Model Pattern

Use two-tier models for efficient responses:
  • Simplified: Lightweight models for list operations
  • Detailed: Extended models for single-item retrieval

Factory Method Pattern

Always implement from_api_response() for API transformation:

API Client Usage

The ProwlerAPIClient is a singleton that handles authentication and HTTP requests:

Helper Methods

The API client provides useful helper methods:

Best Practices

Tool Docstrings

Tool docstrings become description that is going to be read by the LLM. Provide clear usage instructions and common workflows:

Error Handling

Return structured error responses instead of raising exceptions:

Parameter Descriptions

Use Pydantic Field() with clear descriptions. This also helps LLMs understand the purpose of each parameter, so be as descriptive as possible:

Development Commands

For complete installation and deployment options, see: For development I recommend to use the Model Context Protocol Inspector as MCP client to test and debug your tools.

MCP Server Overview

Key capabilities, use cases, and deployment options

Tools Reference

Complete reference of all available tools

Prowler Hub

Security checks and compliance frameworks catalog

Lighthouse AI

AI-powered security analyst

Additional Resources