Skip to main content

mcpr_core/
lib.rs

1//! Core types, traits, and shared foundations for mcpr crates.
2//!
3//! `mcpr-core` is the foundation of the mcpr workspace. Every other mcpr crate
4//! depends on it for shared abstractions, protocol types, and proxy logic.
5//!
6//! ## Modules
7//!
8//! - [`config`]: Module configuration trait and validation types.
9//! - [`event`]: Proxy event types (`ProxyEvent` enum) and sink trait (`EventSink`).
10//! - [`protocol`]: JSON-RPC 2.0 parsing, MCP method classification, session
11//!   management, and schema capture/diffing.
12//! - [`proxy`]: Full MCP proxy engine — per-request pipeline (parse →
13//!   route → middleware → forward → emit), [`proxy::ProxyState`] runtime,
14//!   widget bundle serving, CSP rewriting, SSE, forwarding, per-proxy health.
15//! - [`time`]: Shared time formatting utilities.
16
17pub mod config;
18pub mod event;
19pub mod protocol;
20pub mod proxy;
21pub mod time;
22pub mod timing;