crowdsec-local-mcp 0.1.0__py3-none-any.whl → 0.7.0.post1.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- crowdsec_local_mcp/__init__.py +6 -1
- crowdsec_local_mcp/__main__.py +1 -1
- crowdsec_local_mcp/_version.py +1 -0
- crowdsec_local_mcp/compose/scenario-test/.gitignore +1 -0
- crowdsec_local_mcp/compose/scenario-test/docker-compose.yml +19 -0
- crowdsec_local_mcp/compose/scenario-test/scenarios/.gitkeep +0 -0
- crowdsec_local_mcp/compose/waf-test/docker-compose.yml +5 -6
- crowdsec_local_mcp/compose/waf-test/nginx/Dockerfile +3 -2
- crowdsec_local_mcp/mcp_core.py +114 -19
- crowdsec_local_mcp/mcp_scenarios.py +579 -23
- crowdsec_local_mcp/mcp_waf.py +567 -337
- crowdsec_local_mcp/prompts/prompt-expr-helpers.txt +514 -0
- crowdsec_local_mcp/prompts/prompt-scenario-deploy.txt +70 -21
- crowdsec_local_mcp/prompts/prompt-scenario.txt +26 -2
- crowdsec_local_mcp/prompts/prompt-waf-tests.txt +101 -0
- crowdsec_local_mcp/prompts/prompt-waf-top-level.txt +31 -0
- crowdsec_local_mcp/prompts/prompt-waf.txt +0 -26
- crowdsec_local_mcp/setup_cli.py +375 -0
- crowdsec_local_mcp-0.7.0.post1.dev0.dist-info/METADATA +114 -0
- crowdsec_local_mcp-0.7.0.post1.dev0.dist-info/RECORD +38 -0
- {crowdsec_local_mcp-0.1.0.dist-info → crowdsec_local_mcp-0.7.0.post1.dev0.dist-info}/entry_points.txt +1 -0
- crowdsec_local_mcp-0.1.0.dist-info/METADATA +0 -93
- crowdsec_local_mcp-0.1.0.dist-info/RECORD +0 -30
- {crowdsec_local_mcp-0.1.0.dist-info → crowdsec_local_mcp-0.7.0.post1.dev0.dist-info}/WHEEL +0 -0
- {crowdsec_local_mcp-0.1.0.dist-info → crowdsec_local_mcp-0.7.0.post1.dev0.dist-info}/licenses/LICENSE +0 -0
- {crowdsec_local_mcp-0.1.0.dist-info → crowdsec_local_mcp-0.7.0.post1.dev0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
crowdsec_local_mcp/__init__.py,sha256=OrcWsdYsNOPPV4W05EsheZKz0kHcYMujo7pfRyHJ_9Q,236
|
|
2
|
+
crowdsec_local_mcp/__main__.py,sha256=Fb43e7FGfENpdWH-4Ojpz52uuT5_GCC8sInr82JOLz4,512
|
|
3
|
+
crowdsec_local_mcp/_version.py,sha256=bzPJ-8uI0Obt-8um4L_7J2QHbIScSRDiKYwX_L9IzAg,33
|
|
4
|
+
crowdsec_local_mcp/mcp_core.py,sha256=FAy5SCzuUPkXdDQhkU72f4XsQZDohIPqZ4f0bIFAriM,8278
|
|
5
|
+
crowdsec_local_mcp/mcp_scenarios.py,sha256=tWoo5N92hEhaOBmbfxccunoxcq1XmfS2ntYbfnlj6eY,37207
|
|
6
|
+
crowdsec_local_mcp/mcp_waf.py,sha256=wNp79a0LCgRCy0zPSnCLNKfaEXwBo8uPm2Bmkmpz5oY,53016
|
|
7
|
+
crowdsec_local_mcp/setup_cli.py,sha256=1RXhVtG3LgqknBkebzz1z6x_VAW51oDmYXTmQEqv6UY,11354
|
|
8
|
+
crowdsec_local_mcp/compose/scenario-test/.gitignore,sha256=hcFPKNf-CWOt-TmuTPZpafoUwaWxYNbJEEiOl9411fs,16
|
|
9
|
+
crowdsec_local_mcp/compose/scenario-test/docker-compose.yml,sha256=JEkCu9P-9Um3_IBw6xeZ8Tsj4jsdNK-Di-U9ktia1xw,580
|
|
10
|
+
crowdsec_local_mcp/compose/scenario-test/scenarios/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
crowdsec_local_mcp/compose/waf-test/.gitignore,sha256=BLMbJuVqzOfzHCa3Ru2nmNXaZdbj5P_hliIeIGgptAk,111
|
|
12
|
+
crowdsec_local_mcp/compose/waf-test/docker-compose.yml,sha256=MFMd-6F6e8c2Y54Y73aL46V6R90-gJIEiSjx_joCoCw,2124
|
|
13
|
+
crowdsec_local_mcp/compose/waf-test/crowdsec/init-bouncer.sh,sha256=vI8onvy5V2ENrjwKxTvptBNkTlVhR7S2bK33lekIwWM,578
|
|
14
|
+
crowdsec_local_mcp/compose/waf-test/crowdsec/acquis.d/appsec.yaml,sha256=qg1xZmcDUSaUfX4SCaT7CcCilMWpz91fyvVGl1LUTTA,189
|
|
15
|
+
crowdsec_local_mcp/compose/waf-test/crowdsec/appsec-configs/mcp-appsec.yaml.template,sha256=9PoFbUJ6IJep7vVZ6UPs4-MDOSL320U0x4a5mB2tvp0,330
|
|
16
|
+
crowdsec_local_mcp/compose/waf-test/nginx/Dockerfile,sha256=NpwUJFRZ0JropRCD1nfLCifM15KbzddYPH0QAwZ00Dc,1876
|
|
17
|
+
crowdsec_local_mcp/compose/waf-test/nginx/nginx.conf,sha256=mZpWFNQK9haOj8Fd-ab4GpC4Li3m0qUJLIpg5StL3pU,472
|
|
18
|
+
crowdsec_local_mcp/compose/waf-test/nginx/crowdsec/crowdsec-openresty-bouncer.conf,sha256=s_53rJk5qcSUG1XuHAh4XRUU84xw_tEcJWOYON6JsdU,630
|
|
19
|
+
crowdsec_local_mcp/compose/waf-test/nginx/site-enabled/default-site.conf,sha256=Rq4_jPkTkEL50YF4pNq2jwTjJmokgniQzKy7Y3ca964,357
|
|
20
|
+
crowdsec_local_mcp/compose/waf-test/rules/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
crowdsec_local_mcp/compose/waf-test/rules/base-config.yaml,sha256=Xvk_SxmgKPJBWvr1cN9NIKX2A4-pTMmQo4dmIwPC7yA,1066
|
|
22
|
+
crowdsec_local_mcp/prompts/prompt-expr-helpers.txt,sha256=o6g1-fth5XP0KCDtKc85c6Cb4m2bbDvO-oNqCt5_SlA,16613
|
|
23
|
+
crowdsec_local_mcp/prompts/prompt-scenario-deploy.txt,sha256=re2lJiLzvkdlFJBmV57Lhm2zrqFeGnC6oMUtNS0Rq50,2378
|
|
24
|
+
crowdsec_local_mcp/prompts/prompt-scenario-examples.txt,sha256=H-LdAyhhjWBysquIaL90oKGNdZ20L_PqhqJVuCZL6vw,7484
|
|
25
|
+
crowdsec_local_mcp/prompts/prompt-scenario.txt,sha256=XIrgc0Hw0UAwEIuSRkWzZ9BI3qUjZsaZ-zXs_cBWwpM,7059
|
|
26
|
+
crowdsec_local_mcp/prompts/prompt-waf-deploy.txt,sha256=xFotKHMZiSVYZpjC-PItf1Ee0l3PVpof7917bybZtQg,3247
|
|
27
|
+
crowdsec_local_mcp/prompts/prompt-waf-examples.txt,sha256=e76mjm-wQa_clk61_7E6AsRgdt55m3MycY0lBkfL2Mc,11095
|
|
28
|
+
crowdsec_local_mcp/prompts/prompt-waf-tests.txt,sha256=GQySDxFuJ1swJyJxhXTE9pGuAnTpXsutpq2Jdrlx75s,4036
|
|
29
|
+
crowdsec_local_mcp/prompts/prompt-waf-top-level.txt,sha256=zmMOLSLwP-SkhhekW7UsbC77V7OQILIj8nHdudip2p4,2508
|
|
30
|
+
crowdsec_local_mcp/prompts/prompt-waf.txt,sha256=VxTc7QM3yYtZoj5nYUMAIQJHyeniPstU-cPrHdyq7bs,10920
|
|
31
|
+
crowdsec_local_mcp/yaml-schemas/appsec_rules_schema.yaml,sha256=zXu-ikNT-bZNGWdOi5hOqZjpjM_dOnKIdMTtwng8lOM,10639
|
|
32
|
+
crowdsec_local_mcp/yaml-schemas/scenario_schema.yaml,sha256=k0NYxyOUicmMip3Req3zE2CM7tyy8ARcxHlYkSSXbSI,24078
|
|
33
|
+
crowdsec_local_mcp-0.7.0.post1.dev0.dist-info/licenses/LICENSE,sha256=3UN9Hca_TnpUOAecGoPKh1fjI5Ol-rSoP8epbBuERE4,1065
|
|
34
|
+
crowdsec_local_mcp-0.7.0.post1.dev0.dist-info/METADATA,sha256=5HGKvrLmMM4J30bjrjGGkOlLB_eDlpRjJR9fSkkgQ8E,5234
|
|
35
|
+
crowdsec_local_mcp-0.7.0.post1.dev0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
36
|
+
crowdsec_local_mcp-0.7.0.post1.dev0.dist-info/entry_points.txt,sha256=EFTrsplHoT4x-GRrip0jxSQmH7NKBb5w5nX0PphGxTY,106
|
|
37
|
+
crowdsec_local_mcp-0.7.0.post1.dev0.dist-info/top_level.txt,sha256=MC0OAZ7qK5gG78swUkedPT3pfekze1NL5cO90s90CYM,19
|
|
38
|
+
crowdsec_local_mcp-0.7.0.post1.dev0.dist-info/RECORD,,
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: crowdsec-local-mcp
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: An MCP exposing prompts and tools to help users write WAF rules, scenarios etc.
|
|
5
|
-
Requires-Python: >=3.12
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Requires-Dist: jsonschema>=4.25.1
|
|
9
|
-
Requires-Dist: mcp>=1.15.0
|
|
10
|
-
Requires-Dist: pyyaml>=6.0.3
|
|
11
|
-
Requires-Dist: requests>=2.32.5
|
|
12
|
-
Dynamic: license-file
|
|
13
|
-
|
|
14
|
-
<p align="center">
|
|
15
|
-
<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"/>
|
|
16
|
-
</p>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**Life is too short to write YAML, just ask nicely!**
|
|
20
|
-
|
|
21
|
-
> A Model Context Protocol (MCP) server to generate, validate, and deploy CrowdSec WAF rules & Scenarios.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Features
|
|
25
|
-
|
|
26
|
-
### WAF Rules Features
|
|
27
|
-
|
|
28
|
-
- **WAF Rule Generation**: Generate CrowdSec WAF rules from user input or a CVE reference
|
|
29
|
-
- **Validation**: Validate syntaxical correctness of WAF rules
|
|
30
|
-
- **Linting**: Get warnings and hints to improve your WAF rules
|
|
31
|
-
- **Deployment Guide**: Step-by-step deployment instructions
|
|
32
|
-
- **Docker Test Harness**: Spin up CrowdSec + nginx + bouncer to exercise rules for false positives/negatives
|
|
33
|
-
- **Nuclei Lookup**: Quickly jump to existing templates in the official `projectdiscovery/nuclei-templates` repository for a given CVE
|
|
34
|
-
|
|
35
|
-
### Scenarios Features
|
|
36
|
-
|
|
37
|
-
- **CrowdSec Scenarios Generation**: Generate CrowdSec scenarios
|
|
38
|
-
- **Validation**: Validate syntaxical correctness of scenarios
|
|
39
|
-
- **Linting**: Get warnings and hints to improve your scenarios
|
|
40
|
-
- **Deployment Guide**: Step-by-step deployment instructions
|
|
41
|
-
- **Docker Test Harness**: Spin up CrowdSec to test scenario behavior
|
|
42
|
-
|
|
43
|
-
## Demo
|
|
44
|
-
|
|
45
|
-
### WAF Rules Creation and testing
|
|
46
|
-
|
|
47
|
-
- [Rule creation from natural language with Claude Desktop](https://claude.ai/share/f0f246b2-6b20-4d70-a16c-c6b627ab2d80)
|
|
48
|
-
- [Rule creation from CVE reference](https://claude.ai/share/b6599407-82dd-443c-a12d-9a9825ed99df)
|
|
49
|
-
|
|
50
|
-
### Scenario Creation and testing
|
|
51
|
-
|
|
52
|
-
- XX
|
|
53
|
-
- XX
|
|
54
|
-
|
|
55
|
-
## Installation
|
|
56
|
-
|
|
57
|
-
### Setup
|
|
58
|
-
|
|
59
|
-
Install dependencies using `uv`:
|
|
60
|
-
```bash
|
|
61
|
-
uv sync
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Configuration for Claude Desktop
|
|
65
|
-
|
|
66
|
-
### macOS/Linux
|
|
67
|
-
|
|
68
|
-
1. Find your Claude Desktop config file:
|
|
69
|
-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
70
|
-
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
71
|
-
|
|
72
|
-
2. Add the MCP server configuration:
|
|
73
|
-
```json
|
|
74
|
-
{
|
|
75
|
-
"mcpServers": {
|
|
76
|
-
"crowdsec-prompt-server": {
|
|
77
|
-
"command": "/path/to/crowdsec-mcp-rule-helper/.venv/bin/python",
|
|
78
|
-
"args": [
|
|
79
|
-
"/path/to/crowdsec-mcp-rule-helper/mcp-prompt.py"
|
|
80
|
-
],
|
|
81
|
-
"cwd": "/path/to/crowdsec-mcp-rule-helper"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**Important**: Replace `/path/to/crowdsec-mcp-rule-helper` with the actual absolute path to your cloned repository.
|
|
88
|
-
|
|
89
|
-
## Pre Requisites
|
|
90
|
-
|
|
91
|
-
- Docker + Docker Compose
|
|
92
|
-
|
|
93
|
-
- Python
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
crowdsec_local_mcp/__init__.py,sha256=Ux30Xj13RP4H1xuTKmrzg9xIVu9CEuF0f2Kh3QxNNyE,76
|
|
2
|
-
crowdsec_local_mcp/__main__.py,sha256=rMW9ANz3H1C8gpDK8HZ56-nJb7YmdO_9AyW-P7uChu0,454
|
|
3
|
-
crowdsec_local_mcp/mcp_core.py,sha256=kHoLu2pBXc40hSJzIHTOvErZw8wl1tTp33Xcma_6mVI,4826
|
|
4
|
-
crowdsec_local_mcp/mcp_scenarios.py,sha256=3c5075THWv8gwwVz1cFED7ShDvcULheaVnf5BzhcJKI,13386
|
|
5
|
-
crowdsec_local_mcp/mcp_waf.py,sha256=yJIvuh3RhmIiV08RcWSSCaEfUDtpuaZVtcsJGfDIP38,43127
|
|
6
|
-
crowdsec_local_mcp/compose/waf-test/.gitignore,sha256=BLMbJuVqzOfzHCa3Ru2nmNXaZdbj5P_hliIeIGgptAk,111
|
|
7
|
-
crowdsec_local_mcp/compose/waf-test/docker-compose.yml,sha256=wrXI-G_Cjk7AtT8oQXCgPF20uIIRZgoI3S6Dpbe1fBo,2187
|
|
8
|
-
crowdsec_local_mcp/compose/waf-test/crowdsec/init-bouncer.sh,sha256=vI8onvy5V2ENrjwKxTvptBNkTlVhR7S2bK33lekIwWM,578
|
|
9
|
-
crowdsec_local_mcp/compose/waf-test/crowdsec/acquis.d/appsec.yaml,sha256=qg1xZmcDUSaUfX4SCaT7CcCilMWpz91fyvVGl1LUTTA,189
|
|
10
|
-
crowdsec_local_mcp/compose/waf-test/crowdsec/appsec-configs/mcp-appsec.yaml.template,sha256=9PoFbUJ6IJep7vVZ6UPs4-MDOSL320U0x4a5mB2tvp0,330
|
|
11
|
-
crowdsec_local_mcp/compose/waf-test/nginx/Dockerfile,sha256=s8rlWq7zPPmodVqeeTcA0qw5E_gjUHcR28nMP573jNs,1600
|
|
12
|
-
crowdsec_local_mcp/compose/waf-test/nginx/nginx.conf,sha256=mZpWFNQK9haOj8Fd-ab4GpC4Li3m0qUJLIpg5StL3pU,472
|
|
13
|
-
crowdsec_local_mcp/compose/waf-test/nginx/crowdsec/crowdsec-openresty-bouncer.conf,sha256=s_53rJk5qcSUG1XuHAh4XRUU84xw_tEcJWOYON6JsdU,630
|
|
14
|
-
crowdsec_local_mcp/compose/waf-test/nginx/site-enabled/default-site.conf,sha256=Rq4_jPkTkEL50YF4pNq2jwTjJmokgniQzKy7Y3ca964,357
|
|
15
|
-
crowdsec_local_mcp/compose/waf-test/rules/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
crowdsec_local_mcp/compose/waf-test/rules/base-config.yaml,sha256=Xvk_SxmgKPJBWvr1cN9NIKX2A4-pTMmQo4dmIwPC7yA,1066
|
|
17
|
-
crowdsec_local_mcp/prompts/prompt-scenario-deploy.txt,sha256=0pobbQ_N8AdpRsaxOK91zkUWlnakeuwBgRLVB4eg17U,1463
|
|
18
|
-
crowdsec_local_mcp/prompts/prompt-scenario-examples.txt,sha256=H-LdAyhhjWBysquIaL90oKGNdZ20L_PqhqJVuCZL6vw,7484
|
|
19
|
-
crowdsec_local_mcp/prompts/prompt-scenario.txt,sha256=qJkADI2YgBbIEEL2z4B09jV1665fcJrM9ClyQnIYA4o,5514
|
|
20
|
-
crowdsec_local_mcp/prompts/prompt-waf-deploy.txt,sha256=xFotKHMZiSVYZpjC-PItf1Ee0l3PVpof7917bybZtQg,3247
|
|
21
|
-
crowdsec_local_mcp/prompts/prompt-waf-examples.txt,sha256=e76mjm-wQa_clk61_7E6AsRgdt55m3MycY0lBkfL2Mc,11095
|
|
22
|
-
crowdsec_local_mcp/prompts/prompt-waf.txt,sha256=gZaYfzXWkS7NnAbR_xvWAFKHa2c_qpkFVAkKBE5-CSA,12426
|
|
23
|
-
crowdsec_local_mcp/yaml-schemas/appsec_rules_schema.yaml,sha256=zXu-ikNT-bZNGWdOi5hOqZjpjM_dOnKIdMTtwng8lOM,10639
|
|
24
|
-
crowdsec_local_mcp/yaml-schemas/scenario_schema.yaml,sha256=k0NYxyOUicmMip3Req3zE2CM7tyy8ARcxHlYkSSXbSI,24078
|
|
25
|
-
crowdsec_local_mcp-0.1.0.dist-info/licenses/LICENSE,sha256=3UN9Hca_TnpUOAecGoPKh1fjI5Ol-rSoP8epbBuERE4,1065
|
|
26
|
-
crowdsec_local_mcp-0.1.0.dist-info/METADATA,sha256=KbQnfzLN_FQ84dfRg1n-GtpTud6Q6ShrZlwkboFi0zc,2772
|
|
27
|
-
crowdsec_local_mcp-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
28
|
-
crowdsec_local_mcp-0.1.0.dist-info/entry_points.txt,sha256=CQZ_MiGOe7dJBNDo8tNBiYg6B1eRtC_h1qXtBietr5c,65
|
|
29
|
-
crowdsec_local_mcp-0.1.0.dist-info/top_level.txt,sha256=MC0OAZ7qK5gG78swUkedPT3pfekze1NL5cO90s90CYM,19
|
|
30
|
-
crowdsec_local_mcp-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{crowdsec_local_mcp-0.1.0.dist-info → crowdsec_local_mcp-0.7.0.post1.dev0.dist-info}/top_level.txt
RENAMED
|
File without changes
|