Search and query HackTricks pentesting documentation with quick lookup and section extraction
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
MCP (Model Context Protocol) server for searching and querying HackTricks pentesting documentation directly from Claude.
The postinstall script automatically clones the HackTricks repository (~2 minutes on first install).
Add to your Claude settings (~/.claude/settings.json):
Restart Claude Desktop and try: "Search HackTricks for SQL injection"
Configuration for source install:
Once configured in Claude Desktop, you can ask:
The server provides 7 specialized tools for efficient HackTricks searching.
hacktricks_quick_lookupβ‘ One-shot exploitation lookup. Searches, finds best page, and returns exploitation sections + code blocks in one call.
Parameters:
topic (string, required): Attack/technique to look up (e.g., 'SUID', 'sqli', 'xss', 'docker escape')category (string, optional): Category filter for faster resultsSupported aliases: sqli, xss, rce, lfi, rfi, ssrf, csrf, xxe, ssti, idor, jwt, suid, privesc
Example:
Benefits: Reduces 3+ tool calls to 1 for "how do I exploit X" questions.
search_hacktricksSearch through HackTricks documentation. Returns results GROUPED BY FILE with match count, page title, and relevant section headers.
Parameters:
query (string, required): Search term or regex patterncategory (string, optional): Filter to specific category (e.g., 'pentesting-web')limit (number, optional): Max grouped results (default: 20)Example output:
get_hacktricks_outlineGet the table of contents of a page (all section headers). Use this BEFORE reading full pages to understand structure.
Parameters:
path (string): Relative path to markdown fileExample output:
Benefits: See page structure in ~20 lines vs reading 500+ lines.
get_hacktricks_sectionExtract a specific section from a page by header name. Much more efficient than reading the full page.
Parameters:
path (string): Relative path to markdown filesection (string): Section header to extract (partial match, case-insensitive)Example:
Benefits: Read just "SUID Binaries" section (~200 tokens) instead of entire page (~3000 tokens).
get_hacktricks_cheatsheetExtract only code blocks from a page. Perfect when you just need commands, payloads, or examples.
Parameters:
path (string): Relative path to markdown fileExample output:
Benefits: Skip explanatory text when you just need "give me the command".
get_hacktricks_pageGet full content of a HackTricks page.
Parameters:
path (string): Relative path to markdown fileWarning: Pages can be very long (3000+ tokens). Consider using get_hacktricks_outline + get_hacktricks_section instead.
list_hacktricks_categoriesList categories and their contents.
Parameters:
category (string, optional): Category to expandWithout category: Lists top-level categories With category: Shows full directory tree with file paths
For optimal token usage, Claude should:
Before (inefficient):
After (efficient):
rg) - usually pre-installed on macOS/LinuxWatch mode:
Test locally:
Contributions are welcome! If you'd like to improve the server:
git checkout -b feature/improvement)Please ensure your PR includes tests for new features and maintains the existing code style.
MIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/hacktricks-mcp-server)<a href="https://allmcps.com/mcp/hacktricks-mcp-server"><img src="https://allmcps.com/api/badge/hacktricks-mcp-server?style=directory" alt="HackTricks MCP Server on AllMCPs" /></a>