kronvex-ai-rag
OfficialThis 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.
Why This Template Exists
Most AI starter kits stop at a single chat box calling one LLM SDK with zero retrieval grounding, zero prompt-injection defense, bloated MCP tool schemas, and zero automated evaluation gates.
kronvex-template-ai ships a complete, clean-room production core that runs 100% locally at $0 cost out of the box and scales cleanly to PostgreSQL 16 + pgvector, Google Gemini, Anthropic Claude, OpenAI, or sovereign local Ollama:
Real Hybrid RAG (
src/modules/rag/hybrid-engine.ts): Token-aware overlapping chunking + BM25 sparse retrieval + 64-dim vector cosine similarity fused via Reciprocal Rank Fusion (k=60), with live document ingestion (POST /v1/rag/ingest) and inline[1][2]source citations.4-Layer AI Security Firewall (
src/modules/guardrails/firewall.ts):Direct & indirect prompt-injection, jailbreak, and tool-smuggling detection (
INJ-01–INJ-04).Pre-LLM PII & cloud secret redaction (Stripe
sk_live_, Anthropicsk-ant-, GitHubghp_, AWSAKIA, credit cards, emails, phone numbers).Per-call random-UUID
<untrusted-data-...>instruction-sandwich sandboxing.Faithfulness & grounding validation.
ZeroBurn 3-Band Multi-LLM Effort Router (
src/modules/router/llm-router.ts): Classifies prompts intoFAST,BALANCED, orDEEPacross Gemini 2.5, Claude 3.7 / Opus 4, OpenAI GPT-4o / o3, and Ollama Local (\$0).Stateful 4-Stage Multi-Agent DAG + Live SSE Streaming (
src/modules/agents/orchestrator.ts&src/app.ts): Streamstrace,citations,token, anddoneSSE events overPOST /v1/chat/stream.Zero-Dependency Code-Mode Stdio MCP Server (
mcp/server.mjs): Collapses 50 classic tool schemas (~34,500tokens/turn) into 2 Code-Mode tools (~620tokens/turn — 98.2% savings) with purestdoutJSON-RPC 2.0 framing,readOnlyHintannotations,--read-only/--lockdownenforcement, and UUID untrusted boundaries.Automated Golden Eval CI Gate (
pnpm eval): Grades RAG Precision@2, Red-Team Block Rate, PII Redaction Accuracy, and Effort Routing; fails CI if pass rate drops below100%.Zero-Downtime PostgreSQL 16 +
pgvectorMigrations (sql/):SET lock_timeout = '2s', strict tenant Row-Level Security (app.current_tenant), andCREATE INDEX CONCURRENTLYGIN + HNSW vector indexes.
Related MCP server: Valstorm Hosted MCP Server
Architecture
Quick Start (< 60 Seconds, $0 API Cost)
pnpm install
pnpm devOpen http://localhost:8788/ to launch the interactive KRONVEX AI & RAG Studio (Dark/Light optical themes + EN, العربية RTL, FR, ES, DE, ZH), or inspect http://localhost:8788/openapi.json.
Verification Commands
pnpm typecheck # Strict TypeScript 5.8 check
pnpm test # Unit, Hybrid RAG, Red-Team, Hono SSE & Live Stdio MCP integration tests
pnpm eval # Automated Golden Eval CI Gate (exits 0 only at 100%)
pnpm build # Production ESM build into dist/Connect Code-Mode MCP Server (Antigravity / Claude / Cursor / VS Code)
{
"mcpServers": {
"kronvex-ai-rag": {
"command": "node",
"args": ["mcp/server.mjs", "--mode", "codemode", "--read-only"]
}
}
}Use --mode classic to expose individual tools (rag_search, agent_execute, guardrail_scan, plus rag_ingest when --read-only is omitted).
Production Database & Container Deployment
Database: Apply
sql/001_init_rag_pgvector.sqlfollowed bysql/002_indexes_concurrently.sql(outside a transaction block).Container: Multi-stage pinned
node:22.15.0-alpine3.21Dockerfilerunning as non-rootUSER nodewithHEALTHCHECKon/healthz.
License & Enterprise Engineering
Released under the Apache-2.0 License by KRONVEX.
Need custom Agentic RAG architectures, private sovereign LLM clusters, NexusMCP enterprise gateways, or Red-Team AI security audits? Contact kronvex.dev.
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
Governed app access for AI agents: 1,000+ apps & 12,000+ tools via Code Mode MCP.
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Your personal library, readable by AI agents: durable snapshots, hybrid search, 46 MCP tools.
Related MCP Servers
- FlicenseBqualityBmaintenanceEnables AI agents to query an air-gapped enterprise knowledge vault via seven MCP tools for deterministic and hybrid retrieval, entity graph traversal, context compression, archive inspection, onboarding scans, and node status.7-
- AlicenseNot gradedqualityCmaintenanceEnables autonomous agents to securely access and manage virtual file systems, records, schemas, SQL and Mongo queries, and RAG search through scoped MCP tools, while supporting binary transfers via presigned S3 recipes.PolyForm Noncommercial 1.0.0
- AlicenseNot gradedqualityCmaintenanceEnables agents to run hybrid retrieval, build token-budgeted attributed context packs, answer questions with citation and groundedness-gated release, explore temporal graph entities, evaluate claim support, and ingest screened, embedded documents through typed MCP tools.Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables AI coding agents to execute tools in a sandbox, retain searchable persistent memory, and reversibly compress long conversation histories through a unified MCP endpoint.5-