kvlar_proxy/lib.rs
1//! # kvlar-proxy
2//!
3//! MCP security proxy — intercepts Model Context Protocol messages and
4//! evaluates them against loaded security policies before forwarding.
5//!
6//! This crate provides the runtime enforcement layer. It sits between an
7//! AI agent and its tool servers, ensuring every tool call passes through
8//! the Kvlar policy engine before execution.
9//!
10//! ## Architecture
11//!
12//! ```text
13//! Agent ──► kvlar-proxy ──► MCP Tool Server
14//! │
15//! ├── kvlar-core (policy evaluation)
16//! └── kvlar-audit (structured logging)
17//! ```
18
19pub mod approval;
20pub mod config;
21pub mod handler;
22pub mod health;
23pub mod mcp;
24pub mod proxy;
25pub mod shield_approval;
26pub mod shutdown;
27pub mod stdio;
28pub mod watcher;
29
30pub use approval::{
31 ApprovalBackend, ApprovalError, DenyAllApprovalBackend, WebhookApprovalBackend,
32};
33pub use config::ProxyConfig;
34pub use mcp::{McpMessage, McpRequest, McpResponse, ToolCallParams};
35pub use shield_approval::ShieldApprovalBackend;
36
37/// Library version, pulled from Cargo.toml at compile time.
38pub const VERSION: &str = env!("CARGO_PKG_VERSION");