crowdsec-local-mcp 0.2.0__py3-none-any.whl → 0.8.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.
Files changed (27) hide show
  1. crowdsec_local_mcp/__init__.py +6 -1
  2. crowdsec_local_mcp/__main__.py +1 -3
  3. crowdsec_local_mcp/_version.py +1 -0
  4. crowdsec_local_mcp/compose/scenario-test/.gitignore +1 -0
  5. crowdsec_local_mcp/compose/scenario-test/docker-compose.yml +19 -0
  6. crowdsec_local_mcp/compose/scenario-test/scenarios/.gitkeep +0 -0
  7. crowdsec_local_mcp/compose/waf-test/docker-compose.yml +5 -6
  8. crowdsec_local_mcp/compose/waf-test/nginx/Dockerfile +8 -2
  9. crowdsec_local_mcp/mcp_core.py +112 -18
  10. crowdsec_local_mcp/mcp_scenarios.py +579 -23
  11. crowdsec_local_mcp/mcp_waf.py +774 -402
  12. crowdsec_local_mcp/prompts/prompt-expr-helpers.txt +514 -0
  13. crowdsec_local_mcp/prompts/prompt-scenario-deploy.txt +70 -21
  14. crowdsec_local_mcp/prompts/prompt-scenario.txt +26 -2
  15. crowdsec_local_mcp/prompts/prompt-waf-pr.txt +10 -0
  16. crowdsec_local_mcp/prompts/prompt-waf-tests.txt +113 -0
  17. crowdsec_local_mcp/prompts/prompt-waf-top-level.txt +33 -0
  18. crowdsec_local_mcp/prompts/prompt-waf.txt +0 -26
  19. crowdsec_local_mcp/setup_cli.py +98 -29
  20. crowdsec_local_mcp-0.8.0.post1.dev0.dist-info/METADATA +114 -0
  21. crowdsec_local_mcp-0.8.0.post1.dev0.dist-info/RECORD +39 -0
  22. {crowdsec_local_mcp-0.2.0.dist-info → crowdsec_local_mcp-0.8.0.post1.dev0.dist-info}/WHEEL +1 -1
  23. crowdsec_local_mcp-0.2.0.dist-info/METADATA +0 -74
  24. crowdsec_local_mcp-0.2.0.dist-info/RECORD +0 -31
  25. {crowdsec_local_mcp-0.2.0.dist-info → crowdsec_local_mcp-0.8.0.post1.dev0.dist-info}/entry_points.txt +0 -0
  26. {crowdsec_local_mcp-0.2.0.dist-info → crowdsec_local_mcp-0.8.0.post1.dev0.dist-info}/licenses/LICENSE +0 -0
  27. {crowdsec_local_mcp-0.2.0.dist-info → crowdsec_local_mcp-0.8.0.post1.dev0.dist-info}/top_level.txt +0 -0
@@ -1,74 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: crowdsec-local-mcp
3
- Version: 0.2.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
- ### Quick MCP client setup
58
-
59
- - Configure supported clients automatically with `uvx run --from crowdsec-local-mcp init <client>`, where `<client>` is one of `claude-desktop`, `chatgpt`, `vscode`, or `stdio`:
60
-
61
- ```bash
62
- uvx --from crowdsec-local-mcp init
63
- ```
64
-
65
- ## Logging
66
-
67
- - 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`.
68
-
69
- ## Pre Requisites
70
-
71
- - Docker + Docker Compose
72
-
73
- - Python >= 3.12
74
-
@@ -1,31 +0,0 @@
1
- crowdsec_local_mcp/__init__.py,sha256=Ux30Xj13RP4H1xuTKmrzg9xIVu9CEuF0f2Kh3QxNNyE,76
2
- crowdsec_local_mcp/__main__.py,sha256=5aKZR3rKmRvUTF4hRKsxkmAXFMUVWOYWKmx3BDb_3C8,533
3
- crowdsec_local_mcp/mcp_core.py,sha256=jWGUF1kNkcH4sLS2xr3M7tuOTPUwg4nCXfNw502xPJk,4859
4
- crowdsec_local_mcp/mcp_scenarios.py,sha256=3c5075THWv8gwwVz1cFED7ShDvcULheaVnf5BzhcJKI,13386
5
- crowdsec_local_mcp/mcp_waf.py,sha256=yJIvuh3RhmIiV08RcWSSCaEfUDtpuaZVtcsJGfDIP38,43127
6
- crowdsec_local_mcp/setup_cli.py,sha256=ACIntCBwQSJdfYlqibg4Rsp62LxG8StEAg9C2fML5wg,9386
7
- crowdsec_local_mcp/compose/waf-test/.gitignore,sha256=BLMbJuVqzOfzHCa3Ru2nmNXaZdbj5P_hliIeIGgptAk,111
8
- crowdsec_local_mcp/compose/waf-test/docker-compose.yml,sha256=wrXI-G_Cjk7AtT8oQXCgPF20uIIRZgoI3S6Dpbe1fBo,2187
9
- crowdsec_local_mcp/compose/waf-test/crowdsec/init-bouncer.sh,sha256=vI8onvy5V2ENrjwKxTvptBNkTlVhR7S2bK33lekIwWM,578
10
- crowdsec_local_mcp/compose/waf-test/crowdsec/acquis.d/appsec.yaml,sha256=qg1xZmcDUSaUfX4SCaT7CcCilMWpz91fyvVGl1LUTTA,189
11
- crowdsec_local_mcp/compose/waf-test/crowdsec/appsec-configs/mcp-appsec.yaml.template,sha256=9PoFbUJ6IJep7vVZ6UPs4-MDOSL320U0x4a5mB2tvp0,330
12
- crowdsec_local_mcp/compose/waf-test/nginx/Dockerfile,sha256=s8rlWq7zPPmodVqeeTcA0qw5E_gjUHcR28nMP573jNs,1600
13
- crowdsec_local_mcp/compose/waf-test/nginx/nginx.conf,sha256=mZpWFNQK9haOj8Fd-ab4GpC4Li3m0qUJLIpg5StL3pU,472
14
- crowdsec_local_mcp/compose/waf-test/nginx/crowdsec/crowdsec-openresty-bouncer.conf,sha256=s_53rJk5qcSUG1XuHAh4XRUU84xw_tEcJWOYON6JsdU,630
15
- crowdsec_local_mcp/compose/waf-test/nginx/site-enabled/default-site.conf,sha256=Rq4_jPkTkEL50YF4pNq2jwTjJmokgniQzKy7Y3ca964,357
16
- crowdsec_local_mcp/compose/waf-test/rules/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- crowdsec_local_mcp/compose/waf-test/rules/base-config.yaml,sha256=Xvk_SxmgKPJBWvr1cN9NIKX2A4-pTMmQo4dmIwPC7yA,1066
18
- crowdsec_local_mcp/prompts/prompt-scenario-deploy.txt,sha256=0pobbQ_N8AdpRsaxOK91zkUWlnakeuwBgRLVB4eg17U,1463
19
- crowdsec_local_mcp/prompts/prompt-scenario-examples.txt,sha256=H-LdAyhhjWBysquIaL90oKGNdZ20L_PqhqJVuCZL6vw,7484
20
- crowdsec_local_mcp/prompts/prompt-scenario.txt,sha256=qJkADI2YgBbIEEL2z4B09jV1665fcJrM9ClyQnIYA4o,5514
21
- crowdsec_local_mcp/prompts/prompt-waf-deploy.txt,sha256=xFotKHMZiSVYZpjC-PItf1Ee0l3PVpof7917bybZtQg,3247
22
- crowdsec_local_mcp/prompts/prompt-waf-examples.txt,sha256=e76mjm-wQa_clk61_7E6AsRgdt55m3MycY0lBkfL2Mc,11095
23
- crowdsec_local_mcp/prompts/prompt-waf.txt,sha256=gZaYfzXWkS7NnAbR_xvWAFKHa2c_qpkFVAkKBE5-CSA,12426
24
- crowdsec_local_mcp/yaml-schemas/appsec_rules_schema.yaml,sha256=zXu-ikNT-bZNGWdOi5hOqZjpjM_dOnKIdMTtwng8lOM,10639
25
- crowdsec_local_mcp/yaml-schemas/scenario_schema.yaml,sha256=k0NYxyOUicmMip3Req3zE2CM7tyy8ARcxHlYkSSXbSI,24078
26
- crowdsec_local_mcp-0.2.0.dist-info/licenses/LICENSE,sha256=3UN9Hca_TnpUOAecGoPKh1fjI5Ol-rSoP8epbBuERE4,1065
27
- crowdsec_local_mcp-0.2.0.dist-info/METADATA,sha256=lET-8T1leZ6gLFAnHSuwNU8_wQhx0ck84IxRKesanVQ,2515
28
- crowdsec_local_mcp-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
29
- crowdsec_local_mcp-0.2.0.dist-info/entry_points.txt,sha256=EFTrsplHoT4x-GRrip0jxSQmH7NKBb5w5nX0PphGxTY,106
30
- crowdsec_local_mcp-0.2.0.dist-info/top_level.txt,sha256=MC0OAZ7qK5gG78swUkedPT3pfekze1NL5cO90s90CYM,19
31
- crowdsec_local_mcp-0.2.0.dist-info/RECORD,,