@zebbern/hacktricks-mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/db.js ADDED
@@ -0,0 +1,149 @@
1
+ /**
2
+ * SQLite FTS5 index layer. Shared by the sync indexer (write) and the MCP
3
+ * server (read). Uses node:sqlite — zero native dependencies.
4
+ */
5
+ import { DatabaseSync } from "node:sqlite";
6
+ import fs from "node:fs";
7
+ import path from "node:path";
8
+ const SCHEMA = `
9
+ CREATE TABLE IF NOT EXISTS pages (
10
+ page_id INTEGER PRIMARY KEY,
11
+ path TEXT UNIQUE NOT NULL,
12
+ title TEXT NOT NULL,
13
+ category TEXT NOT NULL DEFAULT '',
14
+ url TEXT NOT NULL DEFAULT '',
15
+ outline TEXT NOT NULL DEFAULT '[]',
16
+ content TEXT NOT NULL
17
+ );
18
+ CREATE VIRTUAL TABLE IF NOT EXISTS pages_fts USING fts5(
19
+ title, path, category, content,
20
+ content='pages', content_rowid='page_id',
21
+ tokenize='porter unicode61'
22
+ );
23
+ CREATE TRIGGER IF NOT EXISTS pages_ai AFTER INSERT ON pages BEGIN
24
+ INSERT INTO pages_fts(rowid, title, path, category, content)
25
+ VALUES (new.page_id, new.title, new.path, new.category, new.content);
26
+ END;
27
+ `;
28
+ export function createDb(dbPath) {
29
+ fs.mkdirSync(path.dirname(dbPath), { recursive: true });
30
+ const db = new DatabaseSync(dbPath);
31
+ db.exec(SCHEMA);
32
+ return db;
33
+ }
34
+ export function openDbReadonly(dbPath) {
35
+ if (!fs.existsSync(dbPath)) {
36
+ throw new Error(`HackTricks index not found at ${dbPath}. Run "npm run sync" to build it, or reinstall the package.`);
37
+ }
38
+ return new DatabaseSync(dbPath, { readOnly: true });
39
+ }
40
+ export function insertPage(db, page) {
41
+ db.prepare(`INSERT INTO pages (path, title, category, url, outline, content)
42
+ VALUES (?, ?, ?, ?, ?, ?)`).run(page.path, page.title, page.category, page.url, page.outline, page.content);
43
+ }
44
+ /**
45
+ * Common security abbreviations agents and users actually type.
46
+ * Expanded before FTS query construction so "privesc" matches
47
+ * "privilege escalation" in page content.
48
+ */
49
+ const ALIASES = {
50
+ privesc: "privilege escalation",
51
+ sqli: "sql injection",
52
+ rce: "remote code execution",
53
+ lfi: "local file inclusion",
54
+ rfi: "remote file inclusion",
55
+ xss: "cross site scripting",
56
+ csrf: "cross site request forgery",
57
+ ssrf: "server side request forgery",
58
+ ssti: "server side template injection",
59
+ xxe: "xml external entity",
60
+ idor: "insecure direct object reference",
61
+ lpe: "local privilege escalation",
62
+ privescalation: "privilege escalation",
63
+ deserial: "deserialization",
64
+ revshell: "reverse shell",
65
+ };
66
+ /**
67
+ * Turn a free-text query into a safe FTS5 MATCH expression.
68
+ * Every term is double-quoted (escaping inner quotes) so user input can never
69
+ * break the query syntax. Multi-term queries try AND first (precision), then
70
+ * fall back to OR (recall) if AND yields nothing.
71
+ */
72
+ function buildFtsQuery(query, op) {
73
+ const rawTerms = query
74
+ .split(/\s+/)
75
+ .map((t) => t.replace(/[^\w.-]/g, ""))
76
+ .filter((t) => t.length > 0);
77
+ // Each term becomes a quoted match; known abbreviations become an OR-group
78
+ // of the abbreviation plus its expansion.
79
+ const groups = rawTerms.map((t) => {
80
+ const quote = (s) => `"${s.replace(/"/g, '""')}"`;
81
+ const alias = ALIASES[t.toLowerCase()];
82
+ if (!alias)
83
+ return quote(t);
84
+ return `(${quote(t)} OR ${alias.split(" ").map(quote).join(" OR ")})`;
85
+ });
86
+ if (groups.length === 0)
87
+ return null;
88
+ return groups.join(` ${op} `);
89
+ }
90
+ export function searchPages(db, query, category, limit) {
91
+ const rawTerms = query
92
+ .split(/\s+/)
93
+ .map((t) => t.replace(/[^\w.-]/g, ""))
94
+ .filter((t) => t.length > 0);
95
+ // Deterministic boost: count query terms (or their alias expansions) that
96
+ // literally appear in the page title/path. Ranks the canonical page for a
97
+ // topic above pages that merely mention the terms often.
98
+ const boostSql = rawTerms
99
+ .map((t) => {
100
+ const variants = [t, ...(ALIASES[t.toLowerCase()]?.split(" ") ?? [])];
101
+ const cond = variants
102
+ .map((v) => `lower(p.title || ' ' || p.path) LIKE '%' || ? || '%'`)
103
+ .join(" OR ");
104
+ return `(CASE WHEN ${cond} THEN 1 ELSE 0 END)`;
105
+ })
106
+ .join(" + ");
107
+ const boostParams = rawTerms.flatMap((t) => [
108
+ ...[t, ...(ALIASES[t.toLowerCase()]?.split(" ") ?? [])],
109
+ ]);
110
+ const run = (op) => {
111
+ const ftsQuery = buildFtsQuery(query, op);
112
+ if (!ftsQuery)
113
+ return [];
114
+ const sql = `
115
+ SELECT p.page_id, p.path, p.title, p.category, p.url,
116
+ snippet(pages_fts, 3, '**', '**', ' … ', 24) AS snippet
117
+ FROM pages_fts JOIN pages p ON p.page_id = pages_fts.rowid
118
+ WHERE pages_fts MATCH ?
119
+ ${category ? "AND lower(p.category) LIKE lower(?)" : ""}
120
+ ORDER BY ${rawTerms.length > 0 ? `(${boostSql}) DESC,` : ""} bm25(pages_fts, 10.0, 8.0, 5.0, 1.0)
121
+ LIMIT ?`;
122
+ const params = [ftsQuery];
123
+ if (category)
124
+ params.push(`%${category}%`);
125
+ params.push(...boostParams, limit);
126
+ return db.prepare(sql).all(...params);
127
+ };
128
+ const andResults = run("AND");
129
+ if (andResults.length > 0 || rawTerms.length <= 1)
130
+ return andResults;
131
+ return run("OR");
132
+ }
133
+ export function getPage(db, pagePath) {
134
+ const row = db
135
+ .prepare(`SELECT * FROM pages WHERE path = ?`)
136
+ .get(pagePath);
137
+ if (row)
138
+ return row;
139
+ // Convenience: allow suffix matches like "kerberoast" or "ntlm/README.md"
140
+ const like = db
141
+ .prepare(`SELECT * FROM pages WHERE path LIKE ? ORDER BY length(path) LIMIT 1`)
142
+ .get(`%${pagePath.replace(/%/g, "")}%`);
143
+ return like ?? null;
144
+ }
145
+ export function listCategories(db) {
146
+ return db
147
+ .prepare(`SELECT category, count(*) AS pages FROM pages GROUP BY category ORDER BY pages DESC`)
148
+ .all();
149
+ }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Markdown cleaning and section utilities for HackTricks content.
3
+ *
4
+ * HackTricks pages are GitBook-flavored markdown full of templating noise:
5
+ * `{% hint %}...{% endhint %}` training banners, `{{#include}}` directives,
6
+ * `.gitbook/assets` image lines. All of that wastes agent tokens, so we strip
7
+ * it at index time.
8
+ */
9
+ /** Remove GitBook/mdBook templating noise and collapse whitespace. */
10
+ export function cleanMarkdown(raw) {
11
+ let text = raw;
12
+ // Drop {% hint ... %} ... {% endhint %} blocks (HackTricks training ads)
13
+ text = text.replace(/\{%\s*hint[^%]*%\}[\s\S]*?\{%\s*endhint\s*%\}/g, "");
14
+ // Drop remaining single-line GitBook directives: {% ... %}, {{#include ...}}
15
+ text = text.replace(/^\s*\{%[\s\S]*?%\}\s*$/gm, "");
16
+ text = text.replace(/^\s*\{\{[\s\S]*?\}\}\s*$/gm, "");
17
+ // Drop image-only lines pointing at .gitbook/assets (banner badges)
18
+ text = text.replace(/^\s*!\[[^\]]*\]\([^)]*\.gitbook\/assets[^)]*\)\s*$/gm, "");
19
+ // Drop HTML comments
20
+ text = text.replace(/<!--[\s\S]*?-->/g, "");
21
+ // Collapse 3+ blank lines, trim trailing spaces
22
+ text = text.replace(/[ \t]+$/gm, "");
23
+ text = text.replace(/\n{3,}/g, "\n\n");
24
+ return text.trim();
25
+ }
26
+ /** Extract the heading outline of a markdown document. */
27
+ export function extractOutline(content) {
28
+ const headings = [];
29
+ const lines = content.split("\n");
30
+ let inCode = false;
31
+ for (let i = 0; i < lines.length; i++) {
32
+ const line = lines[i];
33
+ if (/^```/.test(line.trim()))
34
+ inCode = !inCode;
35
+ if (inCode)
36
+ continue;
37
+ const m = /^(#{1,6})\s+(.+?)\s*$/.exec(line);
38
+ if (m)
39
+ headings.push({ level: m[1].length, text: m[2], line: i });
40
+ }
41
+ return headings;
42
+ }
43
+ /**
44
+ * Extract one section by heading text (case-insensitive substring match).
45
+ * Returns the section from its heading until the next heading of the same or
46
+ * higher level, or null if no heading matches.
47
+ */
48
+ export function extractSection(content, section) {
49
+ const lines = content.split("\n");
50
+ const headings = extractOutline(content);
51
+ const needle = section.toLowerCase();
52
+ const match = headings.find((h) => h.text.toLowerCase().includes(needle));
53
+ if (!match)
54
+ return null;
55
+ let end = lines.length;
56
+ for (const h of headings) {
57
+ if (h.line > match.line && h.level <= match.level) {
58
+ end = h.line;
59
+ break;
60
+ }
61
+ }
62
+ return lines.slice(match.line, end).join("\n").trim();
63
+ }
64
+ /** Extract only fenced code blocks (commands/payloads) from a document. */
65
+ export function extractCodeBlocks(content) {
66
+ const blocks = [];
67
+ const re = /```[^\n]*\n([\s\S]*?)```/g;
68
+ let m;
69
+ while ((m = re.exec(content)) !== null) {
70
+ const block = m[1].trim();
71
+ if (block)
72
+ blocks.push(block);
73
+ }
74
+ return blocks;
75
+ }
package/dist/server.js ADDED
@@ -0,0 +1,226 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * hacktricks-mcp — MCP server for searching and retrieving HackTricks content.
4
+ *
5
+ * Reads a pre-built SQLite FTS5 index bundled with the package (data/).
6
+ * All tools are read-only and fully local: no network access at query time.
7
+ */
8
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
9
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
10
+ import { z } from "zod";
11
+ import path from "node:path";
12
+ import fs from "node:fs";
13
+ import { fileURLToPath } from "node:url";
14
+ import { openDbReadonly, searchPages, getPage, listCategories } from "./db.js";
15
+ import { extractSection, extractCodeBlocks } from "./markdown.js";
16
+ const PKG_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
17
+ const DB_PATH = process.env.HACKTRICKS_DB ?? path.join(PKG_ROOT, "data", "hacktricks.db");
18
+ const TOC_PATH = path.join(PKG_ROOT, "data", "toc.json");
19
+ const META_PATH = path.join(PKG_ROOT, "data", "meta.json");
20
+ const db = openDbReadonly(DB_PATH);
21
+ const meta = fs.existsSync(META_PATH)
22
+ ? JSON.parse(fs.readFileSync(META_PATH, "utf8"))
23
+ : { upstreamSha: "unknown", syncedAt: "unknown", pageCount: 0 };
24
+ const server = new McpServer({ name: "hacktricks-mcp", version: meta.version ?? "0.1.0" }, {
25
+ instructions: [
26
+ "HackTricks wiki knowledge base (offensive security: pentesting, privilege escalation,",
27
+ "web exploitation, Active Directory, cloud, Wi-Fi, forensics, macOS/Windows/Linux).",
28
+ "Use hacktricks_search to find relevant pages, then hacktricks_get_page to read them.",
29
+ "Prefer section= or codeOnly= on get_page to keep responses small.",
30
+ `Index covers ${meta.pageCount} pages, synced from upstream at ${meta.syncedAt}.`,
31
+ ].join(" "),
32
+ });
33
+ const READONLY = {
34
+ readOnlyHint: true,
35
+ destructiveHint: false,
36
+ idempotentHint: true,
37
+ openWorldHint: false,
38
+ };
39
+ const searchHitSchema = {
40
+ pageId: z.number(),
41
+ path: z.string().describe("Page identifier; pass this to hacktricks_get_page"),
42
+ title: z.string(),
43
+ category: z.string(),
44
+ url: z.string(),
45
+ snippet: z.string(),
46
+ };
47
+ server.registerTool("hacktricks_search", {
48
+ title: "Search HackTricks",
49
+ description: "Full-text search over the HackTricks offensive-security wiki (pentesting techniques, " +
50
+ "privilege escalation, web vulns, AD attacks, cloud, forensics). Returns ranked pages " +
51
+ "with snippets. Use specific technical terms (e.g. 'kerberoast', 'SUID', 'JWT algorithm confusion') " +
52
+ "for best results. Follow up with hacktricks_get_page on a result's path to read the content.",
53
+ inputSchema: {
54
+ query: z.string().min(1).describe("Search terms, e.g. 'docker escape' or 'asreproast'"),
55
+ category: z
56
+ .string()
57
+ .optional()
58
+ .describe("Optional category filter (substring match), e.g. 'Windows Hardening' or 'Pentesting Web'"),
59
+ limit: z.number().int().min(1).max(25).default(10).describe("Max results (default 10)"),
60
+ },
61
+ outputSchema: { results: z.array(z.object(searchHitSchema)) },
62
+ annotations: READONLY,
63
+ }, async ({ query, category, limit }) => {
64
+ const hits = searchPages(db, query, category, limit);
65
+ const results = hits.map((h) => ({
66
+ pageId: h.page_id,
67
+ path: h.path,
68
+ title: h.title,
69
+ category: h.category,
70
+ url: h.url,
71
+ snippet: h.snippet.replace(/\n+/g, " ").trim(),
72
+ }));
73
+ const text = results.length === 0
74
+ ? `No HackTricks pages matched "${query}"${category ? ` in category "${category}"` : ""}. Try broader or different terms.`
75
+ : results
76
+ .map((r, i) => `${i + 1}. ${r.title}\n path: ${r.path}\n category: ${r.category}\n ${r.snippet}`)
77
+ .join("\n\n");
78
+ return { content: [{ type: "text", text }], structuredContent: { results } };
79
+ });
80
+ server.registerTool("hacktricks_get_page", {
81
+ title: "Read HackTricks Page",
82
+ description: "Retrieve content of a HackTricks page found via hacktricks_search. By default returns the " +
83
+ "page outline plus content (truncated if very long). Use section= to read one section by " +
84
+ "heading name, or codeOnly=true to get just the commands/payloads. This is the token-efficient " +
85
+ "way to consume long pages.",
86
+ inputSchema: {
87
+ path: z
88
+ .string()
89
+ .min(1)
90
+ .describe("Page path from hacktricks_search (e.g. 'windows-hardening/active-directory-methodology/kerberoast.md'). Unique suffixes like 'kerberoast' also work."),
91
+ section: z
92
+ .string()
93
+ .optional()
94
+ .describe("Optional heading name to extract just that section (case-insensitive substring match)"),
95
+ codeOnly: z
96
+ .boolean()
97
+ .default(false)
98
+ .describe("If true, return only fenced code blocks (commands/payloads) from the page or section"),
99
+ },
100
+ outputSchema: {
101
+ title: z.string(),
102
+ path: z.string(),
103
+ url: z.string(),
104
+ outline: z.array(z.string()),
105
+ content: z.string(),
106
+ truncated: z.boolean(),
107
+ },
108
+ annotations: READONLY,
109
+ }, async ({ path: pagePath, section, codeOnly }) => {
110
+ const page = getPage(db, pagePath);
111
+ if (!page) {
112
+ return {
113
+ content: [
114
+ {
115
+ type: "text",
116
+ text: `No page found for "${pagePath}". Use hacktricks_search to find valid page paths.`,
117
+ },
118
+ ],
119
+ isError: true,
120
+ };
121
+ }
122
+ const outline = JSON.parse(page.outline).map((h) => `${" ".repeat(h.level - 1)}${h.text}`);
123
+ let content;
124
+ if (section) {
125
+ const sec = extractSection(page.content, section);
126
+ if (sec === null) {
127
+ return {
128
+ content: [
129
+ {
130
+ type: "text",
131
+ text: `Section "${section}" not found in "${page.title}". Available sections:\n${outline.join("\n")}`,
132
+ },
133
+ ],
134
+ isError: true,
135
+ };
136
+ }
137
+ content = sec;
138
+ }
139
+ else {
140
+ content = page.content;
141
+ }
142
+ if (codeOnly) {
143
+ const blocks = extractCodeBlocks(content);
144
+ content = blocks.length > 0 ? blocks.map((b) => "```\n" + b + "\n```").join("\n\n") : "(no code blocks found)";
145
+ }
146
+ const MAX = 20000;
147
+ let truncated = false;
148
+ if (content.length > MAX) {
149
+ truncated = true;
150
+ content =
151
+ content.slice(0, MAX) +
152
+ `\n\n--- [TRUNCATED] Page is ${content.length} chars. Use section= to read a specific part. Sections:\n` +
153
+ outline.join("\n");
154
+ }
155
+ const header = `# ${page.title}\n${page.url}\n\n`;
156
+ return {
157
+ content: [{ type: "text", text: header + content }],
158
+ structuredContent: {
159
+ title: page.title,
160
+ path: page.path,
161
+ url: page.url,
162
+ outline,
163
+ content,
164
+ truncated,
165
+ },
166
+ };
167
+ });
168
+ server.registerTool("hacktricks_get_toc", {
169
+ title: "HackTricks Table of Contents",
170
+ description: "Get the HackTricks wiki structure: categories and page tree. Call without arguments for the " +
171
+ "top-level overview, or pass a category to see its pages. Useful to understand where a topic " +
172
+ "lives before searching.",
173
+ inputSchema: {
174
+ category: z
175
+ .string()
176
+ .optional()
177
+ .describe("Optional category name to expand (e.g. 'Linux Hardening'). Omit for top-level overview."),
178
+ },
179
+ outputSchema: {
180
+ categories: z.array(z.object({ category: z.string(), pages: z.number() })),
181
+ tree: z.string().describe("Indented text tree of matching pages"),
182
+ },
183
+ annotations: READONLY,
184
+ }, async ({ category }) => {
185
+ const categories = listCategories(db);
186
+ const toc = fs.existsSync(TOC_PATH)
187
+ ? JSON.parse(fs.readFileSync(TOC_PATH, "utf8"))
188
+ : null;
189
+ let tree = "";
190
+ if (toc) {
191
+ const matchSection = (nodes, depth) => {
192
+ const lines = [];
193
+ for (const n of nodes) {
194
+ const line = " ".repeat(depth) + "- " + n.title + (n.path ? ` [${n.path}]` : "");
195
+ if (category) {
196
+ const sub = matchSection(n.children ?? [], depth + 1);
197
+ if (sub.length > 0 || n.title.toLowerCase().includes(category.toLowerCase())) {
198
+ lines.push(line, ...sub);
199
+ }
200
+ }
201
+ else if (depth < 2) {
202
+ lines.push(line, ...matchSection(n.children ?? [], depth + 1));
203
+ }
204
+ }
205
+ return lines;
206
+ };
207
+ tree = matchSection(toc, 0).join("\n");
208
+ }
209
+ const catText = categories.map((c) => `- ${c.category} (${c.pages} pages)`).join("\n");
210
+ const text = category
211
+ ? `Pages matching "${category}":\n${tree || "(none)"}\n\nAll categories:\n${catText}`
212
+ : `HackTricks categories:\n${catText}\n\nStructure (top 2 levels):\n${tree}`;
213
+ return {
214
+ content: [{ type: "text", text }],
215
+ structuredContent: { categories, tree },
216
+ };
217
+ });
218
+ async function main() {
219
+ const transport = new StdioServerTransport();
220
+ await server.connect(transport);
221
+ console.error("hacktricks-mcp running on stdio");
222
+ }
223
+ main().catch((err) => {
224
+ console.error("Fatal error:", err);
225
+ process.exit(1);
226
+ });
package/dist/toc.js ADDED
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Parser for HackTricks' src/SUMMARY.md (mdBook/GitBook table of contents).
3
+ *
4
+ * Produces a nested tree of { title, path?, children } plus a flat map from
5
+ * markdown path -> { title, category, breadcrumb } used to enrich the index.
6
+ */
7
+ const ENTRY_RE = /^(\s*)[-*]\s+\[([^\]]+)\]\(([^)]*)\)\s*$/;
8
+ const HEADER_RE = /^#\s+(.+?)\s*$/;
9
+ export function parseSummary(summary) {
10
+ const tree = [];
11
+ const pages = new Map();
12
+ // Stack of (indent, node) to track nesting; -1 indent for root level
13
+ const stack = [];
14
+ let currentSection = "";
15
+ const breadcrumbStack = [];
16
+ for (const line of summary.split("\n")) {
17
+ const header = HEADER_RE.exec(line);
18
+ if (header) {
19
+ currentSection = header[1].replace(/[^\w\s&-]/g, "").trim();
20
+ continue;
21
+ }
22
+ const m = ENTRY_RE.exec(line);
23
+ if (!m)
24
+ continue;
25
+ const indent = m[1].length;
26
+ const title = m[2].trim();
27
+ const rawPath = m[3].trim();
28
+ const path = rawPath.length > 0 ? rawPath : undefined;
29
+ const node = { title, path, children: [] };
30
+ while (stack.length > 0 && stack[stack.length - 1].indent >= indent)
31
+ stack.pop();
32
+ if (stack.length === 0)
33
+ tree.push(node);
34
+ else
35
+ stack[stack.length - 1].node.children.push(node);
36
+ stack.push({ indent, node });
37
+ if (path) {
38
+ while (breadcrumbStack.length > 0 && breadcrumbStack[breadcrumbStack.length - 1].indent >= indent)
39
+ breadcrumbStack.pop();
40
+ const breadcrumb = [currentSection, ...breadcrumbStack.map((b) => b.title)].filter(Boolean);
41
+ pages.set(path, { title, category: currentSection, breadcrumb });
42
+ }
43
+ breadcrumbStack.push({ indent, title });
44
+ }
45
+ return { tree, pages };
46
+ }
47
+ /** Render the TOC tree as an indented plain-text outline for agent consumption. */
48
+ export function renderTocText(nodes, depth = 0) {
49
+ const lines = [];
50
+ for (const node of nodes) {
51
+ lines.push(" ".repeat(depth) + "- " + node.title + (node.path ? ` [${node.path}]` : ""));
52
+ lines.push(renderTocText(node.children, depth + 1));
53
+ }
54
+ return lines.filter(Boolean).join("\n");
55
+ }
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@zebbern/hacktricks-mcp",
3
+ "version": "0.1.0",
4
+ "description": "MCP server giving AI agents fast full-text search and section-level retrieval over the HackTricks security wiki. Ships with a pre-built FTS5 index, synced with upstream every 3 days.",
5
+ "type": "module",
6
+ "bin": {
7
+ "hacktricks-mcp": "dist/server.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "data/hacktricks.db",
12
+ "data/toc.json",
13
+ "data/meta.json"
14
+ ],
15
+ "engines": {
16
+ "node": ">=22.13"
17
+ },
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "start": "node dist/server.js",
21
+ "sync": "tsx scripts/sync.ts",
22
+ "eval": "tsx scripts/eval.ts",
23
+ "smoke": "tsx scripts/smoke.ts",
24
+ "prepublishOnly": "npm run build"
25
+ },
26
+ "keywords": [
27
+ "mcp",
28
+ "model-context-protocol",
29
+ "hacktricks",
30
+ "pentesting",
31
+ "red-team",
32
+ "security",
33
+ "ai-agents"
34
+ ],
35
+ "license": "MIT",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/zebbern/hacktricks-mcp.git"
39
+ },
40
+ "homepage": "https://github.com/zebbern/hacktricks-mcp",
41
+ "dependencies": {
42
+ "@modelcontextprotocol/sdk": "^1.31.0",
43
+ "tar": "^7.5.22",
44
+ "zod": "^3.25.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/node": "^24.19.0",
48
+ "tsx": "^4.0.0",
49
+ "typescript": "^5.9.3"
50
+ }
51
+ }