GreenboneMCP

GreenboneMCP

An MCP server connecting AI clients to Greenbone/OpenVAS for vulnerability scanning workflows, enabling scan creation, monitoring, report retrieval, and delta comparisons.

Category
访问服务器

README

GreenboneMCP

An MCP (Model Context Protocol) server that connects AI clients to Greenbone/OpenVAS through GMP (python-gvm).

What this project is

GreenboneMCP exposes MCP tools for scan/report workflows in Greenbone/OpenVAS, so an assistant can:

  • create and launch scans,
  • monitor scan progress,
  • stop scans,
  • fetch reports,
  • compare report deltas between runs.

The server runs on stdio transport and talks to gvmd through a Unix socket.

Project status

This project is part of my Master's thesis and is currently a Proof of Concept (PoC).

It may be developed further only if there is clear community/user interest.

Contributions are welcome: feel free to open Issues and submit Pull Requests. (See the Contributing section below.)

Tooling exposed by the server

Scan workflow tools

These are always registered:

  • start_scan
  • scan_status
  • fetch_latest_report
  • restart_scan
  • delta_report

Inspection / control tools

These are always registered:

  • get_targets
  • get_target
  • get_tasks
  • get_port_lists
  • start_task
  • stop_task

Project Structure

src/
├── main.py                     # App entrypoint (stdio MCP server)
├── constants.py                # Default UUIDs and report format constants
├── config/
│   ├── gvm_client_config.py    # Env-based GVM client settings (USERNAME, PASSWORD, ...)
│   └── logging_config.py       # Logging configuration settings
├── core/
│   └── mcp_server.py           # MCP wiring, GVM connection, tool registration
├── services/
│   └── gvm_client.py           # Typed wrapper around python-gvm + XML parsing
├── tools/
│   ├── vm_workflow_tools.py      # VM workflow orchestration tools
│   ├── inspection_control_tools.py # Inspection/control tools for existing scan state
│   └── utils/
│       ├── constants.py            # Tool-scoped constants (scanner/config/port list IDs, formats)
│       └── helpers.py              # Internal parsing/formatting helpers for tool outputs
└── models/
    └── generated/             # Auto-generated dataclasses (xsdata output)

Requirements

  • Docker Engine + Docker Compose plugin
  • A Greenbone/OpenVAS instance with a reachable gvmd Unix socket
  • Valid GMP credentials

Installation

Compatibility

This server has been tested only with Greenbone/OpenVAS deployed via containers, particularly Greenbone Community Edition with the official container setup: https://greenbone.github.io/docs/latest/22.4/container/

Prerequisites

Ensure the official Greenbone Community Edition container setup is running by executing the following command in the directory where you have the docker-compose.yml for Greenbone:

docker compose -f <path-to-greenbone-compose>/docker-compose.yml up -d

Note: The official Greenbone compose setup uses the gvmd_socket_vol volume mounted at /run/gvmd in the containers. With the default compose configuration, this named volume is usually available as:

greenbone-community-edition_gvmd_socket_vol.

In this project the same named volume is used to access the gvmd socket from the MCP server container.

1) Clone this repository

git clone https://github.com/matteocolazilli/GreenboneMCP.git
cd GreenboneMCP

2) Build this MCP image

docker build -t greenbonemcp:latest .

3) Create .env configuration and set configuration values

cp .env.example .env

Edit .env with your credentials and desired settings.

You can use this .env by passing it at runtime with --env-file to the docker run command.

The server reads configuration from the following environment variables, which if not set it falls back to defaults:

  • USERNAME: GMP username (default: admin)
  • PASSWORD: GMP password (required: no default, must be set)
  • LOG_LEVEL: application log level (default: INFO)

4) Configure the MCP client and run the server

Configure your MCP client/agent, according to its documentation, to run the GreenboneMCP server with the following docker run command:

docker run 
  --rm -i 
  --env-file <path-to-your-env-file> 
  --name greenbonemcp 
  --volume greenbone-community-edition_gvmd_socket_vol:/run/gvmd 
  greenbonemcp:latest 

Note: the --env-file path must point to the .env you created in step 3.

5) Enjoy!

Use your MCP-compatible assistant to interact with OpenVAS through the tools exposed by this server!

Contributing

  • Open an Issue for bugs, ideas, or feature requests.
  • Open a Pull Request with focused changes and a clear description.

Community contributions are welcome and encouraged.

Tool Module Conventions

To keep tool modules maintainable:

  • keep MCP tool handlers in src/tools/*_tools.py
  • keep non-tool helper functions (parsing, formatting, output shaping) under src/tools/utils/ (for example src/tools/utils/helpers.py)
  • use src/services/gvm_client.py for GMP interaction primitives and keep orchestration logic in tool handlers

Developing New Tools

If you want to add new MCP tools (for example by wrapping additional python-gvm methods), you will likely need new typed models for XML responses.

This project contains models under src/models/generated.

Adding new dataclasses (current approach)

For now, when you need new dataclasses for additional GMP responses, add them manually.

Recommended workflow:

  1. Collect representative XML responses for the GMP methods you want to support.
  2. Use the existing models in src/models/generated as reference for naming, typing, and structure.
  3. Create/update dataclasses manually to match the XML shape you need.

gvm-tools / gvm-pyshell are practical ways to obtain real XML response samples from your Greenbone instance.

License

This project is licensed under GNU GPL v3.0 or later.

See LICENSE.md for the full license text.

Third-Party Notices

This project includes and depends on third-party open-source software. See THIRD_PARTY_NOTICES.md for details on direct dependencies and their licenses.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选