BlackBook MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BlackBook MCPSearch for techniques related to kerberoasting with citations."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BlackBook MCP v0.6.0
Source-Grounded Cybersecurity Knowledge & Research MCP
The read-only cybersecurity knowledge & research teammate: source-grounded search, exact citations, a knowledge graph, and investigation context, running alongside an execution MCP.
π What It Is β’ ποΈ Architecture β’ π Installation β’ π οΈ MCP Tools β’ πΈοΈ Knowledge Graph β’ π Security
BlackBook MCP is a source-grounded cybersecurity knowledge & research server that speaks the Model Context Protocol (MCP). It is the research teammate that runs alongside an execution MCP such as HexStrike inside Claude Code, Cursor, VS Code, or any MCP-compatible client.
CLAUDE / AI AGENT
|
+------------+------------+
| |
v v
HEXSTRIKE BlackBook MCP
EXECUTION KNOWLEDGE
| |
+------+------+ +--------+--------+
| | | | | |
Nmap ffuf nuclei HackTricks 0xdf PDFs
| | | | | |
+------+------+ +--------+--------+
| |
+------------+------------+
v
AI REASONING LOOPHexStrike answers: "what can I execute or test?"
BlackBook answers: "what is documented about this situation, which similar cases exist, which techniques are relevant, and what source material supports that conclusion?"
Claude is the orchestrator.
Read-only by design. BlackBook never runs commands, scans hosts, or exploits targets. It indexes a controlled corpus and retrieves source-grounded knowledge with exact, verifiable citations. Execution belongs to a separate MCP.
Architecture Overview
BlackBook MCP v0.6.0 is a source-grounded knowledge system: every query flows through a hybrid retrieval facade, is enriched (never gated) by a knowledge graph, and returns results that resolve to exact, verifiable citations. Nothing is executed.
%%{init: {"themeVariables": {
"primaryColor": "#7f1d1d",
"secondaryColor": "#dc2626",
"tertiaryColor": "#ef4444",
"background": "#1a0505",
"edgeLabelBackground":"#7f1d1d",
"fontFamily": "monospace",
"fontSize": "15px",
"fontColor": "#fee2e2",
"nodeTextColor": "#fee2e2"
}}}%%
graph TD
A[AI Agent - Claude / Cursor / VS Code] -->|MCP Protocol over stdio| B[BlackBook MCP Server v0.6.0]
B --> C[Hybrid Retrieval Facade]
B --> D[6 Knowledge Tools]
B --> E[Knowledge Graph]
C --> F[FTS5 BM25 - always on]
C --> G[Local Semantic - optional]
C --> H[Reranker + Source Diversity]
D --> I[knowledge_search]
D --> J[knowledge_source]
D --> K[knowledge_technique]
D --> L[knowledge_case_search]
D --> M[knowledge_research]
D --> N[knowledge_context]
E --> O[Technique / Tool / Service / OS]
E --> P[Writeup / Source entities]
E --> Q[Evidence-linked edges]
B --> R[Corpus - SQLite FTS5 + JSON1]
R --> S[HackTricks]
R --> T[0xdf Writeups]
R --> U[Local PDFs]
B --> V[Exact Citations and Provenance]
V --> W[chunk_id resolves to verifiable excerpt]
style A fill:#7f1d1d,stroke:#ef4444,stroke-width:3px,color:#fee2e2
style B fill:#dc2626,stroke:#7f1d1d,stroke-width:4px,color:#ffffff
style C fill:#ef4444,stroke:#7f1d1d,stroke-width:2px,color:#1a0505
style D fill:#ef4444,stroke:#7f1d1d,stroke-width:2px,color:#1a0505
style E fill:#ef4444,stroke:#7f1d1d,stroke-width:2px,color:#1a0505
style R fill:#ef4444,stroke:#7f1d1d,stroke-width:2px,color:#1a0505
style V fill:#ef4444,stroke:#7f1d1d,stroke-width:2px,color:#1a0505How It Works
AI Agent Connection: Claude, Cursor, VS Code, or any MCP-compatible client connects over stdio. The server owns stdout for the JSON-RPC protocol; every byte of banner/log chrome goes to stderr, so the stream is never corrupted.
Source-Grounded Retrieval: a query flows through metadata filters β FTS5 BM25 (always available) β optional local semantic search β reranking β a per-document cap that enforces source diversity.
Graph Enrichment: the knowledge graph annotates technique dossiers and similar-case results with evidence-linked edges. It enhances retrieval and never gates it: everything works with an empty graph.
Verifiable Provenance: every result resolves through its
chunk_idto the exact indexed excerpt. BlackBook never fabricates a citation.Read-Only by Design: no command execution, host scanning, or arbitrary URL fetching through tool parameters. Execution belongs to a separate MCP such as HexStrike.
Related MCP server: solve-it
What it is
A hybrid knowledge system, not a queryβembeddingβdump pipeline:
query β metadata filter β FTS5 (BM25) β [optional semantic] β rerank β
source diversity β provenance β exact citationsLexical retrieval (SQLite FTS5) is the always-available backbone. Semantic search is optional and local. Nothing is presented as fact unless it traces to an indexed source chunk.
Features (current phase)
Source-grounded search across HackTricks, 0xdf writeups, and local PDFs
Exact, verifiable citations: every reference resolves to real indexed text
Structure-preserving chunking: heading breadcrumbs and code blocks intact
Hybrid retrieval facade with reranking + source diversity: lexical (FTS5 BM25) always on, local semantic embeddings merged in when enabled
Local semantic search (
sentence-transformers, offline): paraphrased queries with no keyword overlap still find the right chunk; degrades gracefully to lexical when the extra isn't installedSource filtering & platform/category filters
Knowledge graph (Technique/Tool/Service/OS/Writeup/Source) built from the index; evidence-linked edges enrich technique dossiers and case search without ever gating retrieval
Modular ingestion via a
SourceAdapterinterface (add sources without a rewrite)CLI for ingestion, search, graph, stats, sources, diagnostics
MCP server over stdio for Claude Code / Cursor / VS Code
Installation
Requires Python β₯ 3.10.
# with uv (recommended)
uv pip install -e .
# or with pip
pip install -e .
# optional: semantic/embedding search (Phase 3)
uv pip install -e ".[semantic]"
# development / tests
uv pip install -e ".[dev]"This installs two CLI entry points: blackbook and cyber-knowledge (alias).
Configuration
BlackBook reads, in increasing priority: built-in defaults β a YAML config file β
BLACKBOOK_* environment variables.
cp config.example.yaml ~/.blackbook/config.yaml
# edit paths/sources; see config.example.yaml for every optionKey settings:
home: ~/.blackbook # data dir (db, caches, raw checkouts)
sources:
- id: hacktricks
enabled: true
- id: "0xdf" # quote hex-like ids (YAML parses 0xdf as 223)
enabled: true
- id: local_pdfs
enabled: true
directory: ~/knowledge/pdfs
authority: user # NOT assumed authoritative
embeddings:
enabled: false # set true + install [semantic] for local semantic search
model: sentence-transformers/all-MiniLM-L6-v2
device: cpu
retrieval:
default_limit: 8
per_document_cap: 2 # source diversityInitial ingestion
blackbook ingest --source hacktricks # markdown book (tarball over HTTPS)
blackbook ingest --source 0xdf # HTB/CTF writeups
blackbook ingest # all enabled sources
# bound the size during a first run:
# set `max_files: 25` on a source in config.yamlRe-running ingest is incremental; unchanged documents are skipped via content
hash.
PDF ingestion
# point the local_pdfs source at your directory in config.yaml, then:
blackbook ingest --source local_pdfsPDFs are chunked per page with page-number citations. They default to
authority: user and are not treated as authoritative.
Searching
blackbook search "kerberoasting"
blackbook search "windows service privilege escalation" --source hacktricks
blackbook search "NTLM relay" --platform windows --limit 5
blackbook search "crack service account passwords" --mode semantic # paraphrase-friendly
blackbook stats
blackbook sources
blackbook graph build # (re)build the knowledge graph from the index
blackbook graph show # graph entity/relationship counts
blackbook doctor # diagnostics: db, index, sources, embeddings
blackbook rebuild-index # rebuild the FTS5 indexSearch modes: hybrid (default, lexical + semantic), keyword (FTS5 only),
semantic (embeddings only), plus two intent-biased modes: technique (nudges
canonical technique/reference material up) and case_similarity (favours hands-on
writeups). The intent modes nudge ranking, they never filter results out. Semantic
and hybrid use vectors only when embeddings.enabled and the [semantic] extra is
installed; otherwise they fall back to lexical automatically.
Semantic embeddings
With embeddings.enabled: true and the [semantic] extra, ingestion embeds new
chunks inline. To (re)build the semantic index without re-ingesting:
blackbook embed # embed chunks missing a current-model vector
blackbook embed --source local_pdfs # only one source
blackbook embed --reembed # drop existing vectors first, then re-embedEmbeddings are computed locally and never leave the machine. blackbook doctor
reports coverage (N/M embedded).
Claude Code setup
claude mcp add blackbook -- blackbook serveor in your MCP config (.mcp.json / ~/.config/claude/...):
{
"mcpServers": {
"blackbook": { "command": "blackbook", "args": ["serve"] }
}
}Using a virtualenv? Point command at it: "/home/you/venv/bin/blackbook".
Cursor
Settings β MCP β Add server:
{ "mcpServers": { "blackbook": { "command": "blackbook", "args": ["serve"] } } }VS Code
.vscode/mcp.json (with an MCP-capable extension):
{ "servers": { "blackbook": { "command": "blackbook", "args": ["serve"] } } }Startup banner
Launching the server prints a banner and then streams status logs. Every byte of this chrome goes to stderr; stdout is reserved for the JSON-RPC protocol, so the banner and logs never corrupt an MCP client's stream.
βββββββ βββ ββββββ ββββββββββ ββββββββββ βββββββ βββββββ βββ βββ
βββββββββββ βββββββββββββββββββ βββββββββββββββββββββββββββββββββ ββββ
βββββββββββ βββββββββββ βββββββ βββββββββββ ββββββ ββββββββββ
βββββββββββ βββββββββββ βββββββ βββββββββββ ββββββ ββββββββββ
βββββββββββββββββββ ββββββββββββββ ββββββββββββββββββββββββββββββββ βββ
βββββββ βββββββββββ βββ ββββββββββ ββββββββββ βββββββ βββββββ βββ βββ
Source-grounded cybersecurity knowledge & research MCP
v0.6.0 Β· stdio Β· read-only Β· no execution Β· every claim cited
corpus 3 sources Β· 1204 docs Β· 18630 chunks Β· 18630 embeddings
graph 642 entities Β· 1508 relationships Β· 2 casesIn a real terminal the wordmark is gradient-lit (cyanβindigo, intentionally
distinct from an execution MCP's red) and the corpus/graph lines reflect your
live index. Suppress it with blackbook serve --no-banner.
Status and log lines use a compact, level-styled prefix, showing the successes and failures at a glance:
[+] Embedded 18630 chunks. Total vectors: 18630 success (green)
[*] server ready info (cyan)
[!] Graph rebuild skipped: no chunks changed warning (yellow)
[-] hacktricks: fetch failed (offline) error (red)Rich strips the colour automatically when output is piped or redirected, so log files stay clean.
Available MCP tools
Tool | Status | Purpose |
| β | Source-grounded search with provenance-tagged results |
| β | Resolve a reference to the exact supporting excerpt |
| β | Structured technique dossier (graph-enriched, always cited) |
| β | Similar-case (writeup) retrieval, techniques annotated |
| β | Observation-driven, source-grounded research packets |
| β | Local investigation state (cases + observations) |
Only implemented tools are registered; nothing is stubbed or faked.
Example Claude Code interaction
You: What does HackTricks document about Kerberoasting, and has 0xdf
covered a similar HTB machine?
Claude: (calls knowledge_search {query: "kerberoasting", sources: ["hacktricks","0xdf"]})
HackTricks documents Kerberoasting under Active Directory β Kerberos β¦
Similar 0xdf case: HTB: Forest β¦
[cites chunk refs]
Claude: (calls knowledge_source {chunk_id: β¦} to read the exact section)
Here's the exact HackTricks enumeration procedure β¦Knowledge graph
A lightweight graph of Technique / Tool / Service / OS / Writeup / Source
entities and their relationships (documented_by, demonstrated_in, uses,
targets, runs_on, β¦), derived from the already-indexed corpus, with no fetching
or execution. Every non-structural edge carries the document it was extracted from
(evidence_doc_id), a confidence, and an inferred flag; nothing is fabricated,
and a citation always resolves to real indexed text.
The graph enhances retrieval, it never gates it: search and both new tools work with an empty graph and simply gain neighbours/annotations once it is built.
blackbook graph build # (re)build the graph from the index, full and idempotent
blackbook graph show # current entity/relationship counts, no rebuildIngesting also refreshes the graph automatically (skip with ingest --no-graph).
Two tools consume it:
knowledge_technique: returns which sources document a technique, which tools/services/writeups the graph associates with it (each edge with confidence and its backing document), plus real cited excerpts. Works before the graph exists; it always returns indexed references.knowledge_case_search: finds hands-on writeups similar to a situation and, when the graph is built, annotates each with the techniques it demonstrates.
Retrieval architecture
See docs/retrieval.md. FTS5 BM25 is always available; semantic search is an
optional local backend merged into the same facade. Reranking combines lexical
score, source authority, platform/category match, and keyword overlap, then a
per-document cap enforces source diversity.
Source provenance
Every claim carries provenance. knowledge_search returns a ref (chunk_id,
doc_id, source, url, page, section_path); knowledge_source resolves it to the
exact indexed text. BlackBook never fabricates a citation.
Troubleshooting
blackbook doctor --verbose # full diagnosticsUnknown or disabled source: checkblackbook sources; quote"0xdf"in YAML.Empty results: run
blackbook ingestfirst; checkblackbook stats.PDF dir missing: set
sources[].directoryforlocal_pdfs.Logs: add
--verboseto any command for structured debug output.
Security model
BlackBook is read-only with respect to external systems, confines filesystem reads
to configured knowledge directories, validates all tool inputs, and never fetches
arbitrary URLs through tool parameters. See docs/security.md.
Development
uv pip install -e ".[dev]"
python -m pytest tests # run the suiteLayout:
src/blackbook/
config.py layered settings
server.py FastMCP wiring (stdio)
mcp/ tool schemas + implementations
ingestion/ SourceAdapter + per-source adapters + pipeline
retrieval/ lexical / hybrid / reranker / chunking
knowledge/ source resolution (citation -> excerpt)
storage/ SQLite (FTS5 + JSON1), models, migrations
cli/ Typer CLI
utils/ path-safety helpers
tests/ unit + fixtures (+ integration)
docs/ architecture, ingestion, retrieval, mcp, securityTesting
python -m pytest tests -qTests cover chunking, storage/FTS5 sync, HackTricks & 0xdf parsing (offline
fixtures), retrieval & reranking, semantic embeddings & hybrid merge, MCP tools,
provenance round-trips, and path safety. Semantic tests use a deterministic
model-free embedder so they run offline with no model download; one real-model
test skips cleanly when the [semantic] extra isn't installed. PDF tests use a
generated PDF and skip if reportlab isn't installed.
Roadmap
Phase 1: MCP server, SQLite+FTS5, HackTricks + 0xdf ingestion, search, citations
Phase 2: font-aware PDF adapter (heading/code detection, page-level citations), cross-document near-duplicate detection, structural chunking, CLI
Phase 3: local embeddings (
all-MiniLM-L6-v2), hybrid retrieval, rerankingPhase 4: knowledge graph, technique relationships, case similarity
Phase 5:
knowledge_research(observation β source-grounded packet),knowledge_context(local investigation state)Phase 6: offline evaluation suite (
blackbook eval), citation-integrity gate, FTS5 optimize on ingest, adversarial/hardening tests
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server that indexes Markdown, Word, HTML, and PDF documents into a SQLite knowledge graph with CJK+Latin full-text search and cross-document reference tracking. Runs drift audits to surface stale policies, conflicting research claims, superseded ADRs, and undocumented code exports.105MIT
- Alicense-qualityDmaintenanceMCP server that provides programmatic access to the SOLVE-IT digital forensics knowledge base, enabling LLMs to query, navigate, and search forensic techniques, weaknesses, mitigations, objectives, and citations.1MIT
- Alicense-qualityBmaintenanceMCP server that builds a deterministic, source-traceable knowledge index of any codebase, enabling glossary lookup, code graphs, and exact-token search with every fact linked to its source file and line.241MIT
- AlicenseAqualityCmaintenanceRead-only MCP server providing AI access to verifiable web, GitHub, and local sources, plus a managed fantasy entity catalog, with strong security and provenance tracking.10MIT
Related MCP Connectors
An MCP server for deep research or task groups
Academic research MCP server for paper search, citation checks, graphs, and deep research.
MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Daniel-wambua/BlackBook'
If you have feedback or need assistance with the MCP directory API, please join our Discord server