CrowdStrike Falcon MCP Server

repository·main·Indexed 42 days ago

https://github.com/crowdstrike/falcon-mcp

A Model Context Protocol (MCP) server version 0.19.0 that connects AI agents to the CrowdStrike Falcon platform. It enables programmatic access to detections, threat intelligence, and host management through various functional modules including NGSIEM, Spotlight, and Real Time Response. Supports local execution, Docker deployment, and integration with Google ADK and Gemini Enterprise.

Tokens
62.4K
Snippets
142
Records
288
Agent score
52%

What's inside Falcon MCP

  1. Use the Guardian module for AI agent inventory and activity

    main
    The Guardian module provides tools for querying AI agent inventory and activity data within the CrowdStrike Falcon ecosystem. It allows you to search for agents, MCP servers, tools, and session details, as well as monitor tool usage and executions.
  2. Real Time Response (RTR) Module Overview

    main

    The Real Time Response (RTR) module allows for initiating, inspecting, and executing read-only RTR commands during host investigations.

    Important Availability Note: This module is not available on CrowdStrike's hosted Falcon MCP; it is only available when you are self-hosting the server.

    Required API Scopes

    To use the tools in this module, your API credentials must have the following scopes:

    • Real time response:read
    • real-time-response-audit:read
    • Real time response:write
  3. Manage custom IOCs with Falcon MCP

    main

    The IOC (Indicator of Compromise) module allows you to search, create, and delete custom IOCs using Falcon IOC Service Collection endpoints.

    Required API Scopes

    To use these tools, your Falcon credentials must have the following scopes:

    • IOC Management:read: Required for searching IOCs.
    • IOC Management:write: Required for adding or removing IOCs.
  4. Connect AI assistants to CrowdStrike Falcon via MCP

    main
    The Falcon MCP (Model Context Protocol) enables AI assistants—such as Claude Desktop, VS Code, Gemini CLI, and custom agents—to interact directly with your CrowdStrike Falcon environment. This connection allows AI-powered security operations, including threat investigation, detection triage, and fleet querying.
  5. Understand the unified Policies module and hosted MCP differences

    main

    The Policies module provides a unified set of tools for managing CrowdStrike host-based policies across six types: prevention, sensor_update, firewall, device_control, response, and content_update. These are managed via a single policy_type discriminator.

    Important Difference for Hosted MCP: If you are using the hosted CrowdStrike Falcon MCP, these unified tools are not used. Instead, the hosted MCP exposes six policy-type-specific variants of each tool, suffixed by the type (e.g., falcon_search_policies_firewall instead of falcon_search_policies with a policy_type parameter).

  6. Available Falcon MCP capabilities and modules

    main

    The Falcon MCP provides access to various security domains through specialized modules. You can use these modules to perform the following tasks via an AI assistant:

    • Investigate Threats: Search detections by severity, time range, hostname, or MITRE ATT&CK technique.
    • Query Your Fleet: Find hosts by platform, sensor version, network segment, or containment status.
    • Hunt Vulnerabilities: Pull Spotlight CVE data with ExPRT ratings and remediation priorities.
    • Research Adversaries: Look up threat actors, indicators, and intelligence reports.
    • Monitor Cloud Posture: Search CSPM assets, container images, and Kubernetes workloads.
    • Assess Identity Risk: Investigate entities, analyze timelines, and map relationships.
    • Execute CQL Queries: Run searches against CrowdStrike Next-Gen SIEM.
    • Manage IOCs: Search, create, and remove custom indicators of compromise.
    • Audit Firewall Rules: Search and manage Falcon firewall rule groups.

    Additional capabilities include Real Time Response, Scheduled Reports, and Shield.

  7. Optimize agent performance and costs

    main

    The agent includes native features to manage performance and costs. These can be toggled in the .env file:

    Event Compaction and Context Caching

    • EVENT_COMPACTION=Y: Enables ADK event compaction.
    • CONTEXT_CACHING=Y: Enables ADK context caching. This automatically triggers for conversations exceeding 4096 tokens (min_tokens=4096).

    Note: In ADK 2.5.0, these features are marked @experimental and will emit a UserWarning at startup.

    Model Selection and Regional Deployment

    • For models hosted on the global endpoint (e.g., gemini-3.5-flash), set GOOGLE_CLOUD_LOCATION=global in .env.
    • When deploying via adk deploy, always specify a regional runtime (e.g., --region us-central1) so the container is hosted regionally while querying the global model endpoint.
  8. Restrict the Falcon MCP tool surface

    main

    You can narrow the available tools using three primary methods. Note that --tools is additive (it adds tools on top of enabled modules), while --exclude-tools and --read-only are subtractive (they act as a floor that cannot be bypassed).

    Resolution Order

    When multiple restriction flags are used, they resolve in this order:

    1. --exclude-tools: Removes a tool unconditionally.
    2. --read-only: Removes all mutating tools unconditionally.
    3. --tools: Adds specific tools (can bypass module gates, but cannot bypass --exclude-tools or --read-only).
    4. --modules: Determines the default candidate tools.

    Common Scenarios

    • Investigation-only: Use --read-only to disable all mutating tools.
    • Strict Allow-list: Use --tools with specific names (e.g., falcon_search_detections). If used alone, no modules are loaded.
    • Hybrid approach: Use --modules to enable a set, then --exclude-tools to remove a specific dangerous tool from that module.

    Note: Tool names are prefixed with falcon_. Typos in --exclude-tools will cause the server to abort startup rather than silently failing.

    ```bash
    # Investigation-only server
    falcon-mcp --read-only
    
    # Expose exactly two tools, nothing else
    falcon-mcp --tools falcon_search_detections,falcon_search_hosts
    
    # Keep the module, drop one tool
    falcon-mcp --modules hostgroups --exclude-tools falcon_delete_host_groups
    
    # All of detections, plus one tool from a module you did not enable
    falcon-mcp --modules detections --tools falcon_search_applications
    ```埋
  9. How module documentation is auto-generated

    main

    The documentation for Python modules is automatically generated from the source code in falcon_mcp/modules/ using the scripts/generate_module_docs.py script.

    Important: Files in docs/modules/ are auto-generated and will be overwritten on every build. Do not edit them manually.

    Automatic Extraction Logic

    • Module Pages: One page is created per module containing API scopes, tools (with docstrings, scopes, and annotations), and resources.
    • Module Overview: A summary table is generated at docs/modules/overview.md.
    • Title/Description Derivation: The generator extracts the title from the first line of the module docstring (stripping module for Falcon MCP Server.) and the description from the first sentence of the second paragraph (stripping This module provides tools for ...).

    Customizing Module Metadata

    To override the automatic title, slug, or description, add an entry to the MODULE_METADATA dictionary in scripts/generate_module_docs.py:

    MODULE_METADATA: dict[str, dict[str, Any]] = {
        "mymodule": {
            "title": "My Custom Title",      # optional
            "slug": "my-module",             # optional (defaults to module key)
            "description": "Custom desc.",   # optional (defaults to docstring-derived)
        },
    }

    Adding Tool Examples

    To provide example prompts for a specific tool, add entries to the TOOL_EXAMPLES dictionary in scripts/generate_module_docs.py:

    TOOL_EXAMPLES: dict[str, list[str]] = {
        "falcon_my_tool": [
            "Example prompt for the tool",
        ],
    }
    MODULE_METADATA: dict[str, dict[str, Any]] = {
        "mymodule": {
            "title": "My Custom Title",      # optional
            "slug": "my-module",             # optional (defaults to module key)
            "description": "Custom desc.",   # optional (defaults to docstring-derived)
        },
    }
  10. Integrate resources with tools

    main

    To improve tool usability, explicitly reference your resources within tool definitions. This is done by:

    1. Including the resource URI in the parameter description.
    2. Mentioning the resource in the tool's docstring.

    This allows the model to know exactly which documentation to consult when constructing arguments for a tool call.

    def query_actor_entities(
        self,
        filter: str | None = Field(
            default=None,
            description="FQL filter expression. See `falcon://intel/actors/fql-guide` for syntax.",
        ),
        # Other parameters...
    ) -> list[dict[str, Any]]:
        """Research threat actors and adversary groups tracked by CrowdStrike intelligence.
    
        Use this to search actors by name, target countries/industries, or activity dates.
        Consult falcon://intel/actors/fql-guide before constructing filter expressions.
        Returns full actor profiles including aliases, motivations, and targeting details.
        """
        # Method implementation...