Skip to content

Commit b648d9a

Browse files
authored
Merge branch 'master' into todo-check-class
2 parents 120f788 + 5b03659 commit b648d9a

File tree

39 files changed

+5014
-961
lines changed

39 files changed

+5014
-961
lines changed

mcp_server/.gitignore

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.nox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
*.py,cover
48+
.hypothesis/
49+
.pytest_cache/
50+
cover/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
db.sqlite3
60+
db.sqlite3-journal
61+
62+
# Flask stuff:
63+
instance/
64+
.webassets-cache
65+
66+
# Scrapy stuff:
67+
.scrapy
68+
69+
# Sphinx documentation
70+
docs/_build/
71+
72+
# PyBuilder
73+
.pybuilder/
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# IPython
80+
profile_default/
81+
ipython_config.py
82+
83+
# pyenv
84+
.python-version
85+
86+
# pipenv
87+
Pipfile.lock
88+
89+
# poetry
90+
poetry.lock
91+
92+
# pdm
93+
.pdm.toml
94+
.pdm-python
95+
pdm.lock
96+
97+
# PEP 582
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
136+
137+
# Cython debug symbols
138+
cython_debug/
139+
140+
# PyCharm
141+
.idea/
142+
143+
# VS Code
144+
.vscode/
145+
.cursor/
146+
147+
# macOS
148+
.DS_Store
149+
150+
# uv
151+
uv.lock

mcp_server/README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Prowler MCP Server
2+
3+
Access the entire Prowler ecosystem through the Model Context Protocol (MCP), the supported capabilities right now are:
4+
5+
- Prowler Hub for checking the current covering in checks, fixers and compliance frameworks in Prowler.
6+
7+
## Requirements
8+
9+
- Python 3.12+
10+
- Network access to `https://hub.prowler.com`
11+
12+
## Installation
13+
14+
### From Sources
15+
16+
It is needed to have [uv](https://docs.astral.sh/uv/) installed.
17+
18+
```bash
19+
git clone https://github.com/prowler-cloud/prowler.git
20+
```
21+
22+
## Running
23+
24+
After installation, start the MCP server via the console script:
25+
26+
```bash
27+
cd prowler/mcp_server
28+
uv run prowler-mcp
29+
```
30+
31+
Alternatively, you can run from wherever you want using `uvx` command:
32+
33+
```bash
34+
uvx /path/to/prowler/mcp_server/
35+
```
36+
37+
## Available Tools
38+
39+
### Prowler Hub
40+
41+
All tools are exposed under the `prowler_hub` prefix.
42+
43+
- prowler_hub_get_check_filters: Return available filter values for checks (providers, services, severities, categories, compliances). Call this before `prowler_hub_get_checks` to build valid queries.
44+
- prowler_hub_get_checks: List checks with option of advanced filtering.
45+
- prowler_hub_search_checks: Full‑text search across check metadata.
46+
- prowler_hub_get_compliance_frameworks: List/filter compliance frameworks.
47+
- prowler_hub_search_compliance_frameworks: Full-text search across frameworks.
48+
- prowler_hub_list_providers: List Prowler official providers and their services.
49+
- prowler_hub_get_artifacts_count: Return total artifact count (checks + frameworks).
50+
51+
## MCP Client Configuration
52+
53+
Configure your MCP client to launch the server with the `uvx` command. Below is a generic snippet; consult your client's documentation for exact locations.
54+
55+
```json
56+
{
57+
"mcpServers": {
58+
"prowler": {
59+
"command": "uvx",
60+
"args": ["/path/to/prowler/mcp_server/"]
61+
}
62+
}
63+
}
64+
```
65+
66+
### Claude Desktop (macOS/Windows)
67+
68+
Add the server to Claude Desktop’s config file, then restart the app.
69+
70+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
71+
- Windows: `%AppData%\Claude\claude_desktop_config.json` (e.g. `C:\\Users\\<you>\\AppData\\Roaming\\Claude\\claude_desktop_config.json`)
72+
73+
Example content to append/merge:
74+
75+
```json
76+
{
77+
"mcpServers": {
78+
"prowler": {
79+
"command": "uvx",
80+
"args": ["/path/to/prowler/mcp_server/"]
81+
}
82+
}
83+
}
84+
```
85+
86+
## License
87+
88+
This project follows the repository’s main license. See the [LICENSE](../LICENSE) file at the repository root.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
Prowler MCP - Model Context Protocol server for Prowler ecosystem
3+
4+
This package provides MCP tools for accessing:
5+
- Prowler Hub: All security artifacts (detections, remediations and frameworks) supported by Prowler
6+
"""
7+
8+
__version__ = "0.1.0"
9+
__author__ = "Prowler Team"
10+
__email__ = "[email protected]"
11+
12+
__all__ = ["__version__", "prowler_mcp_server"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import asyncio
2+
import sys
3+
from prowler_mcp_server.server import setup_main_server, prowler_mcp_server
4+
5+
6+
def main():
7+
"""Main entry point for the MCP server."""
8+
try:
9+
asyncio.run(setup_main_server())
10+
prowler_mcp_server.run()
11+
except KeyboardInterrupt:
12+
print("\nShutting down Prowler MCP server...")
13+
sys.exit(0)
14+
except Exception as e:
15+
print(f"Error: {e}", file=sys.stderr)
16+
sys.exit(1)
17+
18+
19+
if __name__ == "__main__":
20+
main()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""Prowler Hub module for MCP server."""
2+
3+
__all__ = ["prowler_hub_mcp"]

0 commit comments

Comments
 (0)