Installation Guide

Install & Configure Your AI Toolkit

Step-by-step guide to set up Trae, Claude Code, OpenAI Codex, and NezhaCyberMCP on your machine.

macOS · Linux · Windows ~15 min Intermediate
01

Prerequisites

Ensure your system meets the minimum requirements before proceeding.

macOS

12 Monterey+

Linux

Ubuntu 20.04+ / Debian 11+

Windows

Windows 10 / 11 (WSL2 recommended)

DependencyVersionPurpose
Go1.22+Build NezhaCyberMCP binary
Git2.xClone repositories
Node18 LTS+Run Claude Code & Codex CLI
npm9+Install global CLI packages
02

Trae IDE

Trae is an AI-native IDE built for agentic coding workflows. Install it as your primary development environment.

1

Download & Install

Run the official install script. On macOS/Linux this installs the Trae binary and adds it to your PATH.

curl -fsSL https://www.trae.ai/install.sh | sh
2

Sign In

Open Trae and sign in with your account. Trae supports GitHub OAuth and email login.

Trae is free for individual developers. No credit card required.
3

Open Your Project

Use File → Open Folder to open your NezhaCyberMCP directory. Trae will auto-detect the Go workspace.

Verification

Launch Trae from your Applications folder or terminal. The welcome screen should appear with your account name in the top-right corner.

03

Claude Code

Claude Code is Anthropic's agentic coding CLI. It runs in your terminal and can read, write, and execute code autonomously.

1

Install via npm

Install the Claude Code CLI globally using npm. Requires Node.js 18 LTS or later.

npm install -g @anthropic-ai/claude-code
2

Authenticate

Log in with your Anthropic account. This stores a session token in ~/.claude.

claude auth login
3

Add MCP Server

Register NezhaCyberMCP as an MCP server so Claude can call its tools.

You need an active Anthropic API subscription (Pro or Team) to use Claude Code.
Verification
claude --version
04

OpenAI Codex

OpenAI Codex CLI is a terminal-based AI coding agent powered by GPT-4o. It supports MCP tool integration.

1

Install via npm

Install the Codex CLI globally. Requires Node.js 18+ and an OpenAI API key.

npm install -g @openai/codex
2

Set API Key

Export your OpenAI API key as an environment variable. Add this to your shell profile for persistence.

export OPENAI_API_KEY=sk-...
Never commit your API key to version control. Use a .env file or a secrets manager.
3

Launch Codex

Run `codex` in your project directory. Codex will read your codebase and await instructions.

codex
Verification
codex --version
05

NezhaCyberMCP

Clone, build, and wire up the MCP server binary to your AI assistant.

1

Clone the Repository

Clone NezhaCyberMCP from GitHub and navigate into the project directory.

git clone https://github.com/ctkqiang/NezhaCyberMCP.git && cd NezhaCyberMCP
2

Build the Binary

Run `make build` to compile the Go binary. The output binary is named `advisory`.

make build
3

Configure MCP

Add the config block below to your AI assistant's MCP configuration file (e.g. ~/.claude/mcp.json or Trae's MCP settings).

The `./advisory` path must be the absolute or relative path to the compiled binary on your machine.
4

Start the Server

Run `make run` to start the MCP server. It will begin syncing CVE data in the background.

make run
mcp.json
{
  "mcpServers": {
    "nezha-cyber": {
      "command": "./advisory"
    }
  }
}
Verification

Open your AI assistant and ask: 'What are the latest CRITICAL CVEs?' — it should call the `whats_new` tool and return real data.

06

Troubleshooting

Common issues and how to resolve them.

`make build` fails with 'go: command not found'

Go is not installed or not in your PATH. Install Go from golang.org/dl and ensure `go` is accessible.

go version
Permission denied when running `./advisory`

The binary is not executable. Run the command below to fix permissions.

chmod +x ./advisory
Claude Code shows 'MCP server not connected'

Ensure the `command` path in your mcp.json points to the correct absolute path of the `advisory` binary. Relative paths may not resolve correctly depending on how Claude Code is launched.

How do I add NezhaCyberMCP to Claude Code via CLI?

Use the `claude mcp add` command to register the server. Replace the path with your actual binary location.

claude mcp add nezha-cyber ./advisory