{"id":40953631,"url":"https://github.com/gen0sec/mcp-server","last_synced_at":"2026-01-22T05:17:48.700Z","repository":{"id":328240274,"uuid":"1113796102","full_name":"gen0sec/mcp-server","owner":"gen0sec","description":"Generate WAF rules and exposing multiple scenarios","archived":false,"fork":false,"pushed_at":"2025-12-12T21:13:28.000Z","size":223,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-13T02:20:52.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gen0sec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-10T13:29:20.000Z","updated_at":"2025-12-12T21:13:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gen0sec/mcp-server","commit_stats":null,"previous_names":["gen0sec/mcp-server"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gen0sec/mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen0sec%2Fmcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen0sec%2Fmcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen0sec%2Fmcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen0sec%2Fmcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gen0sec","download_url":"https://codeload.github.com/gen0sec/mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen0sec%2Fmcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28655593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-22T05:17:48.065Z","updated_at":"2026-01-22T05:17:48.691Z","avatar_url":"https://github.com/gen0sec.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gen0Sec WAF Rule Generation MCP Server\n\nThis service provides a WAF rule generation MCP Server. The server provides testing tools for Wirefilter WAF rules and additional context for helping th LLM generate correct rules.\n\n## Features\n\n#### Server features\n\n- Downloads and periodically updates Wirefilter WAF information and CVE explot template repository\n- Uses external WAF validation API for validating and testing WAF expressions\n- Provides configuration from YAML file\n- Provides tools and resources through MCP for agentic LLMs\n\n#### MCP features\n\n- Tools:\n  - `fetch_cve_vulnerability_template` - Fetch an exploit template for a specific CVE identifier\n  - `validate_waf_expression` - Validate a WAF expression\n  - `validate_waf_expression_with_tests` - Validate a WAF expression and test it against mock data\n  - `get_waf_context` - Fetch all Wirefilter WAF context information\n- Resources\n  - `wafcontext://actions` - Reference on actions available in the Rules language.\n  - `wafcontext://expressions` - Reference on expressions available in the Rules language.\n  - `wafcontext://fields` - Reference on fields available in the Rules language.\n  - `wafcontext://fundtions` - Reference on fundtions available in the Rules language.\n  - `wafcontext://operators` - Reference on operators available in the Rules language.\n  - `wafcontext://values` - Reference on values available in the Rules language.\n- Prompts:\n  - `natural_waf_rule_generation_prompt` - Provides prompt for helping rule generation from natural language description\n  - `cve_waf_rule_generation_prompt` - Provides prompt for helping rule generation from a CVE identifier\n\n## Setup\n\n### Local setup for Claude Desktop\n\n#### Prerequisites\n\n- `uv`\n  - Needed for running the server through Claude Desktop.\n  - Installation: `curl -LsSf https://astral.sh/uv/install.sh | sh`\n  - Installation (with brew): `brew install uv`\n- `mcpb`\n  - Needed for easy Claude Desktop integration.\n  - Installation: `npm install -g @anthropic-ai/mcpb`\n- `git`\n  - Needed to pull repository for CVE templates.\n  - Installation (with brew): `brew install git`\n\n#### Other services\n\nThe WAF rule validation API needs to be running for WAF rule validation to work.\nThe URL for this can be given in the Claude Desktop configuration.\n\n#### Setup\n\n1. Run the `mcpb pack` command in the root folder. This will create a `gen0sec-mcp-server.mcpb` file.\n2. Opening the generated file will allow the installation of it on Caldue Desktop.\n3. Setting up takes a minute but after that the tools and resources are available to use in Claude Desktop.\n\n### Cursor IDE Integration\n\n#### Prerequisites\n\n- `uv` (for local stdio setup)\n  - Installation: `curl -LsSf https://astral.sh/uv/install.sh | sh`\n  - Installation (with brew): `brew install uv`\n- `git` (needed to pull repository for CVE templates)\n  - Installation (with brew): `brew install git`\n\n#### Option 1: Local Setup (stdio)\n\n1. Create or edit the MCP configuration file:\n   - **macOS/Linux:** `~/.cursor/mcp.json`\n   - **Windows:** `%USERPROFILE%\\.cursor\\mcp.json`\n\n2. Add the following configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"waf-rule-mcp\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"run\",\n        \"--project\",\n        \"/absolute/path/to/mcp-server\",\n        \"/absolute/path/to/mcp-server/server/main.py\"\n      ],\n      \"env\": {\n        \"WAF_VALIDATION_API_URL\": \"https://public.gen0sec.com/v1/waf/validate\"\n      }\n    }\n  }\n}\n```\n\n**Notes:**\n- Replace `/absolute/path/to/mcp-server` with the absolute path to your project directory\n- The `WAF_VALIDATION_API_URL` environment variable is optional - if not set, it will use the value from `server/config.yaml`\n\n3. Restart Cursor IDE to apply the changes.\n\n#### Option 2: Docker Setup (HTTP)\n\n1. Build and run the Docker container:\n   ```bash\n   docker build -t waf-rule-mcp .\n   docker run -p 8000:8000 waf-rule-mcp\n   ```\n\n2. Create or edit the MCP configuration file:\n   - **macOS/Linux:** `~/.cursor/mcp.json`\n   - **Windows:** `%USERPROFILE%\\.cursor\\mcp.json`\n\n3. Add the following configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"waf-rule-mcp\": {\n      \"url\": \"http://localhost:8000\"\n    }\n  }\n}\n```\n\n4. Restart Cursor IDE to apply the changes.\n\n### Dockerfile\n\n1. Build the Docker Image from the project root: `docker build -t waf-rule-mcp .`\n2. Run the Container `docker run -p 8000:8000 waf-rule-mcp`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgen0sec%2Fmcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgen0sec%2Fmcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgen0sec%2Fmcp-server/lists"}