Prerequisites
Ensure your system meets the minimum requirements before proceeding.
12 Monterey+
Ubuntu 20.04+ / Debian 11+
Windows 10 / 11 (WSL2 recommended)
Trae IDE
Trae is an AI-native IDE built for agentic coding workflows. Install it as your primary development environment.
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 | shSign In
Open Trae and sign in with your account. Trae supports GitHub OAuth and email login.
Open Your Project
Use File → Open Folder to open your NezhaCyberMCP directory. Trae will auto-detect the Go workspace.
Launch Trae from your Applications folder or terminal. The welcome screen should appear with your account name in the top-right corner.
Claude Code
Claude Code is Anthropic's agentic coding CLI. It runs in your terminal and can read, write, and execute code autonomously.
Install via npm
Install the Claude Code CLI globally using npm. Requires Node.js 18 LTS or later.
npm install -g @anthropic-ai/claude-codeAuthenticate
Log in with your Anthropic account. This stores a session token in ~/.claude.
claude auth loginAdd MCP Server
Register NezhaCyberMCP as an MCP server so Claude can call its tools.
claude --versionOpenAI Codex
OpenAI Codex CLI is a terminal-based AI coding agent powered by GPT-4o. It supports MCP tool integration.
Install via npm
Install the Codex CLI globally. Requires Node.js 18+ and an OpenAI API key.
npm install -g @openai/codexSet API Key
Export your OpenAI API key as an environment variable. Add this to your shell profile for persistence.
export OPENAI_API_KEY=sk-...Launch Codex
Run `codex` in your project directory. Codex will read your codebase and await instructions.
codexcodex --versionNezhaCyberMCP
Clone, build, and wire up the MCP server binary to your AI assistant.
Clone the Repository
Clone NezhaCyberMCP from GitHub and navigate into the project directory.
git clone https://github.com/ctkqiang/NezhaCyberMCP.git && cd NezhaCyberMCPBuild the Binary
Run `make build` to compile the Go binary. The output binary is named `advisory`.
make buildConfigure MCP
Add the config block below to your AI assistant's MCP configuration file (e.g. ~/.claude/mcp.json or Trae's MCP settings).
Start the Server
Run `make run` to start the MCP server. It will begin syncing CVE data in the background.
make run{
"mcpServers": {
"nezha-cyber": {
"command": "./advisory"
}
}
}Open your AI assistant and ask: 'What are the latest CRITICAL CVEs?' — it should call the `whats_new` tool and return real data.
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 versionPermission denied when running `./advisory`
The binary is not executable. Run the command below to fix permissions.
chmod +x ./advisoryClaude 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