heliosdb-nano 3.30.0

PostgreSQL-compatible embedded database with TDE + ZKE encryption, HNSW vector search, Product Quantization, git-like branching, time-travel queries, materialized views, row-level security, and 50+ enterprise features
Documentation
//! Model Context Protocol (MCP) for HeliosDB-Nano.
//!
//! Gated on the `mcp-endpoint` feature. Exposes:
//!
//! * JSON-RPC 2.0 dispatcher (`rpc::handle_rpc`, `rpc::handle_rpc_with_db`)
//!   — transport-agnostic, reusable from stdio, HTTP, WebSocket, SSE.
//! * Stdio server (`server::McpServer`) — consumed by the out-of-tree
//!   `heliosdb-codekb-mcp` plugin's `serve` subcommand and by MCP
//!   clients that spawn the plugin as a subprocess.
//! * Unified tool catalogue (`tools::list_tools` / `tools::call_tool`) —
//!   10 DB-backed tools (query / schema / branch / search / time-travel)
//!   + 6 in-process RAG tools (BM25 index, hybrid search, graph
//!   add-edge / traverse / path, embed-and-store).
//! * Resource catalogue (`resources::read_resource`) — `heliosdb://schema`,
//!   `heliosdb://branches`, `heliosdb://schema/{t}`, `heliosdb://stats/{t}`.
//!
//! Process-wide BM25 / graph state survives across calls via
//! `tools::BM25_INDEXES` and `tools::GRAPH_STORE` (`once_cell::Lazy`),
//! matching the warmth semantics of the earlier `mcp_extensions`
//! module.

pub mod protocol;
pub mod tools;
pub mod resources;
pub mod rpc;
pub mod server;
pub mod axum_routes;
pub mod auto_register;
pub mod auth;
pub mod progress;
pub mod result_cache;
pub mod session;
pub mod streaming;
pub mod unix_socket;
#[cfg(feature = "code-graph")]
pub mod lsp_tools;
#[cfg(feature = "graph-rag")]
pub mod graphrag_tools;

pub use protocol::{
    Capabilities, InitializeResult, JsonRpcError, JsonRpcRequest, JsonRpcResponse,
    Prompt, PromptArgument, PromptContent, PromptMessage, PromptsCapability, Resource,
    ResourceContent, ResourceReference, ResourcesCapability, ServerInfo, Tool, ToolContent,
    ToolResult, ToolsCapability, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST,
    METHOD_NOT_FOUND, PARSE_ERROR,
};
pub use resources::{list_resources, read_resource, ResourcePayload};
pub use rpc::{handle_rpc, handle_rpc_with_db, RpcError, RpcRequest, RpcResponse};
pub use server::McpServer;
pub use tools::{call_tool, list_tools, ToolDescriptor, ToolOutcome, BM25_INDEXES, GRAPH_STORE};
pub use axum_routes::{attach as attach_mcp_routes, mcp_router, McpState};
pub use auth::{bind_safety_check, AuthError, McpAuth, Scope};
pub use progress::{
    emit as emit_progress, ChannelProgressSink, NoopProgressSink, ProgressEvent, ProgressSink,
};
pub use streaming::call_tool_streaming;
pub use unix_socket::UnixSocketServer;