openvas-mcp

mcp
Security Audit
Warn
Health Warn
  • License — License: AGPL-3.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 7 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Official MCP server for Greenbone Vulnerability Management, communicates with GVM

README.md

Greenbone Logo

OpenVAS MCP Server

A Model Context Protocol server for
Greenbone Vulnerability Management (GVM/OpenVAS), written in Rust. It exposes
the complete rust-gvm-api
REST contract as typed MCP tools, forwards each caller's gvmd identity to the
gateway, and lets an AI assistant manage targets, tasks, scan configurations,
reports and compliance audits through a single binary.

Table of Contents

Requirements

  • A running rust-gvm-api
    REST gateway, version 0.8.0 or later, in front of gvmd; verified end to end
    against gvmd 26.43.0 / GMP 22.8
  • Rust 1.90 or later, to build from source
  • Docker, for the container image and the live end-to-end tests

No GVM installation is required to build or test the server: the test suite
runs against a mock gateway, and the server itself never speaks GMP.

Installation

Docker, streamable HTTP on http://localhost:8000/mcp. Images are published
under immutable release tags only (no latest); take vX.Y.Z from the
releases:

docker run --rm \
  --add-host=host.docker.internal:host-gateway \
  -e GVM_GATEWAY_URL=http://host.docker.internal:8080 \
  -e GVM_ALLOW_INSECURE_GATEWAY=true \
  -e GVM_USERNAME=admin \
  -e GVM_PASSWORD=secret \
  -p 127.0.0.1:8000:8000 \
  ghcr.io/greenbone-hive/openvas-mcp:vX.Y.Z

Binary over stdio, from a release
or cargo build --release, registered with the MCP client:

{
  "mcpServers": {
    "openvas": {
      "command": "/path/to/gvm-mcp",
      "env": {
        "GVM_GATEWAY_URL": "http://localhost:8080",
        "GVM_USERNAME": "admin",
        "GVM_PASSWORD": "secret"
      }
    }
  }
}

Start with the openvas_test_connection tool: it checks gateway liveness and
readiness, the gvmd version and the forwarded identity. Release archives,
checksums, the compose example and client registration for both transports
are covered in docs/installation.md.

Configuration

Every setting is an environment variable and a CLI flag of the same meaning
(gvm-mcp --help). GVM_PASSWORD_FILE points at a mounted secret and wins
over GVM_PASSWORD.

Required Variable Default Description
no GVM_GATEWAY_URL http://127.0.0.1:8080 Origin of the rust-gvm-api gateway, without /gvm/public/v1
no* GVM_USERNAME gvmd username of the fallback identity (stdio, and HTTP callers that send no Authorization)
no* GVM_PASSWORD gvmd password of the fallback identity; also read from GVM_PASSWORD_FILE
no MCP_TRANSPORT stdio stdio or streamable-http
no MCP_BIND_ADDR 127.0.0.1:8000 Listen address of the streamable-HTTP transport
no MCP_ALLOWED_HOSTS localhost,127.0.0.1,::1 Host headers accepted by the HTTP transport (DNS-rebinding guard); * disables the check
no MCP_REQUIRE_CALLER_AUTH false Reject HTTP tool calls without an Authorization header instead of serving them with the fallback identity
no GVM_TOOLSETS default Toolsets to expose: default, all or a comma-separated list
no GVM_READ_ONLY false Expose only non-mutating tools
no GVM_GATEWAY_AUTH_MODE session session reuses one gateway session per identity; per-request sends credentials on every call
no GVM_GATEWAY_MAX_IN_FLIGHT 8 Gateway requests in flight per identity (the gateway allows ten concurrent sessions per user)
no GVM_ALLOW_INSECURE_GATEWAY false Permit a plain-http gateway URL that is not loopback (isolated networks only)
no GVM_GATEWAY_CA_CERT PEM bundle of extra root certificates for the gateway's TLS certificate
no GVM_HTTP_TIMEOUT 30 Gateway HTTP timeout in seconds
no GVM_LOG_LEVEL info Log level when RUST_LOG is unset: error, warn, info, debug, trace

* required for stdio clients; HTTP callers may instead authenticate as
themselves.

Authentication

The server holds no session and invents no authentication of its own. The
Authorization value of each gateway call is resolved per request: the
inbound MCP request's Authorization header when present (so every
streamable-HTTP caller authenticates as themselves with Basic gvmd
credentials or a gateway session token), otherwise a Basic header built from
GVM_USERNAME / GVM_PASSWORD. Without either, the gateway answers 401
and the tool reports it.

The one exception is asynchronous report exports: the gateway cancels an
export job when the session that created it ends, so openvas_export_report
opens a job-bound gateway session with the caller's credentials and closes it
after the download, on cancel or when the job reaches a terminal state.

For HTTP deployments, MCP_REQUIRE_CALLER_AUTH=true keeps the fallback
identity for stdio only, MCP_ALLOWED_HOSTS guards against DNS rebinding, and
TLS belongs on a reverse proxy in front of the server. The gateway client never
follows redirects, rejects credentials embedded in the gateway URL, redacts
secrets from debug output and caps downloaded artifacts at 3 MB. Details in
docs/authentication.md.

Toolsets

197 tools in 25 toolsets. default is every toolset except identity, which
is always opt-in; GVM_READ_ONLY removes every mutating tool from the listing.

gvm-mcp --list-toolsets                     # the 25 toolsets
gvm-mcp --toolsets targets,tasks,reports    # scoped surface
gvm-mcp --toolsets default,identity         # include user administration
gvm-mcp --read-only                         # reads only
Selection Tools
default 174
default, read-only 90
default,identity 197
default,identity, read-only 100

List tools return summarized rows with pagination; get tools return the
gateway's full JSON. The toolset reference, the definition of a mutating tool
and the availability notes are in docs/toolsets.md; scan,
audit, export and deletion flows are in docs/usage.md.

Development

cargo build --release   # target/release/gvm-mcp
cargo test              # unit and mock-gateway tests, no GVM needed
cargo fmt --all && cargo clippy --all-targets --all-features -- -D warnings
python3 scripts/gateway_sync_check.py --spec ../rust-gvm-api/spec/rest-api --write-doc

The tool surface mirrors the gateway's spec/rest-api: 198 of the contract's
203 operations map to exactly one tool each, and the drift check above fails
on any missing, stale or broken mapping. CI runs the same gate plus the drift
check against the gateway's main branch. A live end-to-end suite, gated
behind #[ignore], exercises every endpoint against a real gateway and gvmd;
see docs/development.md.

Documentation

The full documentation is published at
https://greenbone-hive.github.io/OpenVAS-MCP/latest/; its sources live in
docs/:

Maintainer

This project is maintained by Greenbone AG

License

Copyright (C) 2026 Greenbone AG

Licensed under the GNU Affero General Public License v3.0 or later.

Reviews (0)

No results found