Skip to main content

An MCP exposing prompts and tools to help users write WAF rules, scenarios etc.

Project description

CrowdSec

Life is too short to write YAML, just ask nicely!

A Model Context Protocol (MCP) server to generate, validate, and deploy CrowdSec WAF rules & Scenarios.

Features

WAF Rules Features

  • WAF Rule Generation: Generate CrowdSec WAF rules from user input or a CVE reference
  • Validation: Validate syntaxical correctness of WAF rules
  • Linting: Get warnings and hints to improve your WAF rules
  • Deployment Guide: Step-by-step deployment instructions
  • Docker Test Harness: Spin up CrowdSec + nginx + bouncer to exercise rules for false positives/negatives
  • Nuclei Lookup: Quickly jump to existing templates in the official projectdiscovery/nuclei-templates repository for a given CVE

Scenarios Features

  • CrowdSec Scenarios Generation: Generate CrowdSec scenarios
  • Validation: Validate syntaxical correctness of scenarios
  • Linting: Get warnings and hints to improve your scenarios
  • Deployment Guide: Step-by-step deployment instructions
  • Docker Test Harness: Spin up CrowdSec to test scenario behavior

Demo

WAF Rules Creation and testing

Scenario Creation and testing

  • XX
  • XX

Installation

Setup

Install dependencies using uv:

uv sync

Configuration for Claude Desktop

macOS/Linux

  1. Find your Claude Desktop config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the MCP server configuration:

{
  "mcpServers": {
    "crowdsec-prompt-server": {
      "command": "/path/to/crowdsec-mcp-rule-helper/.venv/bin/python",
      "args": [
        "/path/to/crowdsec-mcp-rule-helper/mcp-prompt.py"
      ],
      "cwd": "/path/to/crowdsec-mcp-rule-helper"
    }
  }
}

Important: Replace /path/to/crowdsec-mcp-rule-helper with the actual absolute path to your cloned repository.

Pre Requisites

  • Docker + Docker Compose

  • Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crowdsec_local_mcp-0.1.0.tar.gz (40.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crowdsec_local_mcp-0.1.0-py3-none-any.whl (47.0 kB view details)

Uploaded Python 3

File details

Details for the file crowdsec_local_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: crowdsec_local_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.3

File hashes

Hashes for crowdsec_local_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8773d87f200fda9f0d4d09dbed6e42b5e5161c38f42014641ef8353a0b1eef49
MD5 f9c0258cf707ce580708bd6c93197e3d
BLAKE2b-256 1c3d872e46db5d9b164f8a1350297ac44b93d3f949fdb0e5142a758052cf6e40

See more details on using hashes here.

File details

Details for the file crowdsec_local_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crowdsec_local_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2ce65781ec66f2781edc0b98fb7d7d2fca5ef0d19d8490a6158760aa9aed41e
MD5 44c1cc969f0ec72c8454f919d7496c7a
BLAKE2b-256 6ca6de8fc3f85d63295a31db78689b5bb6596366219857d426f00cda01034e09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page