Nuclei MCP server

Integrates with Nuclei vulnerability scanner to automate security assessments through configurable scanning operations with comprehensive reporting for vulnerability analysis and remediation.
Back to servers
Setup instructions
Provider
Mark III Labs
Release date
Mar 08, 2025
Language
Go
Stats
22 stars

Nuclei MCP Integration provides a standardized interface for performing security scans using Nuclei's vulnerability scanning engine. This server implementation allows you to run vulnerability assessments programmatically through the Model Context Protocol (MCP) ecosystem.

Features

  • Vulnerability Scanning: Perform comprehensive security scans
  • Template Management: Add, list, and manage custom Nuclei templates
  • Result Caching: Optimize repeated scans with configurable caching
  • Concurrent Operations: Thread-safe implementation for high-performance scanning
  • RESTful API: Standardized interface for integration with other MCP-compliant tools
  • Detailed Reporting: Structured vulnerability reports with severity levels

Installation

Prerequisites

  • Nuclei (will be automatically downloaded if not present)
  • Node.js 14+ (for MCP Inspector, optional)

Option 1: Pre-built Binary (Recommended)

  1. Download the latest release for your platform from the Releases page
  2. Extract the archive
  3. Run the binary:
# Linux/macOS
./nuclei-mcp
   
# Windows
nuclei-mcp.exe

Option 2: Install with Go

go install github.com/your-org/nuclei-mcp/cmd/nuclei-mcp@latest

Option 3: Build from Source

  1. Clone the repository:
git clone https://github.com/your-org/nuclei-mcp.git
cd nuclei-mcp
  1. Install dependencies:
go mod download
  1. Build and run:
go build -o nuclei-mcp ./cmd/nuclei-mcp
./nuclei-mcp

Running the Server

Start the MCP server:

# If using pre-built binary
./nuclei-mcp

# If built from source
go run cmd/nuclei-mcp/main.go

Using the MCP Inspector

For testing, use the MCP Inspector:

# Install the MCP Inspector globally
npm install -g @modelcontextprotocol/inspector

# Start the inspector with the Nuclei MCP server
npx @modelcontextprotocol/inspector go run cmd/nuclei-mcp/main.go

The inspector UI will be available at http://localhost:5173

Configuration

Configuration can be managed through a YAML configuration file or environment variables, checked in the following order:

  1. File specified by --config flag
  2. config.yaml in the current directory
  3. $HOME/.nuclei-mcp/config.yaml
  4. /etc/nuclei-mcp/config.yaml

Configuration File Example

Create a config.yaml file with this structure:

server:
  name: "nuclei-mcp"
  version: "1.0.0"
  port: 3000
  host: "127.0.0.1"

cache:
  enabled: true
  expiry: 1h
  max_size: 1000

logging:
  level: "info"
  path: "./logs/nuclei-mcp.log"
  max_size_mb: 10
  max_backups: 5
  max_age_days: 30
  compress: true

nuclei:
  templates_directory: "nuclei-templates"
  timeout: 5m
  rate_limit: 150
  bulk_size: 25
  template_threads: 10
  headless: false
  show_browser: false
  system_resolvers: true

Environment Variables

All configuration options can be set using environment variables with the NUCLEI_MCP_ prefix. For example:

  • NUCLEI_MCP_SERVER_PORT=3000
  • NUCLEI_MCP_LOGGING_LEVEL=debug

Using the MCP Client

To connect an MCP client to the Nuclei MCP server:

Connection Parameters

  • Transport: stdio (subprocess) or http (standalone server)
  • Command: go run cmd/nuclei-mcp/main.go (development) or the binary path
  • Working Directory: The root directory of the nuclei-mcp project

For HTTP connections, the server defaults to http://127.0.0.1:3000.

Example Client Configuration (JSON)

{
  "mcpServers": {
    "nuclei-scanner": {
      "command": "go",
      "args": ["run", "cmd/nuclei-mcp/main.go"],
      "env": {
        "NUCLEI_MCP_SERVER_PORT": "3000",
        "NUCLEI_MCP_CACHE_ENABLED": "true"
      }
    }
  }
}

Available Tools

Core Tools

  • nuclei_scan: Perform a full Nuclei scan with advanced filtering options
  • basic_scan: Quick scan with minimal configuration
  • vulnerability_resource: Query and retrieve scan results
  • add_template: Add custom Nuclei templates
  • list_templates: View available templates
  • get_template: Retrieve details of a specific template

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "nuclei" '{"command":"go","args":["run","nuclei_mcp.go"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "nuclei": {
            "command": "go",
            "args": [
                "run",
                "nuclei_mcp.go"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "nuclei": {
            "command": "go",
            "args": [
                "run",
                "nuclei_mcp.go"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later