Aegis-Sovereign MCP Server
Aegis-Sovereign is an air-gapped MCP v2 appliance for unified document intelligence, GraphRAG, and token-efficient context retrieval across a single vault.
Route & analyze queries with the ADR-40 two-pronged router: deterministic identifier fast-path plus multi-tier cognitive cascade, local NanoRunner synthesis, and execution-mode telemetry.
Search the vault using hybrid dense+sparse vector retrieval for high-precision, legal-discovery, or exact-entity modes.
Optimize context by extracting verified evidence chunks with citations, cutting prompt tokens by 90%+ (guaranteed ≥40%).
Retrieve entity dossiers from the knowledge graph with 1–5 hop traversal, linked documents, timelines, monetary transactions, and cross-references.
Inspect archives in-memory (.hdx, .hwics, .zip, .xlsx, .docx, .tar.zst, .epub) with zero disk extraction; slice sections/offsets, relocate or purge corpus prefixes, get corpus stats, extract diagrams, and enrich alarms.
Scan dropzones via the Onboarding Radar to classify and rank domain knowledge directories (fiscal, medical, legal, engineering, general).
Check node health including indexing stats, database counts, monitored sources, and Ed25519 license tier.
Deploy & manage via turnkey installer, web portal/REST API on port 8765, and CLI tools for ingestion, status, and purge lifecycle.
Enables deep ingestion, inspection, and analysis of Huawei telecom vendor packages (.hdx and .hwics containers), streaming nested archives fully in-memory without disk extraction. It can relocate or purge corpus prefixes without re-indexing, enrich alarm records by streaming embedded resources/alarms/*.html to persist full Possible Causes & Procedures, extract embedded PNG signaling ladder / root-alarm diagrams, and slice specific sections by heading or character offset. Ingested Huawei 5G documentation feeds the knowledge graph for GraphRAG dossiers across alarms, MML commands, and KPI counters.
Click on "Deploy 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., "@Aegis-Sovereign MCP Server Show me the knowledge graph around the 5G core network nodes."
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.
🛡️ Aegis-Sovereign (AS) — Air-Gapped Knowledge & Document Intelligence Appliance
Aegis-Sovereign (AS) is a 100% air-gapped, single-vault enterprise document intelligence, GraphRAG, and Model Context Protocol (MCP v2) appliance. It unifies deterministic sub-millisecond identifier lookups (Prong 1) with multi-tier hybrid semantic and relational graph synthesis (Prong 2), cutting frontier LLM cloud token consumption by $\ge 40%$ (empirically $92%+$) with zero external telemetry.
🏗️ Two-Pronged Architecture & Single-Vault Server Topology
flowchart LR
subgraph Harnesses ["AI Harnesses & NOC UI"]
AGY["Google Antigravity (agy)"]
CC["Claude Code / Desktop"]
CUR["Cursor / Windsurf / Cline"]
PORTAL["Executive Web Portal\n(http://127.0.0.1:8765)"]
end
subgraph Router ["Aegis-Sovereign Core (ADR-40)"]
IR["Resilient Intent Router\n(Entropy + Grammar Classifier)"]
P1["Prong 1: Deterministic Fast-Path\n(<0.5ms B-Tree + MAC FTS5)"]
P2["Prong 2: Cognitive Cascade\n(RRF + GraphRAG + RAPTOR)"]
STREAM["Zero-Disk Archive Streamer\n(.hdx / .zip / .docx / .xlsx)"]
IR --> P1
IR --> P2
IR --> STREAM
end
subgraph Vault ["Unified Server Vault (docs/.aegis_vault/)"]
RDB[("sovereign_router.db\n49,000+ Records + FTS5")]
GDB[("sovereign_graph.db\n9,100+ Entities / 20,250+ Edges")]
DIAG["extracted_diagrams/\nHardware Topology PNGs"]
SRC["monitored_sources.json\n5 Server Domains"]
end
Harnesses <-->|"MCP v2 (stdio) / REST"| Router
P1 <--> RDB
P2 <--> RDB
P2 <--> GDB
STREAM <--> DIAGRelated MCP server: ContextFlow MCP Server
📂 Clean Repository Directory Structure (Aegis-Sovereign)
aegis-sovereign-appliance/
├── core/ # Core Appliance Engine (ADR-40)
│ ├── classifier/ # Deterministic metadata & clearance rules
│ ├── containers/ # Zero-disk .hdx, .zip, .docx, .xlsx in-memory streamers
│ ├── graph/ # SQLite WAL Knowledge Graph (GraphStore + purge engine)
│ ├── licensing/ # Ed25519 offline cryptographic license verifier
│ ├── mcp/ # 7-Tool Model Context Protocol (MCP v2) stdio server & schemas
│ ├── onboarding/ # Autonomous OnboardingRadar corpus scanner
│ ├── proxy/ # Token-budget ContextCondenser (>=40% savings guarantee)
│ ├── router/ # Two-Pronged SovereignQueryRouter (Prong 1 B-Tree/FTS5 + Prong 2)
│ ├── search/ # Hybrid Dense ONNX + Sparse BM25 RRF searcher
│ └── server.py # Unified HTTP REST API & Web Portal backend (port 8765)
├── web/portal/ # Executive & NOC Web Management Console (index.html)
├── tools/ # Administrative, Lifecycle, Purge & Packaging CLIs
│ ├── vault_lifecycle.py # Unified DB consolidation, directory ingestion & prefix purge CLI
│ ├── build_release_bundle.py # Turnkey redistributable bundle & SHA-256 MANIFEST builder
│ ├── capsule.py # Encrypted .sovereign-capsule snapshot manager
│ └── package_update.py # Air-gapped cryptographic update verifier
├── docs/manuals/ # Complete 15-Manual Operator & Engineering Suite (01–15)
├── benchmarks/ # Reproducible benchmark runners & empirical reports/
│ └── reports/ # Markdown & JSON benchmark reports (Huawei 5G, 7-Tool MCP, Scale)
├── tests/ # Comprehensive Pytest verification suite
├── data/ # Unified symlinks -> /home/tlima/Enterprise_Hub/docs/.aegis_vault/
└── install.sh # 6-stage turnkey installer & preflight health verifier⚡ Quickstart: Deploy, Ingest, Search & Purge
1. Run the Turn-Key Installer & Smoke Verification
./install.sh2. Launch the Executive Web Portal & REST API
python3 -m core.server --host 0.0.0.0 --port 8765
# Open http://127.0.0.1:8765/ in your browser3. Inspect Unified Vault Status, Ingest New Folders, or Purge Data
# Inspect unified database breakdown across all monitored server domains:
python3 -m tools.vault_lifecycle --status
# Ingest a new server directory into sovereign_router.db & sovereign_graph.db:
python3 -m tools.vault_lifecycle --ingest /path/to/directory --domain custom_docs
# Remove / purge a directory or corpus prefix from Router DB, FTS5, and GraphStore:
python3 -m tools.vault_lifecycle --purge "/path/to/directory_or_prefix"4. Tests and batch jobs on the reference host (Dell 7390)
The serving task can take ~1.5 GB at any moment (the Gemma query encoder loads on the first plain-language query) and
the host has about 2 GB free. On that host (homelab), pytest and the vault-writing tools (vault_lifecycle, every
action including --status, which rewrites the sources manifest; adr_identity --apply; the indexers) refuse to run
unless capped, and never 03:30-05:30 (nightly backup). tools/bounded_run.py; AEGIS_UNBOUNDED_OK=1 overrides.
systemd-run --user --scope -p MemoryMax=2.5G -p CPUQuota=150% ../../.venv/bin/pytest tests -q
# keep the production vault read-only while the suite runs (step 13.3 makes this the default):
systemd-run --user --scope -p MemoryMax=2.5G -p CPUQuota=150% ../../.venv/bin/pytest -p tests.vault_guard tests -q🧰 The 7-Tool Model Context Protocol (MCP v2) Matrix
# | MCP Tool Name | Primary Role | Typical Latency |
1 |
| Classifies query intent ( |
|
2 |
| Executes Prong 1 B-Tree/FTS5 exact lookup or Prong 2 hybrid retrieval across all 49,000+ unified server records. |
|
3 |
| Condenses multi-document evidence into a token-budgeted context window with provable $\ge 40%$ ($92%+$ empirical) token compression. |
|
4 |
| Traverses |
|
5 |
| Streams nested |
|
6 |
| Scans filesystem dropzones to classify file formats, detect encrypted archives, and estimate indexing footprint. |
|
7 |
| Returns real-time health, SIMD profile, database counts, monitored sources, and active |
|
📚 Master Operator Manuals (01 – 15)
All 15 operator manuals are available in docs/manuals/:
Available Tools
7 toolssovereign_get_entity_dossierA
Compiles a complete relational knowledge graph dossier for an entity: linked documents, timeline of dates, monetary transactions, and multi-hop cross-references (1 to 5 hops).
Inputs: hops, entity, entity_name.
sovereign_inspect_archiveB
Streams and inspects .hdx, .hwics, .zip, .xlsx, .docx, .tar.zst, or .epub containers purely in-memory (O_RDONLY, zero disk extraction) per ADR-07. Also supports section/offset slicing (section_filter, char_offset) and zero-reindex corpus path relocation / stale relationship cleanup (action='relocate_prefix' | 'purge_prefix' | 'corpus_stats').
Inputs: query, action, ingest, max_chars, +10 more.
sovereign_node_statusA
Inspects health, indexing stats, and operational metrics of the Sovereign Appliance node.
Inputs: no named parameters.
sovereign_optimize_contextA
Pre-filters large archives down to verified evidence chunks with citations. Cuts prompt tokens by 90%+ (guaranteed >= 40%) in a single call, eliminating cloud token waste.
Inputs: query (required), max_chunks, retrieval_mode, user_clearance, +6 more.
sovereign_route_and_analyzeC
Executes the Two-Pronged Hybrid Retrieval & Resilient Intent Router (ADR-40). Routes deterministic identifiers (<2ms SQLite B-Tree/FTS5 with MAC pushdown) vs multi-tier cognitive queries (hybrid_needle, relational_graph, macro_synthesis, compound_fused) with local NanoRunner synthesis and explicit execution_mode telemetry.
Inputs: query (required), limit, synthesize, user_clearance.
sovereign_scan_onboarding_radarA
Runs the ADR-08 60-Second Auto-Discovery Onboarding Radar (os.scandir, strictly read-only) to discover, classify, and rank domain knowledge directories (fiscal_nfe, medical_clinical, legal_contracts, engineering_manuals, general_knowledge).
Inputs: root_paths (required), max_scan_seconds.
sovereign_search_vaultB
Direct hybrid dense + sparse vector search across the sovereign vault.
Inputs: query (required), limit, retrieval_mode.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools target distinct operations (scan, status, optimize, search, dossier, route, inspect), but sovereign_optimize_context, sovereign_search_vault, and sovereign_route_and_analyze all involve retrieval/analysis and could be confused for similar high-level queries. The descriptions help, but the boundaries between 'optimize context', 'search vault', and 'route and analyze' are not immediately crisp.
All tools share the 'sovereign_' prefix and use verb_noun or verb_phrase patterns (scan_onboarding_radar, node_status, optimize_context, search_vault, get_entity_dossier, route_and_analyze, inspect_archive). Minor inconsistency: 'sovereign_node_status' lacks a verb, while others have explicit verbs, but overall the pattern is predictable.
Seven tools is a reasonable count for a specialized knowledge-management/retrieval server. The scope is broad (onboarding, search, routing, archive inspection, entity dossiers), but each tool covers a distinct capability without feeling bloated.
The server covers discovery, search, retrieval, routing, archive inspection, and node health, but lacks obvious lifecycle operations like adding/updating/deleting documents or managing the vault corpus. The inspect_archive tool has some maintenance actions (relocate_prefix, purge_prefix), but there is no clear ingest/write tool, leaving a notable gap for a knowledge vault server.
Related MCP Connectors
Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Shared product-knowledge graph for AI agent fleets — vault tools + agent self-signup over MCP.
Shared long-term memory vault for AI agents with 20 MCP tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to securely search and ingest corporate documents via MCP, offering hybrid retrieval, PII sanitization, role-based access control, and citation validation.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible agents such as Claude and Cursor to retrieve permission-aware, structured context from local or hosted data stores. Exposes tools for semantic search, entity and relationship lookup, memory access, context pack compilation, source attribution, and retrieval explanation.1Apache 2.0
- FlicenseAqualityCmaintenanceEnables AI agents to discover and query enterprise knowledge documents and business metrics through standardized MCP tools, supporting retrieval, structured sales/order analysis, anomaly scanning, and data lineage lookups.12-
- AlicenseAqualityCmaintenanceEnables AI agents to access a local-first personal context and memory layer through MCP tools for bootstrapping user context, semantically searching Markdown vault knowledge, reading files, listing topics, and adding controlled memories. It provides deterministic context retrieval, provenance-cited vector search, and secure vault operations while keeping data local and model-independent.6MIT