Skip to main content

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

Prerequisites

  • uv 0.4 or newer, which provides the uvx runner used in the examples below.
  • Docker with the Compose plugin (Compose v2).

Installation

You can install the MCP using uvx or use packaged .mcpb file for claude code.

Using .mcpb package

If you're using claude desktop, you can configure the MCP directly by double-clicking the .mcpb file that accompanies the release.

Using uvx

  • Configure supported clients automatically with uvx --from crowdsec-local-mcp init <client>, where <client> is one of claude-desktop, claude-code, chatgpt, vscode, or stdio:
uvx --from crowdsec-local-mcp init --dry-run claude-code

Run uvx --from crowdsec-local-mcp init --help to see all flags and supported targets.

What init configures

The init helper writes the CrowdSec MCP server definition into the client’s JSON configuration:

  • claude-desktop → claude_desktop_config.json in the Claude Desktop settings directory
  • claude-code → invoke claude mcp command with needed args
  • chatgpt → config.json in the ChatGPT Desktop settings directory
  • vscode → mcp.json for VS Code (stable and insiders are both detected)

If the client's configuration file already exists, a .bak backup is created before the MCP server block is updated. When the file is missing you can either pass --force to create it, or point --config-path to a custom location. Combine --dry-run with these options to preview the JSON without making any changes.

By default the CLI launches the server with uvx --from crowdsec-local-mcp crowdsec-mcp. If neither uvx nor uv is available, it falls back to your current Python interpreter; you can override the executable with --command and the working directory with --cwd.

Using the stdio target

stdio does not modify any files. Instead, init stdio prints a ready-to-paste JSON snippet that you can drop into any stdio-compatible MCP client configuration. This is useful when you want to manually wire the server into tools that do not have built-in automation support yet.

Troubleshooting

If you just installed the mcp extension via .mcpb and uv or uvx isn't in the standard path, check the extension settings to configure uv path.

Logging

  • The MCP server writes its log file to your operating system's temporary directory. On Linux/macOS this is typically /tmp/crowdsec-mcp.log; on Windows it resolves via %TEMP%\crowdsec-mcp.log.

Metadata

Release files for crowdsec-local-mcp 0.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crowdsec-local-mcp 0.9.3
File Size Uploaded Provenance Actions
crowdsec_local_mcp-0.9.3.tar.gz 215.7 kB Without provenance Details for crowdsec_local_mcp-0.9.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crowdsec-local-mcp 0.9.3
File Interpreter ABI Platform Actions
crowdsec_local_mcp-0.9.3-py3-none-any.whl Python 3 none any Details for crowdsec_local_mcp-0.9.3-py3-none-any.whl

Total release size: 289.0 kB

Release files / crowdsec_local_mcp-0.9.3.tar.gz

Download URL crowdsec_local_mcp-0.9.3.tar.gz
Size 215.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7d39a17455b7039c1d3c5e2d9576df8fc70403979367cce737cbda2f029da2db
BLAKE2b-256 checksum
How to use checksums
98177f64d3a6bbbd87000a7732618cb1db66ad017b3864a89c2a07b9905dbe2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / crowdsec_local_mcp-0.9.3-py3-none-any.whl

Download URL crowdsec_local_mcp-0.9.3-py3-none-any.whl
Size 73.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
226a2275be698d9104fd743344a89b163df6f14773c818052aaddd8c0aade02a
BLAKE2b-256 checksum
How to use checksums
cd4d841e7a71769408d277e30560f571b2dd21e2ee9e843f2b2e8939cc0ccc81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for crowdsec-local-mcp 0.9.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page