crowdsec-local-mcp
Generates, validates, and deploys CrowdSec WAF rules and scenarios through natural language.
README
<p align="center"> <img src="https://github.com/crowdsecurity/crowdsec-docs/blob/main/crowdsec-docs/static/img/crowdsec_logo.png" alt="CrowdSec" title="CrowdSec" width="400" height="260"/> </p>
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-templatesrepository 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
uvxrunner 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.
[!IMPORTANT] On MacOS, configure
uvpath in the extension settings ifuvisn't installed in the standard path.
Using uvx
- Configure supported clients automatically with
uvx --from crowdsec-local-mcp init <client>, where<client>is one ofclaude-desktop,claude-code,chatgpt,vscode, orstdio:
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.jsonin the Claude Desktop settings directoryclaude-code→ invokeclaude mcpcommand with needed argschatgpt→config.jsonin the ChatGPT Desktop settings directoryvscode→mcp.jsonfor 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。