Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

deploy_server

Deploy a Velociraptor server for incident response and digital forensics. Configure deployment type, profile, and ports to set up endpoint management and threat hunting capabilities.

Instructions

Deploy a Velociraptor server for incident response.

Args: deployment_type: Deployment target - 'docker', 'binary', 'aws', or 'azure' profile: Deployment profile - 'rapid' (auto-destroys in 72h), 'standard', or 'enterprise' server_hostname: Hostname for the server (used in certificates and config) gui_port: Port for GUI/API access (default 8889) frontend_port: Port for client connections (default 8000) target_host: Target host for binary deployment (required for binary type) ssh_user: SSH username for binary deployment ssh_key_path: Path to SSH private key for binary deployment

Returns: Deployment details including server URL, API URL, and admin credentials. IMPORTANT: Admin password is shown only once - save it immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployment_typeNodocker
profileNostandard
server_hostnameNolocalhost
gui_portNo
frontend_portNo
target_hostNo
ssh_userNo
ssh_key_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function `deploy_server` that performs the deployment logic, selects the appropriate deployer (Docker, Binary, AWS, Azure), and generates certificates/config.
    @mcp.tool()
    async def deploy_server(
        deployment_type: str = "docker",
        profile: str = "standard",
        server_hostname: str = "localhost",
        gui_port: int = 8889,
        frontend_port: int = 8000,
        target_host: Optional[str] = None,
        ssh_user: Optional[str] = None,
        ssh_key_path: Optional[str] = None,
    ) -> list[TextContent]:
        """Deploy a Velociraptor server for incident response.
    
        Args:
            deployment_type: Deployment target - 'docker', 'binary', 'aws', or 'azure'
            profile: Deployment profile - 'rapid' (auto-destroys in 72h), 'standard', or 'enterprise'
            server_hostname: Hostname for the server (used in certificates and config)
            gui_port: Port for GUI/API access (default 8889)
            frontend_port: Port for client connections (default 8000)
            target_host: Target host for binary deployment (required for binary type)
            ssh_user: SSH username for binary deployment
            ssh_key_path: Path to SSH private key for binary deployment
    
        Returns:
            Deployment details including server URL, API URL, and admin credentials.
            IMPORTANT: Admin password is shown only once - save it immediately.
        """
        try:
            # Validate profile
            deployment_profile = get_profile(profile)
    
            # Generate deployment ID and config
            deployment_id = generate_deployment_id()
            config = DeploymentConfig(
                deployment_id=deployment_id,
                profile=profile,
                target=deployment_type,
                server_hostname=server_hostname,
                gui_port=gui_port,
                frontend_port=frontend_port,
            )
    
            # Generate certificates
            from ..deployment.security import CertificateManager
            cert_manager = CertificateManager()
            certificates = cert_manager.generate_bundle(
                server_hostname=server_hostname,
                san_ips=[target_host] if target_host else None,
                rapid=(profile == "rapid"),
            )
            cert_manager.save_bundle(certificates, deployment_id)
    
            # Select and run deployer
            if deployment_type == "docker":
                from ..deployment.deployers import DockerDeployer
                deployer = DockerDeployer()
                result = await deployer.deploy(config, deployment_profile, certificates)
    
            elif deployment_type == "binary":
                if not target_host:
                    return [TextContent(
                        type="text",
                        text=json.dumps({
                            "error": "target_host is required for binary deployment"
                        }, indent=2)
                    )]
                from ..deployment.deployers import BinaryDeployer
                deployer = BinaryDeployer()
                result = await deployer.deploy(
                    config, deployment_profile, certificates,
                    target_host=target_host,
                    ssh_user=ssh_user or "root",
                    ssh_key_path=ssh_key_path,
                )
    
            elif deployment_type == "aws":
                from ..deployment.deployers import AWSDeployer
                deployer = AWSDeployer()
                result = await deployer.deploy(config, deployment_profile, certificates)
    
            elif deployment_type == "azure":
                from ..deployment.deployers import AzureDeployer
                deployer = AzureDeployer()
                result = await deployer.deploy(config, deployment_profile, certificates)
    
            else:
                return [TextContent(
                    type="text",
                    text=json.dumps({
                        "error": f"Unknown deployment type: {deployment_type}",
                        "valid_types": ["docker", "binary", "aws", "azure"]
                    }, indent=2)
                )]
    
            # Return result with password visible (only time it's shown)
            return [TextContent(
                type="text",
                text=json.dumps(result.to_dict(include_secrets=True), indent=2)
            )]
    
        except ImportError as e:
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": f"Missing dependency: {str(e)}",
                    "suggestion": "Install required packages with: pip install megaraptor-mcp[deployment]"
                }, indent=2)
            )]
    
        except ValueError as e:
            # Validation errors
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": str(e),
                    "hint": "Check your deployment parameters"
                }, indent=2)
            )]
    
        except Exception:
            # Generic errors - don't expose internals
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": "Failed to deploy server",
                    "hint": "Check deployment configuration and try again. Ensure Docker is running for docker deployments."
                }, indent=2)
            )]
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and successfully discloses critical behaviors: the 'rapid' profile auto-destroys in 72 hours, admin credentials are shown only once, and return values include sensitive deployment details. Missing operational details like idempotency or required permissions prevent a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The docstring-style structure (Args/Returns) is appropriate and front-loaded with purpose. Content is information-dense without fluff, though the repetitive 'X: description' format for 8 parameters is necessary but slightly verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 8-parameter deployment tool with zero schema coverage, the description comprehensively documents inputs, outputs, and critical runtime behaviors (auto-destruction, credential handling). Minor gap regarding sibling tool relationships is the only omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Given 0% schema description coverage, the Args section fully compensates by documenting all 8 parameters: valid enum values for deployment_type (docker, binary, aws, azure) and profile (rapid, standard, enterprise), default ports, conditional requirements for SSH parameters, and the hostname's role in certificate generation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool deploys a Velociraptor server for incident response with specific verb and resource. However, it does not differentiate from sibling tools 'deploy_server_cloud' and 'deploy_server_docker', which appear to be specialized alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The Args section provides parameter-level guidance (e.g., target_host required for binary type, rapid profile auto-destroys), but lacks explicit guidance on when to choose this unified tool versus specialized sibling deployment tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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