NEW

Panther Helps GitGuardian Resolve Alerts in Minutes. Learn more

close

Panther Helps GitGuardian Resolve Alerts in Minutes. Learn more

close

Panther Helps GitGuardian Resolve Alerts in Minutes. Learn more

close

BLOG

BLOG

10× Your Detection Engineering Workflows with MCP

Jack

Naglieri

Jul 17, 2025

Streamline your detection engineering process with AI-powered tools that eliminate context-switching and accelerate rule development

AI has transformed productivity through faster research, automated code generation, and intelligent data analysis, but integrating these benefits into detection engineering workflows has remained challenging. For security teams using AI IDEs like Cursor, Model Context Protocol (MCP) integrations provide the missing connection between AI capabilities and security operations tools.

Key Benefits:

  • Unified Workflow: Eliminate context-switching between IDEs, SIEMs, and documentation

  • Natural Language Querying: Explore security data without complex query syntax

  • Accelerated Rule Development: Generate production-ready detection rules from plain English descriptions

  • Data-Driven Tuning: Optimize rules using real alert patterns and historical data

AI IDEs excel at programming language support, codebase navigation, and version control, but they typically remain isolated from external security tools. This creates friction where detection engineers constantly switch between their IDE, SIEM interface, ticketing systems, and documentation platforms to gather context and validate their work.

MCP standardizes connections between large language models and external data sources, enabling security teams to interact with their security tools through natural language within their preferred development environment. Instead of manually navigating SIEM interfaces or switching between multiple tools during rule development, detection engineers can maintain their entire workflow in one place.

This post demonstrates how to connect Cursor to Panther's MCP server and configure detection engineering workflows that significantly reduce the time and complexity involved in writing and testing security detection rules.

Understanding MCP in Security Operations

The Model Context Protocol is an open standard that enables developers to build secure, two-way connections between their data sources and AI-powered tools, fundamentally changing how security teams interact with their toolchain. As we detailed in our introductory post on MCP, MCP addresses the challenge of AI models being "trapped behind information silos and legacy systems" by providing "a universal, open standard for connecting AI systems with data sources."

For detection engineering specifically, MCP eliminates the traditional barriers that make SIEM access challenging for newer team members and time-consuming for experienced practitioners. Instead of requiring deep knowledge of query languages, log schemas, and tool-specific interfaces, detection engineers can leverage natural language to interact with their security data and tools.

The protocol's standardization means that once you configure MCP with your preferred AI IDE, you gain consistent access to all your security tools through the same conversational interface. This approach replaces "today's fragmented integrations with a more sustainable architecture," where security teams can maintain context while moving between different tools and datasets.

What makes MCP particularly powerful for detection engineering is its ability to maintain context across complex workflows. Traditional detection development involves multiple context switches: querying logs in a SIEM, writing rules in an IDE, testing against historical data, and analyzing alert patterns in yet another interface. MCP keeps all of this within your development environment, allowing the AI to understand the full context of your detection engineering process.

Strengths and Limitations of MCP

Before diving into implementation, it's important to understand both what MCP excels at and where additional configuration is required to achieve optimal results.

MCP's primary strength lies as an integration mechanism that effortlessly provides natural language interfaces to your existing services and APIs. It particularly excels at multi-system integration, allowing you to seamlessly move context between your SIEM, ticketing systems, and cloud infrastructure during investigations, all through natural language commands.

However, MCP servers are integration tools, not intelligent agents. They provide standardized access to data and functionality, but they don't inherently understand complex, domain-specific end-to-end tasks. This distinction is crucial for detection engineers. While MCP provides your AI assistant with powerful tools to interact with security systems, the intelligence on how to use those tools effectively must come from well-crafted prompts, rules, and organizational context that you provide to your AI environment.

For example, Panther’s MCP server can fetch authentication logs and create detection rules, but it won't automatically know that your organization prioritizes certain threat models or follows specific naming conventions in production.

Prompt Engineering

Effective MCP implementation requires thoughtful prompt engineering to bridge the gap between raw tool access and intelligent task completion. You need to explicitly define:

  • Task methodology: How investigations should be conducted and what steps to follow

  • Output formatting: The structure and style of generated detection rules, reports, or documentation

  • Organizational context: Your threat model, compliance requirements, and operational procedures

  • Quality standards: Testing requirements, validation processes, and deployment criteria

Think of MCP as providing the "toolkit" for your AI assistant—powerful capabilities to manipulate data and systems—while prompts and rules provide the "blueprint" that directs how those capabilities should be applied to achieve your specific security objectives.

This combination of standardized tool access through MCP and carefully crafted guidance through prompts creates the foundation for truly effective AI-augmented detection engineering workflows.

Prerequisites and Setup

Let's configure the foundation for MCP-powered detection engineering with Panther.

Terminology

Here are five succinct definitions of key AI terms used in this post:

  • MCP Server: A server providing context, tools, and prompts to clients

  • MCP Client: An AI application that initiates requests to an MCP server for data or actions

  • MCP Host: The main application, such as Cursor, where the MCP client is run

  • LLM (Large Language Model): An AI model trained on massive amounts of text data to comprehend and produce human-like language.

  • IDE (Integrated Development Environment): A software application that bundles tools for programmers, like a code editor and debugger, into a single interface.

System Requirements

You'll need Cursor installed on your system. Cursor runs on Windows, macOS, and Linux, and can be downloaded from cursor.com. The IDE is built on VSCode, so if you're familiar with that environment, you'll feel right at home. If you use another MCP-compatible AI assistant for coding, such as Goose, that’ll work, too.

Setting Up the Panther Analysis Repository

Start by pulling the latest release of the panther-analysis repository, which contains pre-configured Cursor rules optimized for detection engineering:

git clone https://github.com/panther-labs/panther-analysis.git
cd panther-analysis

This repository includes various detection rules, queries, tests, and Cursor-specific configurations (in .cursor/rules ) that help maintain consistency across your detections.

Configuring Panther’s MCP Server

The Panther MCP server will provide the critical connection for Cursor to convert natural language queries into security answers. To get started, create a service account for secure API access. Follow the instructions in the mcp-panther repository README to:

  1. Create a service account in your Panther deployment

  2. Generate API credentials with least privilege permissions

  3. Install mcp-panther locally using either Docker or uvx

  4. Configure the required environment variables

Once installed, add the server to your Cursor configuration by creating or updating ~/.cursor/mcp.json

:{
    "mcpServers": {
      "mcp-panther": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "-e", "PANTHER_INSTANCE_URL",
          "-e", "PANTHER_API_TOKEN",
          "--rm",
          "ghcr.io/panther-labs/mcp-panther"
        ],
        "env": {
          "PANTHER_INSTANCE_URL": "https://instance-goes-here.net",
          "PANTHER_API_TOKEN": "token-goes-here"
        }
      }
    }
  }

You should treat this as a credential file with the appropriate care.

Once complete, you should now see mcp-panther running under the MCP Tools section in the Settings > Cursor Settings menu. The successful integration provides immediate access to Panther's backend tools through natural language commands in your Cursor chat.

Detection Engineering Workflows

With MCP and Cursor properly configured, let's explore how this integration transforms the three fundamental detection engineering workflows. Each workflow builds upon the previous one, creating a comprehensive detection development cycle that maintains context and accelerates time-to-production.

Natural Language Data Exploration

Traditional log analysis requires a deep understanding of data schemas, field names, and query syntax. With Panther’s MCP server, detection engineers can explore their security data conversationally, dramatically reducing the time from question to insight.

It’s essential to note that the accuracy of rule generation depends on the breadth of examples in the current repository, the available data in your data lake, and the specific foundational model’s training set.

To protect against hallucinations, try Anthropic’s tips for clear prompting.

Schema Discovery

Instead of consulting documentation or manually inspecting log schemas, you can ask Cursor directly about your data’s structure:

The AI client leverages Panther's log_type_schema tools to return field names, types, and sample values, which are valuable when working with a new log source, investigating unfamiliar data patterns, and preparing for detection rule creation.

Data Exploration and Sample Retrieval

During detection development, engineers often need log samples to validate attacker patterns and validate rule logic based on real-world examples. Complex security questions can be translated into SQL queries, which is one of Panther’s underlying languages, without requiring deep expertise:

This user’s request automatically:

  • Learns about the available database tables

  • Gets the relevant schema(s)

  • Writes a query and reviews the results

With this helpful context in mind, you can ask follow-up questions, seek clarifications, or pose related questions. The AI client generates optimized SQL queries based on your requests while utilizing the available fields in the schema returned by the MCP tool.

AI models also understand security-specific concepts like "unusual geographic locations" and can translate these into appropriate conditional logic, although it’s important to be as specific as possible.

AI-Assisted Rule Creation

Building on your data exploration insights, rule creation transforms from a complex coding exercise into a collaborative process with AI. This workflow preserves security engineering rigor while dramatically reducing development time.

From Concept to Code

Rule creation typically begins with an organization’s threat model, followed by the development of detections to track those behaviors, and then testing to ensure the rule is reliable. MCP with Cursor streamlines this process while maintaining the security rigor often applied manually.

When explaining an intended behavior to monitor, it’s recommended to be as descriptive as possible. If you know the data sources, specific fields, or any context that could be useful, it’s important to mention it. Think of your prompts like delegating a task to a teammate; the higher the clarity, the better the result.

In this prompt, we are explicitly invoking the Cursor rules to determine the desired detection rule type. While you could let the MCP host figure it out, it never hurts to be explicit.

The AI generates comprehensive rule implementations that include:

  • Properly structured detection logic with appropriate filtering and performance optimizations

  • Complete metadata including rule classification, MITRE ATT&CK mappings, and severity levels

  • Comprehensive unit tests with both positive and negative test cases

  • Proper error handling and edge case considerations

  • Investigation runbooks with contextual response guidance

Built-in Best Practices

The Cursor rules configuration in the panther-analysis repository encodes security engineering best practices directly into the AI's behavior. When creating rules, the AI automatically:

  • Follows naming conventions and organizational standards

  • Implements proper logging and alerting structures

  • Includes necessary context fields for investigation

  • Applies appropriate thresholds and time windows

Iterative Refinement with Context

AI can occasionally hallucinate and make mistakes, so it’s important to have a strategy for rapid iteration, validation, and testing. Using natural language, users can specify the improvement to be made, such as building a more descriptive runbook:

Changes are applied contextually, maintaining the rule's structure while incorporating your refinements. The AI understands the existing rule context and makes surgical modifications rather than rebuilding from scratch.

Testing

Pairing AI models with testing, linting, and validation tools creates a feedback loop that enhances the long-term quality of the code we produce. To test the produced AI-generated rules, simply run the panther_analysis_tool test command to ensure correctness:

$ panther_analysis_tool test --filter RuleID=AWS.GuardDuty.BitcoinMining

This can also be scaled by running tests on entire directories.

Transforming Detection Engineering Teams

The integration of MCP with Cursor fundamentally changes how detection engineering teams operate, delivering measurable productivity improvements across critical operational dimensions.

Democratized SIEM Access

MCP eliminates traditional barriers that restrict security insights to specialized team members. Junior analysts can leverage AI guidance to conduct sophisticated investigations that previously required years of domain expertise. Non-security stakeholders can query authentication logs, investigate application security data, and generate compliance reports through natural language interactions, all while maintaining enterprise security standards through robust access controls.

Accelerated Development Cycles

Traditional detection engineering requires deep knowledge of data schemas, query optimization, and testing frameworks. MCP transforms this process by enabling natural language descriptions of security logic to be translated into production-ready detection rules with proper validation and testing. This acceleration preserves software engineering rigor while dramatically reducing time to deployment.

Enhanced Context

Modern security operations require correlating data across disparate systems and time ranges. MCP enables natural language queries that span multiple log sources and alert contexts while supporting simultaneous integration with complementary tools. This unified approach eliminates fragmented investigation workflows, enabling analysts to maintain context while gathering comprehensive intelligence across organizational boundaries.

The Future of AI-Native Detection Engineering

The combination of MCP and Cursor represents a fundamental shift in how detection engineering teams approach their craft. By bringing the full context of security operations into the development environment, this integration enables the kind of adaptive, intelligent workflows that modern threat landscapes demand.

This evolution extends beyond individual tool improvements, laying the foundation for detection engineering that dynamically adapts to organizational needs while maintaining the depth and control that security professionals require. The future lies not in replacing human expertise, but in amplifying it through intelligent interfaces that make sophisticated capabilities accessible to broader teams.

The productivity gains are immediate and measurable: faster data exploration, more consistent rule development, and data-driven optimization cycles that improve detection effectiveness while reducing operational overhead. As the security industry continues to grapple with talent shortages and increasing threat complexity, tools like MCP-enabled Cursor provide a path forward that enhances human capabilities rather than replacing them.

Explore Panther's open-source MCP server on GitHub and discover how AI-native interfaces can transform your detection engineering workflows without sacrificing control or visibility. The future of security operations is conversational, contextual, and significantly more productive—and it's available today.

Share:

Share:

Share:

Share:

RESOURCES

RESOURCES

RESOURCES

RESOURCES

Recommended Resources

Ready for less noise
and more control?

See Panther in action. Book a demo today.

Get product updates, webinars, and news

By submitting this form, you acknowledge and agree that Panther will process your personal information in accordance with the Privacy Policy.

Product
Resources
Support
Company