# HackTricks MCP server

> Provides AI agents with offline full-text search and section-level retrieval over the HackTricks offensive security wiki.

- Repository: https://github.com/zebbern/hacktricks-mcp
- Page: https://hostedmcp.org/servers/zebbern/hacktricks-mcp
- Transport: stdio
- Stars: 4
- Latest version: 0.1.5

## Install

### Claude Code

```sh
claude mcp add hacktricks-mcp -- npx -y @zebbern/hacktricks-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "hacktricks-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zebbern/hacktricks-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "hacktricks-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@zebbern/hacktricks-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"hacktricks-mcp","type":"stdio","command":"npx","args":["-y","@zebbern/hacktricks-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "hacktricks-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zebbern/hacktricks-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add hacktricks-mcp -- npx -y @zebbern/hacktricks-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.hacktricks-mcp]
command = "npx"
args = ["-y", "@zebbern/hacktricks-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user hacktricks-mcp npx -- -y @zebbern/hacktricks-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "hacktricks-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zebbern/hacktricks-mcp"
      ]
    }
  }
}
```

## Tools (3)

- `hacktricks_search`
- `hacktricks_get_page`
- `hacktricks_get_toc`

## FAQ

### Does this server require an internet connection to search?

No, the server uses a pre-built SQLite FTS5 search index, meaning there is no network access required at query time.

### How often is the HackTricks wiki content updated?

The index is automatically re-synced with the upstream wiki every 3 days via a GitHub Action.

### Can the server modify the HackTricks wiki?

No, all tools provided by the server are strictly read-only.

### What are the system requirements to run this server?

You need Node.js version 22.13 or newer installed.
