objectiveai_mcp_proxy/lib.rs
1//! ObjectiveAI MCP proxy library.
2//!
3//! Other crates can `use objectiveai_mcp_proxy::{ConfigBuilder, run}` and
4//! spawn the proxy in-process; the binary at `main.rs` is a thin wrapper
5//! that reads `Config` from the environment and calls [`run`].
6
7mod mcp;
8mod run;
9mod session;
10mod session_manager;
11mod upstream;
12
13use std::sync::Arc;
14
15use objectiveai_sdk::mcp::Client;
16
17use crate::session_manager::SessionManager;
18
19/// Shared state every axum handler reaches via `State<AppState>`.
20#[derive(Clone)]
21pub struct AppState {
22 pub sessions: Arc<SessionManager>,
23 pub client: Arc<Client>,
24}
25
26pub use run::*;
27pub use session_manager::parse_key_env;