kbwall
Provides read-only search and status over Elasticsearch-compatible local knowledge bases via _search, returning snippets, file locations, and canonical evidence handles.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
kbwall
English · 简体中文
An air-gapped, read-only Rust MCP firewall for xerj and Elasticsearch-compatible local knowledge bases — ~1 MB single binary, zero Tokio, zero TLS, multilingual out of the box with offline CJK enhancement.
Why kbwall?
Local search engines like xerj-org/xerj are remarkably fast at indexing Markdown, PDFs, Office files, and codebases in a single binary. Their full built-in MCP server is built for all-purpose developer workflows — including index writes/deletes, corpus feedback, and automated field-report PRs.
When pointing Claude Code, Cursor, Codex, or Antigravity at a machine holding private notes, financial filings, legal contracts, and proprietary repositories, you often want a strict least-privilege, read-only boundary:
Guarantee | What |
Air-Gapped by Construction | Ships with zero TLS libraries and restricts traffic to loopback HTTP ( |
Compile-Time Read-Only MCP | Exposes only 3 read-only tools ( |
Immutable Secret Exclusions | Always blocks |
Multilingual + First-Class Offline CJK | Native Unicode word tokenization + fuzzy fallback for English & European/non-Latin languages; when CJK characters appear, automatically activates an embedded 88 KB offline table covering all 20,992 BMP CJK ideographs ( |
Multi-Vault Noise Control | Organize dozens of folders into domain |
Sub-4 ms MCP Startup | ~1.0 MB stripped Rust binary ( |
Related MCP server: Hyperconsciousness
60-Second Quickstart
1. Install xerj (the underlying search engine) & kbwall
# Install XERJ (if not already installed)
curl -fsSL https://xerj.org/get | sh
xerj --insecure --detach
# Option A: Install prebuilt ~1 MB binary (macOS & Linux, verifies SHA-256, no Rust needed)
curl -fsSL https://raw.githubusercontent.com/wasabihu/kbwall/main/install.sh | sh
# (Windows: download kbwall-x86_64-pc-windows-msvc.zip from GitHub Releases)
# Option B: Build from source (Rust >= 1.88)
cargo install --git https://github.com/wasabihu/kbwall2. Initialize & Edit ~/.config/kbwall/kb.toml
kbwall init
# Edit ~/.config/kbwall/kb.toml to declare your folders under [[sources]]
kbwall check
kbwall sync3. Wire into Your AI Coding Agent
# Auto-detect & wire Antigravity / Claude Code / Cursor
kbwall setup
# Or wire Claude Code / Codex CLI directly
claude mcp add kbwall -- ~/.local/bin/kbwall mcp
codex mcp add kbwall -- ~/.local/bin/kbwall mcpExposed MCP Tools (Strictly Read-Only)
kb_search: Search across configured sources withquery,scope(docs/code/all),group,target,limit(1..=15), andmode(bm25/hybridwith filter pushdown into every sub-query leg and automatic BM25 fallback). Returns exact file paths, line ranges, PDF page numbers (p.211/257), canonicalxerj://evidence handles (cite), and snippets.kb_status: Inspect local engine health, total indexed passages, domain groups, and configured source paths.kb_read(disable viasecurity.allow_passage_read = false): Read a bounded slice of lines (default max 80) from a whitelisted file inside configured[[sources]]directories. Canonicalizes paths to block..traversal, symlink escapes, binary files, and built-in/custom secret exclusion globs.
Verifiable xerj:// Evidence Handles
Every eligible kb_search hit (in MCP output, kbwall search, and kbwall search --json) emits a canonical, host-free evidence handle matching the shared wasabihu/claimcite span protocol byte-for-byte:
xerj://<percent_encoded_index>/<percent_encoded_doc_id>#b=<byte_start>-<byte_end>&f=<field>No
host:portin document URIs: citations stay portable across machines and never leak internal network topology into reports or manuscripts.Strict UTF-8 byte boundaries:
#b=<byte_start>-<byte_end>always snaps to verified UTF-8 character boundaries in_source.<field>(preferring XERJ's verified_passagebyte offsets when present and falling back to exact/longest-chunk span location forhybridor non-_passagehits).Zero-hallucination round-trip: copy any verbatim quote alongside its
cite: xerj://...handle into Markdown and runclaimcite check --xerj-url http://127.0.0.1:9200to verify every quote byte-for-byte against your local XERJ node.
CLI Commands
kbwall check # Validate kb.toml, loopback policy, and source directories
kbwall status [--json] # Show engine health and per-source indexed passage counts
kbwall search "query" [--scope docs|code|all] [--group <g>] [--target <t>] [--limit 8] [--json]
kbwall read /path/to/doc.md --start-line 1 --end-line 40
kbwall sync [--target <key>] [--group <g>] [--dry-run] [--json]
kbwall mcp [--config /path/to/kb.toml] # Run read-only stdio MCP server
kbwall init [--force] # Generate starter ~/.config/kbwall/kb.toml
kbwall setup [--name kbwall] [--mcp-file <path>]Verified XERJ Open Ecosystem
kbwall sits at the read-only retrieval firewall layer of an end-to-end, local-first open stack:
Stage | Project / Model | Role |
1. Ingest | Zero-Tokio Rust MCP ( | |
1b. Filings | Batch-download A-share/HKEX annual report PDFs directly into a private local | |
2. Search Engine | Single-binary Rust search engine powering indexing, BM25, HNSW/kNN, and hybrid fusion underneath | |
2b. Open Models (HF) |
| Bilingual finance/law 384-d embeddings and clean-room 0.6B cross-encoder reranker for local neural/hybrid retrieval. |
3. Read-Only Firewall |
| ~1 MB air-gapped, read-only Rust MCP firewall enforcing secret confinement, hybrid filter pushdown, and canonical |
4. Verification & Eval | Zero-dependency citation & |
Security & Attribution
See SECURITY.md for the full threat model and security invariants.
Embedded offline CJK Simplified↔Traditional and Pinyin lookup tables (
src/data/) are derived from Unicode CLDR/Unihan data (Unicode-3.0 permissive license).Independent community project; not affiliated with or endorsed by The XERJ Authors or Elastic.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A paid remote MCP for ZeroLang, built to return verdicts, receipts, usage logs, and audit-ready JSON
Verified business OSS MCP for search, RSS, crawling, documents, browser, media and transcription.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Zero-PII B2A 2-Story Remote MCP Server (16 commercial streams, 18 canonical 3-word MCP tools + 143 backward-compatible aliases, 5,858,407 verified Japanese corporations across 10,000 R2 shards, 44,293 corporate domains, 62,630 government procurement qualifications, 14,053 Official Gazette notices, and TAPP Sigstore Rekor provenance). Free 1st Floor list_data_streams & probe_stream_inventory ($0, no API key); Paid 2nd Floor query_* tools via X-MCP-API-Key, x402 Base USDC, or Apify Store PPE.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceLocal-first Markdown vault retrieval for agents. Read-only MCP stdio server exposing search, get, status, and doctor over Obsidian-compatible Markdown with hybrid BM25/vector/wikilink/title retrieval and first-class CJK support.18 PyPI11MIT

Hyperconsciousnessofficial
AlicenseNot gradedqualityBmaintenanceDeveloper-alpha Rust stdio MCP server for a local encrypted, append-only knowledge store. Agents search and retrieve knowledge through scoped, expiring grants.10MIT- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible clients to query an Obsidian vault through a local, read-only broker, returning compact, cited context packs with source paths and heading anchors while enforcing a fail-closed sensitivity boundary.MIT
- AlicenseAqualityBmaintenancePure-Rust local document engine and MCP server with 92 offline tools: merge, split, compress, OCR, convert, sanitize, redact, fill forms, and chunk PDFs without cloud dependencies.92792Apache 2.0