Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

list_deployments

Retrieve all Velociraptor deployments with filtering options to view current status and manage forensic investigation workflows.

Instructions

List all managed Velociraptor deployments.

Args: profile_filter: Filter by profile name ('rapid', 'standard', 'enterprise') include_destroyed: Include destroyed deployments

Returns: List of deployments with their current status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profile_filterNo
include_destroyedNo

Implementation Reference

  • Implementation of the list_deployments MCP tool. It gathers deployments from Docker and Binary deployers and formats the output as JSON within TextContent.
    @mcp.tool()
    async def list_deployments(
        profile_filter: Optional[str] = None,
        include_destroyed: bool = False,
    ) -> list[TextContent]:
        """List all managed Velociraptor deployments.
    
        Args:
            profile_filter: Filter by profile name ('rapid', 'standard', 'enterprise')
            include_destroyed: Include destroyed deployments
    
        Returns:
            List of deployments with their current status.
        """
        try:
            from ..deployment.deployers import DockerDeployer, BinaryDeployer
            from ..deployment.profiles import DeploymentState
    
            all_deployments = []
    
            # Get Docker deployments
            try:
                docker_deployer = DockerDeployer()
                deployments = docker_deployer.list_deployments()
                all_deployments.extend(deployments)
            except Exception:
                pass
    
            # Get binary deployments
            try:
                binary_deployer = BinaryDeployer()
                deployments = binary_deployer.list_deployments()
                all_deployments.extend(deployments)
            except Exception:
                pass
    
            # Filter results
            filtered = []
            for d in all_deployments:
                if profile_filter and d.profile != profile_filter:
                    continue
                if not include_destroyed and d.state == DeploymentState.DESTROYED:
                    continue
                filtered.append(d.to_dict())
    
            return [TextContent(
                type="text",
                text=json.dumps({
                    "count": len(filtered),
                    "deployments": filtered,
                }, indent=2, default=str)
            )]
    
        except ImportError as e:
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": f"Missing dependency: {str(e)}",
                    "hint": "Install required packages with: pip install megaraptor-mcp[deployment]"
                }, indent=2)
            )]
    
        except Exception:
            # Generic errors - don't expose internals
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": "Failed to list deployments",
                    "hint": "Check deployment infrastructure is available"
                }, indent=2)
            )]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wagonbomb/megaraptor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server